SonaGetPersonListByCreationDate
Description¶
Returns users created on or after the specified date, including their user type and login permission.
Input Parameters¶
Below are the following input parameters for use with the SonaGetPersonListByCreationDate API function.
| Parameter | Description / Possible Values |
|---|---|
api_key |
Use API key generated for Sona admin user |
person_type |
Possible values: A = admin | E = researcher | P = PI | I = instructor | S = student (participant) | X = all |
login_allowed |
Possible values: 0 = login not allowed | 1 = login allowed | 2 = all users |
creation_date |
The date the users’ accounts were created on or after. Date must be formatted as: YYYY-MM-DD. |
Output Parameters¶
Will return APIPerson class and display data in an array.
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 | person_type is missing or numeric. Use a documented letter code. |
| Error Code | -9 | login_allowed is missing or non-numeric. |
| Error Code | -10 | creation_date is not a valid date. Use YYYY-MM-DD. |
Sample Input¶
Request URL
https://myschool.sona-systems.com/services/SonaAPI.svc/SonaGetPersonListByCreationDate?api_key=YOUR_API_KEY&person_type=S&login_allowed=1&creation_date=2017-01-01URL components
| Component | Value |
|---|---|
| Scheme | https |
| Host | myschool.sona-systems.com |
| Service path | /services/SonaAPI.svc |
| Function | SonaGetPersonListByCreationDate |
Query parameters
Sample Output¶
<SonaGetPersonListByCreationDateResponse
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">
<SonaGetPersonListByCreationDateResult>
<a:Errors i:nil="true" />
<a:Result>
<a:APIPerson>
<a:admin_comments>good student</a:admin_comments>
<a:alt_email>[email protected]</a:alt_email>
<a:anon_id_code>32290</a:anon_id_code>
<a:approved>1</a:approved>
<a:birthdate>1975-07-20T00:00:00</a:birthdate>
<a:classes_needed>0</a:classes_needed>
<a:creation_date>2017-01-01T00:00:00</a:creation_date>
<a:credits_earned>4.50</a:credits_earned>
<a:credits_needed>4.00</a:credits_needed>
<a:daily_reminder>1</a:daily_reminder>
<a:email_needed>0</a:email_needed>
<a:first_name>William</a:first_name>
<a:hipaa_ack_date>2013-09-13T09:00:56</a:hipaa_ack_date>
<a:hipaa_ack_date_nonp>2017-01-01T00:00:00</a:hipaa_ack_date_nonp>
<a:language_pref>EN</a:language_pref>
<a:last_login>2013-09-13T09:00:53</a:last_login>
<a:last_name>Bliss</a:last_name>
<a:limit_date>2013-03-15T08:35:05</a:limit_date>
<a:limit_type />
<a:limited>0</a:limited>
<a:login_allowed>1</a:login_allowed>
<a:login_days>16</a:login_days>
<a:login_sent_date>2013-04-21T07:11:00</a:login_sent_date>
<a:noshow_count>0</a:noshow_count>
<a:office />
<a:password_change_needed>0</a:password_change_needed>
<a:password_failed_count>0</a:password_failed_count>
<a:person_id>1122</a:person_id>
<a:person_type_a>0</a:person_type_a>
<a:person_type_e>0</a:person_type_e>
<a:person_type_i>0</a:person_type_i>
<a:person_type_p>0</a:person_type_p>
<a:person_type_pref>S</a:person_type_pref>
<a:person_type_s>1</a:person_type_s>
<a:phone>867-5309</a:phone>
<a:pretest>1</a:pretest>
<a:student_id_num />
<a:study_invitation>1</a:study_invitation>
<a:usage_limit>500</a:usage_limit>
<a:user_id>william</a:user_id>
<a:weekly_reminder>1</a:weekly_reminder>
</a:APIPerson>
<a:APIPerson>
<a:admin_comments>average student</a:admin_comments>
<a:alt_email>[email protected]</a:alt_email>
<a:anon_id_code>32290</a:anon_id_code>
<a:approved>1</a:approved>
<a:birthdate>1975-07-20T00:00:00</a:birthdate>
<a:classes_needed>0</a:classes_needed>
<a:creation_date>2017-01-01T00:00:00</a:creation_date>
<a:credits_earned>4.50</a:credits_earned>
<a:credits_needed>4.00</a:credits_needed>
<a:daily_reminder>1</a:daily_reminder>
<a:email_needed>0</a:email_needed>
<a:first_name>Henry</a:first_name>
<a:hipaa_ack_date>2013-09-13T09:00:56</a:hipaa_ack_date>
<a:hipaa_ack_date_nonp>2017-01-01T00:00:00</a:hipaa_ack_date_nonp>
<a:language_pref>EN</a:language_pref>
<a:last_login>2013-09-13T09:00:53</a:last_login>
<a:last_name>McCormick</a:last_name>
<a:limit_date>2013-03-15T08:35:05</a:limit_date>
<a:limit_type />
<a:limited>0</a:limited>
<a:login_allowed>1</a:login_allowed>
<a:login_days>16</a:login_days>
<a:login_sent_date>2013-04-21T07:11:00</a:login_sent_date>
<a:noshow_count>0</a:noshow_count>
<a:office />
<a:password_change_needed>0</a:password_change_needed>
<a:password_failed_count>0</a:password_failed_count>
<a:person_id>3344</a:person_id>
<a:person_type_a>0</a:person_type_a>
<a:person_type_e>0</a:person_type_e>
<a:person_type_i>0</a:person_type_i>
<a:person_type_p>0</a:person_type_p>
<a:person_type_pref>S</a:person_type_pref>
<a:person_type_s>1</a:person_type_s>
<a:phone>867-5309</a:phone>
<a:pretest>1</a:pretest>
<a:student_id_num />
<a:study_invitation>1</a:study_invitation>
<a:usage_limit>500</a:usage_limit>
<a:user_id>henry</a:user_id>
<a:weekly_reminder>1</a:weekly_reminder>
</a:APIPerson>
</a:Result>
</SonaGetPersonListByCreationDateResult>
</SonaGetPersonListByCreationDateResponse>