Body
Error Message
create new upload set
Request body
The identifier of the survey this upload is based on
The title of this upload set
initialize as empty
Examples
$ curl -X POST
-H "Content-Type: application/json"
-d '{"surveyID": "5ca3d2e2d2a3ff32b0226814",
"title": "Winter 2019 - CSCC09 Course Evaluations"
"data": []}'
http://localhost:3000/api/uploaded-data/
create a new processed data set
Request body
The identifier of the survey this data is based on
The title of this data set
The survey questions
The survey answers
$ curl -X POST
-H "Content-Type: application/json"
-d '{"surveyID": "5ca3d2e2d2a3ff32b0226814",
"title": "Winter 2019 - CSCC09 Course Evaluations"
"data": []}'
http://localhost:3000/api/processed-data/
create a document and insert into an existing collection
Request parameters
The name of the collection within the database
Request body
JSON of document for insert
$ curl -X POST
-H "Content-Type: application/json"
-d '{"surveyID": "5ca3d2e2d2a3ff32b0226814",
"title": "Winter 2019 - CSCC09 Course Evaluations"
"data": []}'
http://localhost:3000/db/uploaded-data/
process image of a completed survey
Request parameters
Request body
Image of completed survey
$ curl -X POST
-F 'image=@Samples/Survey1.jpg'
https://localhost:3000/process/5ca3d2e2d2a3ff32b0226814/
retrieve all surveys
Responses
Body
The identifier of the survey
The title of the survey
The user identifier that created the survey
list of question objects
The identifier of the question type
The text of the question
list of option objects
The text representing an optional answer to the question
The top-left x-coordinate of checkbox for this answer
The top-left y-coordinate of checkbox for this answer
The width of the checkbox for this answer
The height of the checkbox for this answer
$ curl https://localhost:3000/api/survey/
retrieve all upload sets
Responses
Body
The identifier of the upload set
The identifier of the survey this upload set is based on
The title of the survey
list of objects
The identifier of the survey upload
list of objects
The question
The checked answers
$ curl https://localhost:3000/api/uploaded-data/5ca3d2e2d2a3ff32b0226814/
retrieve all processed data
Responses
$ curl https://localhost:3000/api/processed-data/
$ curl https://localhost:3000/db/processed-data/
retrieve upload set with given id
Request parameters
Responses
Body
The identifier of the upload set
The identifier of the survey this upload set is based on
object of survey that matches the surveyID
The title of the survey
list of objects
The question
The checked answers
$ curl https://localhost:3000/api/uploaded-data/5ca3d2e2d2a3ff32b0226814/
retrieve processed data set with given id
Request parameters
Responses
$ curl https://localhost:3000/api/processed-data/5ca3d2e2d2a3ff32b0226814/
retrieve document with given id from given collection /db/:collectionName/:id
Request parameters
$ curl https://localhost:3000/db/processed-data/5ca3d2e2d2a3ff32b0226814/
$ curl -X PATCH
-H "Content-Type: application/json"
-d '[{
"question": "Did you enjoy this course?",
"questionTypeID": 1,
"options": [
{
"option": "Yes",
"locX": 130,
"locY": 140,
"width": 30,
"height": 25
},
{
"option": "No",
"locX": 150,
"locY": 140,
"width": 30,
"height": 25
},
]
}]'
https://localhost:3000/api/surveys/5ca3d2e2d2a3ff32b0226814
$ curl -X PATCH
-H "Content-Type: application/json"
-d '[{"data": ["Likely", "Yes", "No"]}]'
https://localhost:3000/api/processed-data/5ca3d2e2d2a3ff32b0226814/
update documents that matches given selector criteria /db/:collectionName
Request parameters
/db/surveys/
Request body
object of field values to match
object of value to update in collection
$ curl -X PATCH
-H "Content-Type: application/json"
-d '{"selector": {"title":"Demo survey"},
"document": {"title":"Sample survey"}}'
https://localhost:3000/db/surveys/
$ curl -X DELETE
-H "Content-Type: application/json"
-d '{"title": "Demo Survey"}'
https://localhost:3000/db/surveys/