Versions Compared

Key

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

GET openspecimen/rest/ng/distribution-protocols

or

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

Use this resource to get all distribution - protocols. This API returns all the distribution - protocols present in the openSpecimen OpenSpecimen application. 

Use HTTP GET method to call this API by passing the below details in JSON format.

...

Below are the attributes which need can to be sent in the request body to filter distribution protocols:

1000
Parameter
Details
queryquery parameter used to match distribution protocols based on title or short title
titletitle parameter used to match distribution protocols based on title
piIduser id of the principal investigator
receivingInstitutename of receiving institute in distribution protocol
cpshort title of collection protocol for which the distribution protocol can be used.
startAtstarting record number to fetch from. By default it will be 0
maxResultsmaximum number of records to fetch. By default it will be

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

or

100
includeStatsboolean value to also get distribution protocol statistics
excludeExpiredDpsboolean value if set true then result will not include expired distribution protocols


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

Use this URL to get distribution - protocols in openSpecimen OpenSpecimen application.

Result:

The response of this request will contains the details of the distribution - protocols.

Below is the example of the get distribution-protocols:

URL

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

or

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

?maxResults={maxResults}

MethodGET
Requestapplication/json

Response

[

0]


[

  {
    "id":

 

1,
    "title": "good distribution protocol",
    "shortTitle": "good",
    "principalInvestigator

{
loginName"admin@admin.com"
domainName"catissue"
}
-
title"DPProtocol"
shortTitle"DP Pro"
irbId"IRB555571"
startDate1402617600000
anticipatedSpecimenCount20
descriptionUrl"www.simplepr.com"
activityStatus"Active"
},
[1]
{
id2
principalInvestigator
{
loginName"admin@admin.com"
domainName"catissue"
}
-
title"CP Protocol"
shortTitle"CP Pro"
irbId"IRB555571"
startDate1402617600000
anticipatedSpecimenCount20
descriptionUrl"www.simplepr.com"
activityStatus"Active"
}

": {
      "id": 3,
      "firstName": "chetan",
      "lastName": "k",
      "loginName": "chetan",
      "domain": "openspecimen",
      "emailAddress": "ck@os.com",
      "instituteName": "Pune Institute",
      "admin": false,
      "instituteAdmin": true,
      "manageForms": true,
      "cpCount": 0,
      "creationDate": 1471977000000
    },
    "startDate": null,
    "endDate": null,
    "defReceivingSiteName": "Shivaji Nagar",
    "distributedSpecimensCount": 0,
    "coordinators": [
      {
        "id": 2,
        "firstName": "Admin",
        "lastName": "Admin",
        "loginName": "admin",
        "domain": "openspecimen",
        "emailAddress": "admin@admin.com",
        "instituteName": "Pune Institute",
        "admin": true,
        "instituteAdmin": false,
        "manageForms": false,
        "cpCount": 0,
        "creationDate": null
      }
    ],
    "instituteName": "Pune Institute",
    "irbId": null,
    "activityStatus": "Active",
    "report": null,
    "distributingSites": {
      "Pune Institute": []
    },
    "extensionDetail": null
  },
  {
    "id": 2,
    "title": "test distribution protocol",
    "shortTitle": "test",
    "principalInvestigator": {
      "id": 5,
      "firstName": "bjarne",
      "lastName": "stroustrup",
      "loginName": "bjarne",
      "domain": "openspecimen",
      "emailAddress": "js@os.com",
      "instituteName": "Mumbai Institute",
      "admin": false,
      "instituteAdmin": false,
      "manageForms": false,
      "cpCount": 0,
      "creationDate": 1471977000000
    },
    "startDate": null,
    "endDate": null,
    "defReceivingSiteName": "Borivali",
    "distributedSpecimensCount": 0,
    "coordinators": [
      {
        "id": 4,
        "firstName": "denis",
        "lastName": "ritche",
        "loginName": "denis",
        "domain": "openspecimen",
        "emailAddress": "dr@os.com",
        "instituteName": "Mumbai Institute",
        "admin": false,
        "instituteAdmin": false,
        "manageForms": false,
        "cpCount": 0,
        "creationDate": 1471977000000
      }
    ],
    "instituteName": "Mumbai Institute",
    "irbId": null,
    "activityStatus": "Active",
    "report": null,
    "distributingSites": {
      "Mumbai Institute": []
    },
    "extensionDetail": null
  }
]

 

 

Error Cases :

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

...