Last active
January 7, 2017 12:21
-
-
Save PhillRob/a548059902503741dfdfaa3bfec597b8 to your computer and use it in GitHub Desktop.
form-id-fulcrumapp.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(httr); library(jsonlite) | |
# this gets a list of the available forms to later query for the records per form | |
baseurl <- "https://api.fulcrumapp.com" | |
path <- "/api/v2/forms.json" | |
XApiToken = "your-api-token" | |
form.list <- | |
GET( | |
url = paste0(baseurl, path), | |
add_headers(`X-ApiToken` = XApiToken), | |
accept_json() | |
) | |
form.list <- fromJSON(content(form.list, type = "text", encoding = "utf-8"),flatten = T, simplifyDataFrame = T) | |
# you would usually need the form ID to run get the records | |
form.list$forms$name[1] # add the number you want |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment