Created
December 27, 2016 02:07
-
-
Save PhillRob/4b156fb5585e22e06cb42e95ee3481c4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# API | |
## install packages | |
install.packages(c("httr", "jsonlite", "lubridate")) | |
library(httr) | |
library(jsonlite) | |
options(stringsAsFactors = FALSE) | |
## set variables to get all records per form id | |
baseurl <- "https://api.fulcrumapp.com" | |
path <- "/api/v2/" | |
form <- "records.json?form_id=" | |
formid <- "yourformid" | |
XApiToken = "yourapitoken" | |
req <- | |
GET( | |
url = paste0(baseurl, path, form,formid), | |
add_headers(`X-ApiToken` = XApiToken), | |
accept_json() | |
) | |
stop_for_status(req) | |
head(req$content) | |
r.json<-fromJSON(content(req,type="text"),flatten = T,simplifyDataFrame = T) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment