-
Notifications
You must be signed in to change notification settings - Fork 25
Annotation Manipulation
- Survey Response Annotation Create
- Survey Response Annotation Read
- Prompt Response Annotation Create
- Prompt Response Annotation Read
Allows users to create annotations on survey responses.
annotation/survey_response/create
Campaign supervisors may create survey response annotations for all participants in their campaigns.
- (r) auth_token = authentication token.
- (r) client = the ubiquitous client parameter
- (r) survey_id = the id of the survey to be annotated
- (r) time = the UNIX epoch milliseconds at which this annotation was created
- (r) timezone = the timezone ID in which this annotation was created
- (r) annotation = the annotation text.
POST /app/annotation/survey_response/create HTTP/1.1
Host: dev.ohmage.org
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
Content-Length: byte-length-of-content
Content-Type: application/x-www-form-urlencoded
auth_token=02c59bf6-65a2-478e-bcb4-675b543ace26
&client=omh.dvu.ptsd
&survey_id=a299df12-24c6-4e79-bb09-2563b62d1df0
&annotation=annotation text here
&time=1328312397
&timezone=GMT
curl -v -d "auth_token=02c59bf6-65a2-478e-bcb4-675b543ace26&client=omh.dvu.ptsd&survey_id=a299df12-24c6-4e79-bb09-2563b62d1df0&time=1328312397&timezone=GMT&annotation=annotation text" http://localhost:8080/app/annotation/survey_response/create
{
"result" : "success",
"id" : "89a206c6-4ec1-11e1-a26e-e4ce8f075a7e"
}
See the error page for a description of error codes and their associated descriptions.
Allows supervisors in campaigns to read their annotations on participant survey responses.
annotation/survey_response/read
Campaign supervisors may read their own annotations on survey responses.
- (r) auth_token = authentication token.
- (r) client = the ubiquitous client parameter
- (r) survey_id = indicates which the survey to retrieve annotations from
POST /app/annotation/survey_response/read HTTP/1.1
Host: dev.ohmage.org
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
Content-Length: byte-length-of-content
Content-Type: application/x-www-form-urlencoded
auth_token=02c59bf6-65a2-478e-bcb4-675b543ace26
&client=ohmage.gwt
&survey_id=a299df12-24c6-4e79-bb09-2563b62d1df0
curl -v -d "auth_token=02c59bf6-65a2-478e-bcb4-675b543ace26&client=omh.dvu.ptsd&survey_id=a299df12-24c6-4e79-bb09-2563b62d1df0" http://localhost:8080/app/annotation/survey_response/read
{
"result": "success",
"data": {
"16c78aa2-0ebb-48cb-8e79-2bc4dd156042": {
"timezone": "GMT-08:00",
"time": 1329355972,
"text": "text"
},
"18f9f0ff-8bca-4a96-82eb-4b27b79053a2": {
"timezone": "GMT-08:00",
"time": 1329355972,
"text": "text"
},
"0231bc4a-f4f2-42fe-9a34-98acb4df2694": {
"timezone": "GMT-08:00",
"time": 1329355972,
"text": "text"
},
"410eb233-c489-470b-8d21-2fde7d62967d": {
"timezone": "GMT-08:00",
"time": 1329355972,
"text": "text"
}
}
}
See the error page for a description of error codes and their associated descriptions.
Allows users to create annotations on prompt responses.
annotation/prompt_response/create
Campaign supervisors may create prompt response annotations for all participants in their campaigns.
- (r) auth_token = authentication token.
- (r) client = the ubiquitous client parameter
- (r) survey_id = the id of the survey to be annotated
- (r) prompt_id = the id of the prompt to be annotated
- (o) repeatable_set_id = the id of the repeatable set containing the prompt
- (o) repeatable_set_iteration = the iteration of the repeatable set
- (r) time = the UNIX epoch milliseconds at which this annotation was created
- (r) timezone = the timezone ID in which this annotation was created
- (r) annotation = the annotation text.
POST /app/annotation/prompt_response/create HTTP/1.1
Host: dev.ohmage.org
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
Content-Length: byte-length-of-content
Content-Type: application/x-www-form-urlencoded
auth_token=02c59bf6-65a2-478e-bcb4-675b543ace26
&client=omh.dvu.ptsd
&survey_id=a299df12-24c6-4e79-bb09-2563b62d1df0
&prompt_id=overallMood
&annotation=annotation text here
&time=1328312397
&timezone=GMT
curl -v -d "auth_token=02c59bf6-65a2-478e-bcb4-675b543ace26&client=omh.dvu.ptsd&survey_id=a299df12-24c6-4e79-bb09-2563b62d1df0&time=1328312397&prompt_id=overallMood&annotation=annotation text&time=1328312397&timezone=GMT" http://localhost:8080/app/annotation/prompt_response/create
{
"result" : "success",
"id" : "89a206c6-4ec1-11e1-a26e-e4ce8f075a7e"
}
See the error page for a description of error codes and their associated descriptions.
Allows supervisors in campaigns to read their annotations on participant prompt responses.
annotation/prompt_response/read
Campaign supervisors may read their own annotations on prompt responses.
- (r) auth_token = authentication token.
- (r) client = the ubiquitous client parameter
- (r) survey_id = indicates which the survey to retrieve annotations from
- (r) prompt_id = the id of the prompt to retrive annotations from
- (o) repeatable_set_id = the id of the repeatable set containing the prompt
- (o) repeatable_set_iteration = the iteration of the repeatable set
POST /app/annotation/prompt_response/read HTTP/1.1
Host: dev.ohmage.org
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
Content-Length: byte-length-of-content
Content-Type: application/x-www-form-urlencoded
auth_token=02c59bf6-65a2-478e-bcb4-675b543ace26
&client=ohmage.gwt
&survey_id=a299df12-24c6-4e79-bb09-2563b62d1df0
$prompt_id=overallMood
curl -v -d "auth_token=02c59bf6-65a2-478e-bcb4-675b543ace26&client=omh.dvu.ptsd&survey_id=a299df12-24c6-4e79-bb09-2563b62d1df0&prompt_id=overallMood" http://localhost:8080/app/annotation/prompt_response/read
{
"result": "success",
"data": {
"16c78aa2-0ebb-48cb-8e79-2bc4dd156042": {
"timezone": "GMT-08:00",
"time": 1329355972,
"text": "text"
},
"18f9f0ff-8bca-4a96-82eb-4b27b79053a2": {
"timezone": "GMT-08:00",
"time": 1329355972,
"text": "text"
},
"0231bc4a-f4f2-42fe-9a34-98acb4df2694": {
"timezone": "GMT-08:00",
"time": 1329355972,
"text": "text"
},
"410eb233-c489-470b-8d21-2fde7d62967d": {
"timezone": "GMT-08:00",
"time": 1329355972,
"text": "text"
}
}
}
See the error page for a description of error codes and their associated descriptions.