Leave a comment at the end of this page or email contact@krishagni.com
Get Department
openspecimen/rest/ng/departments/{id}
or
openspecimen/rest/ng/departments/name={name}
Use this resource to get department. This API returns the department present in the openSpecimen application of given name and id.
Below are the attributes which need to be sent in the url :
Parameter | Details |
---|---|
id | Department id to fetch the department |
name | Department name to fetch the department |
http[s]:<host>:<port>/openspecimen/rest/ng/department/{id}
or
http[s]:<host>:<port>/openspecimen/rest/ng/department/name={name}
Use this URL to get department by an id in openSpecimen application.
Result:
The response of this request will contains the details of the department.
Below is the example of the get department:
URL |
or
|
Method | GET |
Request | application/json |
Response | { "id" : "1", "name":"Department Of Radiology". "instituteName" : "Institute of Oklahoma" } |
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Department got successfully |
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