openspecimen/rest/ng/visits?cprId=3
Use this resource to get specimen collection groups. This API returns all visits for the given registration id.
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 |
---|---|
cprId | Identifier of the collection protocol registration. |
http[s]:<host>:<port>/openspecimen/rest/ng/visits?cprId=2
Use this URL to get specimen collection groups in openSpecimen application.
Result:
The response of this request will contains the details of the specimen collection groups.
Below is the example of the get specimen collection groups:
URL | http://<host>:<port>/openspecimen /rest/ng/visits?cprId=3 |
Method | GET |
Request | application/json |
Response | [{ "id":1, "eventId":7, "name":"Test1234_Initial Visit_1", "eventLabel":"Initial Visit", "eventPoint":0, "status":"Complete", "visitDate":1432013976000, "anticipatedVisitDate":1431921600000, "anticipatedSpecimens":1, "collectedSpecimens":2, "uncollectedSpecimens":1, "unplannedSpecimens":1, }] |
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Specimen collection groups got successfully |
401 | All requests | Authorization failed, user doesn’t have authority |
500 | All requests | Internal server error, encountered server error while performing operations |