Ignore:
Timestamp:
Mar 28, 2012, 12:55:20 PM (10 years ago)
Author:
work@…
Message:

fixed getSubjectsForStudy api method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/api/index.gsp

    r2183 r2184  
    55<body>
    66<h1>API specification</h1>
     7
     8The API allows third party software to interface with GSCF and connected modules.
     9
     10<h2>prerequisites</h2>
     11    <li>a valid username / password</li>
     12    <li>the username should be given the role ROLE_CLIENT</li>
     13    <li>a shared secret</li>
     14    <li>a deviceID / clientID (look <a href="https://github.com/4np/UIDevice-with-UniqueIdentifier-for-iOS-5" target="_new">here</a> for iOS)</li>
     15
    716<h1>authenticate</h1>
    817<p>
     
    107116</p>
    108117
    109 <h1>getAssaysForStudy</h1>
     118<h1>getSubjectsForStudy</h1>
    110119<p>
    111     bla
     120    Returns the subjects for a particular study
     121
     122    <h2>Request parameters</h2>
     123    <table>
     124        <thead>
     125            <th>argument</th>
     126            <th>type</th>
     127            <th>length</th>
     128            <th>description</th>
     129            <th>example</th>
     130            <th>required</th>
     131        </thead>
     132        <tr>
     133            <td>deviceID</td>
     134            <td>string</td>
     135            <td>36 (max)</td>
     136            <td>a unique ID of the client device / application performing the call</td>
     137            <td>9ae87836-d38d-4b86-be6a-eff93f2b049a</td>
     138            <td>yes</td>
     139        </tr>
     140        <tr>
     141            <td>validation</td>
     142            <td>string</td>
     143            <td>-</td>
     144            <td><a href="http://www.miraclesalad.com/webtools/md5.php" target="_new">md5sum</a>( token + sequence + shared secret )</td>
     145            <td>9ae87836d38d4b86be6aeff93f2b049a</td>
     146            <td>yes</td>
     147        </tr>
     148        <tr>
     149            <td>studyToken</td>
     150            <td>string</td>
     151            <td>255</td>
     152            <td>study token (see getStudies)</td>
     153            <td>b6e0c6f4-d8db-4a43-91fa-a157d2d492f0</td>
     154            <td>yes</td>
     155        </tr>
     156    </table>
     157
     158    <h2>example reply</h2>
     159    <blockquote>
     160        {"count":11,"subjects":[{"id":81,"name":"1","species":"Homo sapiens","Gender":"Female","Age":null,"DOB":null,"Height":null,"Weight":null,"BMI":null,"Race":null,"Waist circumference":null,"Hip circumference":null,"Systolic blood pressure":null,"Diastolic blood pressure":null,"Heart rate":null,"Run-in-food":null},{"id":82,"name":"2","species":"Homo sapiens","Gender":"Male","Age":null,"DOB":null,"Height":null,"Weight":null,"BMI":null,"Race":null,"Waist circumference":null,"Hip circumference":null,"Systolic blood pressure":null,"Diastolic blood pressure":null,"Heart rate":null,"Run-in-food":null},{"id":83,"name":"3","species":"Homo sapiens","Gender":"Female","Age":null,"DOB":null,"Height":null,"Weight":null,"BMI":null,"Race":null,"Waist circumference":null,"Hip circumference":null,"Systolic blood pressure":null,"Diastolic blood pressure":null,"Heart rate":null,"Run-in-food":null},{"id":84,"name":"4","species":"Homo sapiens","Gender":"Male","Age":null,"DOB":null,"Height":null,"Weight":null,"BMI":null,"Race":null,"Waist circumference":null,"Hip circumference":null,"Systolic blood pressure":null,"Diastolic blood pressure":null,"Heart rate":null,"Run-in-food":null},{"id":85,"name":"5","species":"Homo sapiens","Gender":"Female","Age":null,"DOB":null,"Height":null,"Weight":null,"BMI":null,"Race":null,"Waist circumference":null,"Hip circumference":null,"Systolic blood pressure":null,"Diastolic blood pressure":null,"Heart rate":null,"Run-in-food":null},{"id":86,"name":"6","species":"Homo sapiens","Gender":"Male","Age":null,"DOB":null,"Height":null,"Weight":null,"BMI":null,"Race":null,"Waist circumference":null,"Hip circumference":null,"Systolic blood pressure":null,"Diastolic blood pressure":null,"Heart rate":null,"Run-in-food":null},{"id":87,"name":"7","species":"Homo sapiens","Gender":"Male","Age":null,"DOB":null,"Height":null,"Weight":null,"BMI":null,"Race":null,"Waist circumference":null,"Hip circumference":null,"Systolic blood pressure":null,"Diastolic blood pressure":null,"Heart rate":null,"Run-in-food":null},{"id":88,"name":"8","species":"Homo sapiens","Gender":"Male","Age":null,"DOB":null,"Height":null,"Weight":null,"BMI":null,"Race":null,"Waist circumference":null,"Hip circumference":null,"Systolic blood pressure":null,"Diastolic blood pressure":null,"Heart rate":null,"Run-in-food":null},{"id":89,"name":"9","species":"Homo sapiens","Gender":"Male","Age":null,"DOB":null,"Height":null,"Weight":null,"BMI":null,"Race":null,"Waist circumference":null,"Hip circumference":null,"Systolic blood pressure":null,"Diastolic blood pressure":null,"Heart rate":null,"Run-in-food":null},{"id":90,"name":"10","species":"Homo sapiens","Gender":"Male","Age":null,"DOB":null,"Height":null,"Weight":null,"BMI":null,"Race":null,"Waist circumference":null,"Hip circumference":null,"Systolic blood pressure":null,"Diastolic blood pressure":null,"Heart rate":null,"Run-in-food":null},{"id":91,"name":"11","species":"Homo sapiens","Gender":"Female","Age":null,"DOB":null,"Height":null,"Weight":null,"BMI":null,"Race":null,"Waist circumference":null,"Hip circumference":null,"Systolic blood pressure":null,"Diastolic blood pressure":null,"Heart rate":null,"Run-in-food":null}]}
     161    </blockquote>
    112162</p>
    113163</body>
Note: See TracChangeset for help on using the changeset viewer.