Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

openspecimen/rest/ng/collection-protocols

or

openspecimen/rest/ng/collection-protocols?query={searchString}&title={title}&piId={searchString}

or

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

or

openspecimen/rest/ng/collection-protocols?searchString={searchString}&maxResults={maxResultspiId}&repositoryName={repositoryName}&startAt={start}&max={maxResults}&detailedList={true/false}

Use this resource to get All CPs. User can also specify the search string which will be used to match the shot titles. 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 String for search condition to get the CPsmaxResultsInteger value to get maximum records[optional]The value with which you want to search the collection protocol. The given value will be matched with Title and Short Title.
title[optional]Collection Protocol title or short title
piId[optional]Id of principal investigator
repositoryName[optional]Name of repository
startAt [optional]start index of the results
maxResults [optional]Maximum number of records to fetch. By default it will be 1000

...

detailedList [

...

optional]Set this parameter to true, if want to collection protocol in detail

 

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

or

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

or

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


Use this URL to get CPs collection protocols in openSpecimen application.

...

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

Below is the example of the get CPsall collection protocols:

[{
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" "
}]

 

URLhttp://<host>:<port>/openspecimen/rest/ng/collection-protocols?maxResultsquery=2vcb&searchStringdetailedList=strue
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

 

 

Code Block
languagejs
themeEclipse
linenumberstrue
[
    {
        "id": 29,
        "shortTitle": "VCB Collection",
        "title": "VCB Collection",
        "code": null,
        "principalInvestigator": {
            "id": 104,
            "firstName": "Paleracio",
            "lastName": "Nina",
            "loginName": "ninapaleracio",
            "domain": null,
            "emailAddress": null,
            "admin": null,
            "cpCount": 0,
            "creationDate": null
        },
        "startDate": 1435602600000,
        "endDate": null,
        "participantCount": 3,
        "specimenCount": 34,
        "ppidFmt": "",
        "manualPpidEnabled": false
    }
]

 

 

Error Cases :

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