survos / platform-api-r

Sample programs demonstrating calls to the API
0 stars 0 forks source link

$_embedded does not exist Error #3

Closed phillc73 closed 9 years ago

phillc73 commented 9 years ago

Assuming the "survos" package from this repository is currently installed.

User has logged in with:

loginSurvos(username="YourUserName", password="YourPassword")

Then try the following code, which is really just manually running the existing jobs function, but as individual calls:

listJobsOps <- paste("projectCode=nyu_demo",sep="")

  jobsURL <- paste("https://nyu-demo.survos.com/app_dev.php/api1.0/jobs?",listJobsOps,sep="")

  getJobsData <- GET(url=jobsURL, add_headers(Authorization=paste("Bearer ", accessToken, sep="")))

  jobsData = fromJSON(content(getJobsData,type="text"))

The "jobsData" variable now contains the following:

$code
[1] 500

$message
[1] "Property Diy\\RestBundle\\Model\\PaginatedResponse::$_embedded does not exist"
phillc73 commented 9 years ago

Fixed. Thanks.