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

openspecimen/rest/ng/container-types

Use this resource to update container type in the OpenSpecimen application. Use HTTP PUT 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:

ParameterDetail
nameContainer type name. Should be unique
nameFormatContainer Naming format. Please refer https://openspecimen.atlassian.net/wiki/x/a4CB for available tokens.
noOfRowsNumber of rows
noOfColumnsNumber of columns
rowLabelingScheme

Row labeling scheme, by default it will be Numbers.

Available permissible values are :

{Numbers, Alphabets Upper Case, Alphabets Lower Case, Roman Upper Case, Roman Lower Case}

columnLabelingScheme

Column labeling scheme, by default it will be Numbers.

Available permissible values are :

{Numbers, Alphabets Upper Case, Alphabets Lower Case, Roman Upper Case, Roman Lower Case}

temperatureTemperature of container
storeSpecimenEnabledCan store specimens in container of this type. Either true or false
canHoldCan hold container type detail. Ex: 'Freezer' can hold 'Rack', 'Rack' can hold 'Box'

 

http[s]:<host>:<port>/openspecimen/rest/ng/container-types/<id>

Use this url to update container type.

Below is the example of the create container type:

URLhttp://<host>:<port>/openspecimen/rest/ng/container-types/1
MethodPUT
Requestapplication/json
json
{
  "name":"Freezer",
  "nameFormat":"F-%SITE_UID%",
  "noOfRows":"5",
  "noOfColumns":"5",
  "rowLabelingScheme":"Numbers",
  "columnLabelingScheme":"Numbers",
  "temperature":"-80",
  "storeSpecimenEnabled":false,
  "canHold":{
    "id":2,
    "name":"Rack"
   }
}

Response

{
  "id": 13,
  "name": "Freezer",
  "nameFormat": "F-%SITE_UID%",
  "noOfColumns": 5,
  "noOfRows": 5,
  "columnLabelingScheme": "Numbers",
  "rowLabelingScheme": "Numbers",
  "temperature": -80,
  "storeSpecimenEnabled": false,
  "activityStatus": "Active",
  "canHold": {
    "id": 2,
    "name": "Rack",
    "nameFormat": "%PCONT_NAME%-RK-%PCONT_UID%",
    "noOfColumns": 10,
    "noOfRows": 10,
    "columnLabelingScheme": "Numbers",
    "rowLabelingScheme": "Numbers",
    "temperature": -90,
    "storeSpecimenEnabled": true,
    "activityStatus": "Active"
  }
}

 

 Error Cases :

 

code
Applies to
Status Message
200All resourcesContainer type has been updated successfully
400All requestsInvalid parameters, e.g  duplicate event label, blank event label etc
401All requestsAuthorization failed, user doesn’t have authority
500All requestsInternal server error, encountered server error while performing operations
  • No labels