Leave a comment at the end of this page or email contact@krishagni.com
Delete Container Type
openspecimen/rest/ng/container-types/{container_type_Id}
Use this resource to delete container type in the OpenSpecimen application. Use HTTP DELETE method to call this api by passing the below details in JSON format.
If there are any dependencies exist on deleting type then api will return list of dependencies. For example it will return count of containers of deleting container type, in this case you can not delete type until all its dependencies get deleted.
Below are the attributes which need to be sent as a request parameter
Parameter | Details |
---|---|
id | Container type identifier |
http://<host>:<port>/openspecimen/rest/ng/container-types/1
Use this URL to delete container type in the OpenSpecimen application.
Result:
The response of this request will contains the details of the deleted container type
Below is the example to delete container type:
URL | http://<host>:<port>/ openspecimen/rest/ng/container-types/1 |
Method | DELETE |
Response | { "id": 1, "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 |
---|---|---|
200 | All resources | Container type has been deleted successfully |
404 | All requests | Container type with given identifier not found. |
401 | All requests | Authorization failed, user doesn’t have authority |
500 | All requests | Internal server error, encountered server error while performing operations |
Leave a comment at the end of this page or email contact@krishagni.com