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 8 Next »

http[s]:<host>:<port>/openspecimen/rest/ng/distributionprotocols/title={distributionprotocolTitle}

or

http[s]:<host>:<port>/openspecimen/rest/ng/distributionprotocols/{distributionprotocolId}

Use this resource to patch distribution protocol in the openSpecimen application. Use HTTP PATCH 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
principalInvestigatorName of investigator
titleTitle of distribution protocol
shortTitleShort Title of distribution protocol
irbId [optional]IRB ID of of distribution protocol
startDateStarting date of distribution protocol
anticipatedSpecimenCountTotal count of specimen
descriptionUrl [optional]

URL of distribution protocol description

activityStatus

Defines the status of a Distribution protocol record

{active, closed, pending, disabled}

http[s]:<host>:<port>/openspecimen/rest/ng/distributionprotocols/title={distributionprotocolTitle}

or

http[s]:<host>:<port>/openspecimen/rest/ng/distributionprotocols/{distributionprotocolId}

Use this URL to update distribution protocol in openSpecimen application.

Result:

The response of this request will contains the details of the patch distribution protocol.

Below is the example of the update distribution protocol:

 

URL

http[s]:<host>:<port>/openspecimen/rest/ng/distributionprotocols/title={distributionprotocolTitle}

or

http[s]:<host>:<port>/openspecimen/rest/ng/distributionprotocols/{distributionprotocolId}

MethodPUT
Requestapplication/json
json

{

"activityStatus" : "Active"

}

Response

{
id20
principalInvestigator
{
loginName"admin@admin.com"
domainName"catissue"
}
-
title"DP Protocol"
shortTitle"DP Pro"
irbId"IRB555571"
startDate"2014-06-13"
anticipatedSpecimenCount20
descriptionUrl"www.simplepr.com"
activityStatus"Active"
}

 

Error Cases :

code
Applies to
Status Message
200All resourcesDistribution Protocol has been patch successfully
400All requestsInvalid parameters, e.g  duplicate Protocol Name, blank Protocol Name etc
401All requestsAuthorization failed, User doesn't have Authority
500All requestsInternal server error, Encountered server error while performing operations
  • No labels