We can export specimen form data using APIs.
API Details
Method |
|
URI |
|
Payload | { "objectType": "extensions", "params": { "entityType": "Specimen", "formName": "<FORM_NAME>", "cpId": <CP_ID> } } |
Parameter Details
| Name of the form that you want to export the data. |
| Collection protocol ID. |
Example -
Request Payload:-
{ "objectType": "extensions", "params": { "entityType": "Specimen", "formName": "techSpecimenForm", "cpId": 3513 } }
Response Payload
{ "id": 4878, "name": "extensions", "status": "COMPLETED", "totalRecords": null, "createdBy": { "id": 5413, "type": "SUPER", "firstName": "System", "lastName": "Administrator", "loginName": "admin", "domain": "openspecimen", "emailAddress": "admin@localhost", "instituteId": 1, "instituteName": "Biobank Institute", "primarySite": "Biobank_Site_1", "admin": true, "instituteAdmin": false, "manageForms": true, "cpCount": 0, "creationDate": 1608625532000, "activityStatus": "Active" }, "creationTime": 1633773235491, "endTime": 1633773235535, "params": { "timeZone": "Asia/Kolkata", "entityType": "Specimen", "cpId": "3513", "formName": "techSpecimenForm" } }
Enter the id from the above response in the below URL. Send the request. Save response in the file.
Method |
|
URI |
|
E.g.
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Speciemen form data exported successfully. |
400 | All requests | Invalid parameters.(Invalid form name, CP_ID, JOB_ID etc) |
401 | All requests | Authorization failed, user doesn't have Authority |
500 | All requests | Internal server error, Encountered server error while performing operations |