Specimen details provided multiple parameters.
GET openspecimen/rest/ng/specimens?label={label1}&label={label2}&cprId={cprId}&eventId={eventId}&visitId={visitId}
Use this resource to get specimens with specific parameters. This API returns all the matching specimens based on the parameters provided.
Use HTTP GET method to call this API by passing the below details in JSON format.
Below are the attributes which need to be sent in the request body:
Parameter | Details |
---|---|
label [optional] | The label of the specimen which you want. Users can search for multiple specimens by providing multiple label values in URL query string |
cprId [optional] | Collection Protocol Registration ID of that specimen. |
eventId [optional] | Event ID of the anticipated specimen. Either this parameter or visitId parameter needs to be provided when searching based on cprId. |
visitId [optional] | Visit ID under which the specimen is collected. Either this parameter or eventId parameter needs to be provided when searching based on cprId. |
The response of this request will contain the details of the specimens. Below is the example of the get specimens:
Specimen custom fields provided the specimen label.
GET openspecimen/rest/ng/specimens?label={label}&exactMatch=true&includeExtensions=true
Use this resource to get a specimen custom field by providing the specimen label. Specimen custom field details will be found under the 'extensionDetail' element.
Specimen details provided specimen id.
GET openspecimen/rest/ng/specimens/{specimen_id}
Use this resource to get specimen details by specimen id.
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Specimens got successfully |
401 | All requests | Authorization failed, the user doesn’t have authority |
500 | All requests | Internal server error, encountered server error while performing operations |