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/departments/{deptId}

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
deptIdDepartment id to fetch the department
nameDepartment name to fetch the department


http[s]:<host>:<port>/openspecimen/rest/ng/department/{deptId}

or

http[s]:<host>:<port>/openspecimen/rest/ng/department/name={name}


Use this URL to get institute 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

http://<host>:<port>/openspecimen/rest/ng/departments/1

or

http://<host>:<port>/openspecimen/rest/ng/department/name=Department Of Radiology

MethodGET
Requestapplication/json

Response

{

    "id" : "1",

    "name":"Department Of Radiology".

    "instituteName" : "Institute of Oklahoma"

}

 

Error Cases :

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