Versions Compared

Key

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

catissuecoreopenspecimen/rest/ng/collection-protocols

Use this resource to create new collection protocol in the caTissue openSpecimen application. Use HTTP POST 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
title Collection Collection protocol title.Unique in the application
shortTitle

Collection protocol short title. Unique in the application

startDateCollection protocol starting date
endDateCollection protocol end date
principalInvestigatorId

Principal investigator on CP

Mainly contains following  parameters :

loginName :  User login name. For this specified user must be present in application.

domainName: Name of domain to which user belongs to. By default it will be catissue.

cpSiteRoles

It is collection of Sites and Roles with respect to CP. By default it will be none. i.e. Blank collection.

Mainly contains following  parameters :

roleName :  Role of user like Scientist, Admin etc. For this attribute role must be present in application.

siteName: Site name. For this attribute Site must be present in application.

 


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

Use this URL to add collection protocol in caTissue openSpecimen application.

Result:

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

Below is the example of the create collection protocol:

URLhttp://<host>:<port>/catissuecoreopenspecimen/rest/ng/collection-protocols
MethodPOST
Requestapplication/json
json

{

    "title":"My Cp",

    "shortTitle": "CpM",

    "startDate" :  "2014-07-23",

    "endDate" : "2018-07-23",

    "principalInvestigator" : {"loginName" : "admin@admin.com", "domainName" :"catissue"},

    "cpSiteRoles" : {

        "siteName" : "My Site",

        "roleName" : "Scientist"

    }

}

Response

{

    "id" : 1,

    "title":"My Cp",

    "shortTitle": "CpM",

    "startDate" :  "2014-07-23",

    "endDate" : "2018-07-23",

    "principalInvestigator" : {"loginName" : "admin@admin.com", "domainName" :"catissue"},

    "cpSiteRoles" : {

        "id" : 1,

        "siteName" : "My Site",

        "roleName" : "Scientist"

    }

}

...

code
Applies to
Status Message
200All resourcesCollection Protocol has been created successfully
400All requestsInvalid parameters, e.g  duplicate CP Titletitle, blank CP Title title etc
401All requestsAuthorization failed, User user doesn’t have Authorityauthority
500All requestsInternal server error, Encountered encountered server error while performing operations