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

Version 1 Next »

openspecimen/rest/ng/specimens

or

openspecimen/rest/ng/specimens?start={start}&max={maxResults}&searchString={searchString}&countReq={true/false}

Use this resource to get specimens. This API returns all the matching specimens based on the searchString,  if searchString not specified then it returns all the specimens 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 need to be sent in the request body:

Parameter
Details
searchString [optional]The value with which you want to search the Specimen. The given value will be matched with Label and Barcode.
start [optional]start index of the results
maxResults [optional]Maximum number of records to fetch. By default it will be 100
countReq [optional]Set this parameter to true, if want to get the total count of matching results.


http[s]:<host>:<port>/openspecimen/rest/ng/specimens

 

Use this URL to get users in openSpecimen application.

Result:

The response of this request will contains the details of the specimens.

Below is the example of the get specimens:

URLhttp://<host>:<port>/openspecimen/rest/ng/specimens?searchString=Tissue1
MethodGET
Requestapplication/json

Response

[{ "activityStatus" : "Active",

  "barcode" : "",

  "biohazardDetails" : [  ],

  "collectionStatus" : "Collected",

  "comment" : "creating an adhoc specimen.",

  "createdOn" : "2014-02-21",

  "externalIdentifierDetails" : [  ],

  "id" : 2,

  "initialQuantity" : 2.0,

  "label" : "Tissue1",

  "lineage" : "New",

  "pathologicalStatus" : "Metastatic",

  "scgId" : 1,

  "specimenClass" : "Tissue",

  "specimenType" : "Fixed Tissue",

  "tissueSide" : "Left",

  "tissueSite" : "Nasal cavity"

}]

 

 

Error Cases :

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