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

Version 1 Next »

openspecimen/rest/ng/collection-protocols

or

openspecimen/rest/ng/collection-protocols?searchString={searchString}

or

openspecimen/rest/ng/collection-protocols?maxResults={maxResults}

or

openspecimen/rest/ng/collection-protocols?searchString={searchString}&maxResults={maxResults}

Use this resource to get All CPs. User can also specify the search string which will be used to match the shot titles. 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
searchStringString for search condition to get the CPs
maxResultsInteger value to get maximum records. By default it will be 1000


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

or

http[s]:<host>:<port>/openspecimen/rest/ng/collection-protocols?searchString={searchString}

or

http[s]:<host>:<port>/openspecimen/rest/ng/collection-protocols?maxResults={maxResults}

or

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


Use this URL to get CPs in openSpecimen application.

Result:

The response of this request will contains the details of the CPs.

Below is the example of the get CPs:

URLhttp://<host>:<port>/openspecimen/rest/ng/collection-protocols?maxResults=2&searchString=s
MethodGET
Requestapplication/json

Response

[{
id1
shortTitle"SCS_CP"
title"skinCancerStudy"
ppidFormat" "
} { 
id63 
shortTitle"scg1" 
title"scg1" 
ppidFormatnull
}
]
URLhttp://<host>:<port>/openspecimen/rest/ng/collection-protocols?searchString=s
MethodGET
Requestapplication/json

Response

[{
id1
shortTitle"SCS_CP"
title"skinCancerStudy"
ppidFormat" "
} { 
id63 
shortTitle"scg1" 
title"scg1" 
ppidFormatnull
} { 
id83 
shortTitle"SP test" 
title"SP test" 
ppidFormat" "
} { 
id101 
shortTitle"SuperTest" 
title"SuperTest" 
ppidFormat" "
} { 
id102 
shortTitle"Super2" 
title"SuperTest2" 
ppidFormat" "
} { 
id113 
shortTitle"Southern Health Protocol" 
title"Southern Health Protocol" 
ppidFormat""SHP%05d",PPID"
}{ 
id121 
shortTitle"St Vincent Protocol" 
title"St Vincent Protocol" 
ppidFormat" "
} { 
id126 
shortTitle"SCS_CPa1" 
title"skinCancerStudy2" 
      ppidFormat" "
}]

 

 

 

Error Cases :

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