Versions Compared

Key

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

openspecimen/rest/ng/institutes/{instIdid}

or

openspecimen/rest/ng/institutes/byname?name={name}

 

Use this resource to get institute . This API returns the institute present in the openSpecimen application of given name and id. 

Below are the attributes which need to be sent in the url :

Parameter
Details
instIdidInstitute id to fetch the institute
nameInstitute name to fetch the institute

...

http[s]:<host>:<port>/openspecimen/rest/ng/institutes/{instIdid}

or

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


Use this URL to get institute by an id in openSpecimen application.

...

URL

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

or

http://<host>:<port>/openspecimen/rest/ng/institutes/byname?name=Institute of OklahomaBocabio

MethodGET
Requestapplication/json

Response

Code Block
languagejs
themeEclipse

{

    "id" : "1",

    "name":"Institute of Oklahoma"

linenumberstrue
{
    "id": 1,
    "name": "Bocabio",
    "activityStatus": "Active",
    "departmentsCount": 0,
    "usersCount": 0,
    "departments":
    [
        {
            "id": 47,
            "name": "Tissue Banking"
        }
    ]
}

 

Error Cases :

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