SonaGetTimeslotsByExperimentID
Description¶
This API retrieves a list of timeslots for a particular study.
Input Parameters¶
Below are the following input parameters for use with the SonaGetTimeslotsByExperimentID API function.
| Parameter | Description / Possible Values |
|---|---|
api_key |
Use API key generated for Sona admin user |
experiment_id |
The experiment_id of the study |
fill_status |
Optional. Defaults to S.A = all timeslots, regardless of signups F = full timeslots E = empty timeslots S = timeslots with at least one signup |
Output Parameters¶
Returns an array of APIStudySchedule records. If no records match the request, Errors contains No records found. and Result is not populated.
Error Codes¶
Below are the possible error messages encountered and their respective descriptions.
| Error Type | Error Code | Description |
|---|---|---|
| Authentication Failed | -1 through -7 | Standard authentication errors |
| Error Code | -8 | Invalid experiment_id |
| Error Code | Not supplied | No records match the supplied filters. |
Sample Input¶
Request URL
https://myschool.sona-systems.com/services/SonaAPI.svc/SonaGetTimeslotsByExperimentID?api_key=YOUR_API_KEY&experiment_id=123&fill_status=AURL components
| Component | Value |
|---|---|
| Scheme | https |
| Host | myschool.sona-systems.com |
| Service path | /services/SonaAPI.svc |
| Function | SonaGetTimeslotsByExperimentID |
Query parameters
Sample Output¶
<SonaGetTimeslotsByExperimentIDResponse
xmlns="https://www.sona-systems.com/"
xmlns:a="http://schemas.datacontract.org/2004/07/emsdotnet.sonasystems"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<SonaGetTimeslotsByExperimentIDResult>
<a:Errors i:nil="true" />
<a:Result>
<a:APIStudySchedule>
<a:duration>30</a:duration>
<a:experiment_id>123</a:experiment_id>
<a:location>Miller Hall</a:location>
<a:num_signed_up>9</a:num_signed_up>
<a:num_students>10</a:num_students>
<a:researcher_id>0</a:researcher_id>
<a:study_name>Physics Study</a:study_name>
<a:survey_flag>0</a:survey_flag>
<a:timeslot_date>2012-06-26T09:00:00</a:timeslot_date>
<a:timeslot_id>282</a:timeslot_id>
<a:videoconf_flag>1</a:videoconf_flag>
<a:videoconf_url>https://www.zoom.com/123</a:videoconf_url>
<a:web_flag>0</a:web_flag>
</a:APIStudySchedule>
<a:APIStudySchedule>
<a:duration>30</a:duration>
<a:experiment_id>123</a:experiment_id>
<a:location>Miller Hall</a:location>
<a:num_signed_up>1</a:num_signed_up>
<a:num_students>10</a:num_students>
<a:researcher_id>0</a:researcher_id>
<a:study_name>Physics Study</a:study_name>
<a:survey_flag>0</a:survey_flag>
<a:timeslot_date>2012-10-05T10:00:00</a:timeslot_date>
<a:timeslot_id>305</a:timeslot_id>
<a:videoconf_flag>1</a:videoconf_flag>
<a:videoconf_url>https://www.zoom.com/123</a:videoconf_url>
<a:web_flag>0</a:web_flag>
</a:APIStudySchedule>
<a:APIStudySchedule>
<a:duration>30</a:duration>
<a:experiment_id>123</a:experiment_id>
<a:location>Miller Hall</a:location>
<a:num_signed_up>3</a:num_signed_up>
<a:num_students>10</a:num_students>
<a:researcher_id>0</a:researcher_id>
<a:study_name>Physics Study</a:study_name>
<a:survey_flag>0</a:survey_flag>
<a:timeslot_date>2014-07-15T10:30:00</a:timeslot_date>
<a:timeslot_id>470</a:timeslot_id>
<a:videoconf_flag>1</a:videoconf_flag>
<a:videoconf_url>https://www.zoom.com/123</a:videoconf_url>
<a:web_flag>0</a:web_flag>
</a:APIStudySchedule>
</a:Result>
</SonaGetTimeslotsByExperimentIDResult>
</SonaGetTimeslotsByExperimentIDResponse>