Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

openspecimen/rest/ng/collection-protocols

or

openspecimen/rest/ng/collection-protocols?start={start}&max={maxResults}&query={searchString}&countReq={true/false}

Use this resource to get collection protocols. This API returns all the matching collection protocols based on the searchString,  if searchString not specified then it returns all the collection protocols present in the openSpecimen application.

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
searchString [optional]The value with which you want to search the collection protocol. The given value will be matched with Title and Short Title.
start [optional]start index of the results
maxResults [optional]Maximum number of records to fetch. By default it will be 1000
countReq [optional]Set this parameter to true, if want to get the total count of matching results.

 

http[s]:<host>:<port>/openspecimen/rest/ng/collection-protocols

or

http[s]:<host>:<port>/openspecimen/rest/ng/collection-protocols?start={start}&max={maxResults}&searchString={searchString}&countReq={true/false}


Use this URL to get collection protocols in openSpecimen application.

Result:

The response of this request will contains the details of the collection protocols.

Below is the example of the get all collection protocols:

URLhttp://<host>:<port>/openspecimen/rest/ng/collection-protocols?searchString=skinCancerStudy
MethodGET
Requestapplication/json

Response

[{
id1
shortTitle"SCS_CP"
title"skinCancerStudy"
ppidFormat" "
}] 

 

 

Error Cases :

code
Applies to
Status Message
200All resourcesCollection protocols got successfully
401All requestsAuthorization failed, user doesn’t have authority
500All requestsInternal server error, encountered server error while performing operations
  • No labels