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 all the institute present in the . User can also specify the search string which will be used to match the values.

Use HTTP GET method to call this API by passing the below details in JSON format.

openSpecimen application of given name and id. 

Below are the attributes which need to be sent in the request bodyurl :

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


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

or

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


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

Result:

The response of this request will contains the details of the institute.

Below is the example of the get institute:

URL

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

or

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

MethodGET
Requestapplication/json

Response

   
Code Block
languagejs
themeEclipse

{

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

 

Error Cases :

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