Skip to content

SonaGetStudyListByPI

Description

This function returns a detailed list of studies managed by a particular PI.

Input Parameters

Below are the following input parameters for use with the SonaGetStudyListByPI API function.

Parameter Description / Possible Values
api_key Use API key generated for Sona admin user
active -1=all; 0=not active only; 1=active only
approved -1=all; 0=not approved only; 1=approved only
web_flag -1=all; 0=lab studies only; 1=web studies only (internal online and external web)
survey_flag -1=all; 0=all except online surveys; 1=online surveys only
pi_username principal investigator's username

Output Parameters

Will return APIStudyInfo 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 Not supplied active is missing or is not -1, 0, or 1.
Error Code Not supplied approved is missing or is not -1, 0, or 1.
Error Code Not supplied web_flag is missing or is not -1, 0, or 1.
Error Code Not supplied survey_flag is missing or is not -1, 0, or 1.
Error Code Not supplied pi_username does not identify an existing PI.
Error Code Not supplied No studies matched the supplied filters.

Sample Input

Request URL

https://myschool.sona-systems.com/services/SonaAPI.svc/SonaGetStudyListByPI?api_key=YOUR_API_KEY&active=1&approved=1&web_flag=1&survey_flag=1&pi_username=john_pi

URL components

Component Value
Scheme https
Host myschool.sona-systems.com
Service path /services/SonaAPI.svc
Function SonaGetStudyListByPI

Query parameters

api_key = YOUR_API_KEY
active = 1
approved = 1
web_flag = 1
survey_flag = 1
pi_username = john_pi

Sample Output

<SonaGetStudyListByPIResponse
  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">
  <SonaGetStudyListByPIResult>
    <a:Errors i:nil="true" />
    <a:Result>
      <a:APIStudyInfo>
        <a:active>1</a:active>
        <a:age_maximum>99.0</a:age_maximum>
        <a:age_minimum>0.0</a:age_minimum>
        <a:auto_credit_enable>1</a:auto_credit_enable>
        <a:cancel_limit>24</a:cancel_limit>
        <a:course_restrictions />
        <a:creation_date>2011-01-01T00:00:00</a:creation_date>
        <a:credits>2.00</a:credits>
        <a:double_signup_flag>0</a:double_signup_flag>
        <a:duration>30</a:duration>
        <a:exp_pay_managed>0</a:exp_pay_managed>
        <a:exp_signup_email>2</a:exp_signup_email>
        <a:experiment_id>144</a:experiment_id>
        <a:experiment_url />
        <a:experimenter_timeslot>0</a:experimenter_timeslot>
        <a:has_multipart>1</a:has_multipart>
        <a:has_prereqs>0</a:has_prereqs>
        <a:has_rests>0</a:has_rests>
        <a:irb_code>12345678901</a:irb_code>
        <a:irb_expiration_date>2018-06-17T00:00:00</a:irb_expiration_date>
        <a:is_neg_req>0</a:is_neg_req>
        <a:last_activity>2017-09-04T12:25:41</a:last_activity>
        <a:last_timeslot>2017-08-30T10:30:00</a:last_timeslot>
        <a:long_desc>This is a study</a:long_desc>
        <a:multipart_exact>0</a:multipart_exact>
        <a:multipart_max_days>-1</a:multipart_max_days>
        <a:multipart_min_days>-1</a:multipart_min_days>
        <a:multipart_number>1</a:multipart_number>
        <a:neg_req_any>1</a:neg_req_any>
        <a:parent_experiment_id>0</a:parent_experiment_id>
        <a:payment />
        <a:payment_numeric>0.00</a:payment_numeric>
        <a:pi_id>9263</a:pi_id>
        <a:preparation>None</a:preparation>
        <a:prereq_any>0</a:prereq_any>
        <a:previously_approved>1</a:previously_approved>
        <a:private_comments>comments go here</a:private_comments>
        <a:restrictions>None</a:restrictions>
        <a:short_desc>This is a study</a:short_desc>
        <a:show_participants>0</a:show_participants>
        <a:signup_limit>24</a:signup_limit>
        <a:signup_password />
        <a:study_alternative>0</a:study_alternative>
        <a:study_name>The Study Name Goes Here</a:study_name>
        <a:survey_anon_flag>0</a:survey_anon_flag>
        <a:survey_flag>1</a:survey_flag>
        <a:total_credits>8.00</a:total_credits>
        <a:total_parts>4</a:total_parts>
        <a:total_payment />
        <a:total_payment_numeric>0.00</a:total_payment_numeric>
        <a:type>C</a:type>
        <a:usage_limit>10</a:usage_limit>
        <a:valid>1</a:valid>
        <a:web_flag>1</a:web_flag>
      </a:APIStudyInfo>
    </a:Result>
  </SonaGetStudyListByPIResult>
</SonaGetStudyListByPIResponse>