SonaGetParticipantStats
Description¶
This API retrieves basic credit and usage information (summarized) for a particular course, or all courses in the system.
Input Parameters¶
Below are the following input parameters for use with the SonaGetParticipantStats API function.
| Parameter | Description / Possible Values |
|---|---|
api_key |
Use API key generated for Sona admin user |
class_id |
The class_id of the course. 0 = all courses. |
Output Parameters¶
Will return a single APIParticipantStats 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 | -8 | class_id is missing, non-numeric, or does not identify an existing course. Use 0 for all courses. |
Sample Input¶
Request URL
https://myschool.sona-systems.com/services/SonaAPI.svc/SonaGetParticipantStats?api_key=YOUR_API_KEY&class_id=4URL components
| Component | Value |
|---|---|
| Scheme | https |
| Host | myschool.sona-systems.com |
| Service path | /services/SonaAPI.svc |
| Function | SonaGetParticipantStats |
Query parameters
Sample Output¶
<SonaGetParticipantStatsResponse
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">
<SonaGetParticipantStatsResult>
<a:Errors i:nil="true" />
<a:Result>
<a:class_id>4</a:class_id>
<a:class_name>PSYCH101</a:class_name>
<a:complete_total>3</a:complete_total>
<a:course_credits_earned_total>0</a:course_credits_earned_total>
<a:incomplete_total>1</a:incomplete_total>
<a:login_total>2</a:login_total>
<a:no_login_total>2</a:no_login_total>
<a:no_signups_total>3</a:no_signups_total>
<a:overall_credits_earned_total>4</a:overall_credits_earned_total>
<a:overall_credits_needed_total>14</a:overall_credits_needed_total>
</a:Result>
</SonaGetParticipantStatsResult>
</SonaGetParticipantStatsResponse>