Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Get All Distribution Protocols

GET openspecimen/rest/ng/distribution-protocols

Use this resource to get all distribution protocols. This API returns all the distribution 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 can to be sent in the request body to filter distribution protocols:

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 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

Use this URL to get distribution protocols in 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

MethodGET
Requestapplication/json

Response

[
  {
    "id": 1,
    "title": "good distribution protocol",
    "shortTitle": "good",
    "principalInvestigator": {
      "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
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com