Versions Compared

Key

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

caTissue REST API

The purpose of this document is to explain the caTissue REST API to be used for communicating with other applications. caTissue expose REST API for performing add/update/search operation on Specimen, SpecimenCollectionGroup and creating aliquots/derivatives for the parent specimen.

Common Characteristics of REST Resources

...

Response 

StatusResponse
201

application/json

{"id":1,"label":"testLabel","className":"Tissue","type":"Not Specified","barcode":"12345","createdDate":"Jul 31, 2013 11:16:14 AM","availableQuantity":2.0,"activityStatus":"Active","isToPrintLabel":false}

403{"error":"User is not authorized to create the specimens"}
500{"error" : "Something went wrong. please try again later"}

You use the following resource path to add/update the Specimen resource. To access a resource, append the resource path to the base URL. For example, to use the specimens resource, access

http[s]://<host>:<port>/catissuecore/rest/specimenscatissuecore/rest/specimens

Updates the specimen object.

Request

MethodURL
PUTcatissuecore/rest/specimens
accept

application/json

{"id":1,"label":"testLabel","className":"Tissue","type":"Not Specified","barcode":"12345","createdDate":"Jul 31, 2013 11:16:14 AM","availableQuantity":2.0,"activityStatus":"Closed","isToPrintLabel":false}

Response 

StatusResponse
201

application/json

{"id":1,"label":"testLabel","className":"Tissue","type":"Not Specified","barcode":"12345","createdDate":"Jul 31, 2013 11:16:14 AM","availableQuantity":2.0,"activityStatus":"Closed","isToPrintLabel":false}

403{"error":"User is not authorized to create the specimens"}
500{"error" : "Something went wrong. please try again later"}


catissuecore/rest/specimens

Retrieves the specimen with given label/bracode

Request

MethodURL
GETcatissuecore/rest/specimens
Parameters

label=label to be searched or

barcode=barcode to be searched

catissuecore/rest/specimens/label=tissue_specimen, this will return the specimen with label "tissue_specimen"

catissuecore/rest/specimens/barcode=23457, this will return the specimen with barcode "23457"

Response 

StatusResponse
200

application/json

{"id":1,"label":"testLabel","className":"Tissue","type":"Not Specified","barcode":"12345","createdDate":"Jul 31, 2013 11:16:14 AM","availableQuantity":2.0,"activityStatus":"Active","isToPrintLabel":false}

500{"error" : "Something went wrong. please try again later"}


catissuecore/rest/specimens/{label}/aliquots

This will create aliquots for the specified specimen label.

Request

MethodURL
POSTcatissuecore/rest/specimens/{label}/aliquots
accept

application/json

Response 

StatusResponse
200 application/json
403{"error":"User doesn't have specimen processing privileges"}
500{"error" : "Something went wrong. please try again later"}


catissuecore/rest/specimens/{label}/derivatives

This will create derivative for the specified specimen label.

Request

MethodURL
POSTcatissuecore/rest/specimens/{label}/derivatives
accept

application/json

Response 

StatusResponse
200 application/json
403{"error":"User doesn't have specimen processing privileges"}
500{"error" : "Something went wrong. please try again later"}

Specimen Collection Group Resource

catissuecore/rest/groups

Creates the specimen collection group.

Request

MethodURL
POSTcatissuecore/rest/groups 
accept

application/json

Response 

StatusResponse
200 application/json
403{"error":"User doesn't have privileges to create Specimen collection group"}
500{"error" : "Something went wrong. please try again later"}

catissuecore/rest/groups

updates the specimen collection group.

Request

MethodURL
PUTcatissuecore/rest/groups 
accept

application/json

Response 

StatusResponse
200 application/json
403{"error":"User doesn't have privileges on this Specimen collection group"}
500{"error" : "Something went wrong. please try again later"}

catissuecore/rest/groups

Retrieves the specimen collection group with the name.

Request

MethodURL
GETcatissuecore/rest/groups 
parameterstitle: the specimen collection group will searched on the basis of title.

catissuecore/rest/groups/title=scg1, this will search for the collection group having title as "scg1"

Response 

StatusResponse
200 application/json
404{"error" : "No group found with title '<title-name>'"}
500{"error" : "Something went wrong. please try again later"}