Skip to content

Retrieving survey instances

Jonas Enlund edited this page Aug 22, 2014 · 13 revisions

Retrieve a list of answered surveys (survey instances).

Endpoint Description
/survey_instances?<query-params> Retrieves a list of survey instances based on the query parameters
Query parameter Description
surveyId=<id> Retrieves a list of survey instances based on survey id
deviceId=<id> Retrieves a list of survey instances based on device id
beginDate=<timestamp> Retrieves a list of survey instances submitted after <timestamp>
endDate=<timestamp> Retrieves a list of survey instances submitted before <timestamp>
since=<cursor-id> Retrieves a list of survey instances skipping the instances before <cursor-id>. If a response contains more than 20 instances you can get the next 20 by using the value of meta.since as the since query parameter.

Note that the query parameters can be combined arbitrarily:

http://<flow-instance>/api/v1/survey_instances?deviceId=<id>&begindDate=<timestamp>

A survey instance consists of the following data:

field description type
survey_instances.surveyCode The name of the survey String
survey_instances.surveyId survey Id String
survey_instances.submitterName Name of the person who submitted the answers String
survey_instances.deviceIdentifier Id of the device through which the survey was submitted String
survey_instances.approximateLocationFlag
survey_instances.approvedFlag
survey_instances.userID User ID of the person who submitted the answers Integer
survey_instances.collectionDate Date the answers are collected Unix timestamp
survey_instances.questionAnswersStore
survey_instances.surveyalTime time (in seconds) it took to collect the answers Integer
survey_instances.keyId Unique key for this instance Integer
survey_instances.surveyedLocaleIdentifier
survey_instances.surveyedLocaleId
survey_instances.surveyedLocaleId
Clone this wiki locally