Versions Compared

Key

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

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