SonaGetStudyStats
Description¶
This API retrieves basic usage information for a particular study. It’s similar to the Timeslot Usage Summary in the web interface.
Input Parameters¶
Below are the following input parameters for use with the SonaGetStudyStats API function.
| Parameter | Description / Possible Values |
|---|---|
api_key |
Use API key generated for Sona admin user |
experiment_id |
The experiment_id of the study. For multi-part studies, specify the experiment_id of the first part; results will be based on all parts of the study. |
Output Parameters¶
Will return a single APIStudyStats result.
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 | Not supplied | not a valid experiment_id |
Sample Input¶
Request URL
https://myschool.sona-systems.com/services/SonaAPI.svc/SonaGetStudyStats?api_key=YOUR_API_KEY&experiment_id=14URL components
| Component | Value |
|---|---|
| Scheme | https |
| Host | myschool.sona-systems.com |
| Service path | /services/SonaAPI.svc |
| Function | SonaGetStudyStats |
Query parameters
Sample Output¶
<SonaGetStudyStatsResponse
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">
<SonaGetStudyStatsResult>
<a:Errors i:nil="true" />
<a:Result>
<a:awaiting_action_count>3</a:awaiting_action_count>
<a:credits_granted_total>7.00</a:credits_granted_total>
<a:experiment_id>14</a:experiment_id>
<a:noshow_count>1</a:noshow_count>
<a:noshow_excused_count>2</a:noshow_excused_count>
<a:noshow_unexcused_count>7</a:noshow_unexcused_count>
<a:open_spaces_future>10</a:open_spaces_future>
<a:open_spaces_past>0</a:open_spaces_past>
<a:participated_count>5</a:participated_count>
<a:study_name>Behavioral Study 1</a:study_name>
<a:timeslot_count>3</a:timeslot_count>
</a:Result>
</SonaGetStudyStatsResult>
</SonaGetStudyStatsResponse>