Versions Compared

Key

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

openspecimen/rest/ng/collection-protocols/{id}

or

openspecimen/rest/ng/collection-protocols/title={title}

or

openspecimen/rest/ng/collection-protocols/shortTitle={shortTitle}

Use this resource to get collection protocol. This API returns the collection protocol present in the openSpecimen application of given name and id. 

Below are the attributes which need to be sent in the URL:

CP shortTitle to fetch the CP
Parameter
Details
idCP Collection protocol id to fetch the CP
titleCP title to fetch the CP
shortTitlecollection protocol


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

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

or

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

Use this URL to get collection protocol by an id in openSpecimen application

Result:

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

Below is the example of the get collection protocol:

URL

http://<host>:<port>/openspecimen/rest/ng/collection-protocols/1

or

http://<host>:<port>/openspecimen/rest/ng/collection-protocols/title= skinCancerStudy 

or

http://<host>:<port>/openspecimen/rest/ng/collection-protocols/shortTitle=SCS_CP

MethodGET
Requestapplication/json

Response


Code Block
languagejs
themeEclipse
{
id1
title"skinCancerStudy"
shortTitle"SCS_CP"
cpType"Parent"
startDatenull
endDate"1995-10-01"
activityStatus"Active"
labelFormatnull
derivedLabelFormatnull
aliquotLabelFormatnull
ppIdFormat" "
investigator
{
loginName"admin@admin.com"
domainName"catissue"
}
-
cpSiteRoles
[
0]
}
 
linenumberstrue
{
	"id": 1,
    "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,
    "ppidFmt": "",
    "manualPpidEnabled": false
}



Error Cases :

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