Versions Compared

Key

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

...

URLhttp://<host>:<port>/openspecimen/rest/ng/institutes
MethodPOST
Requestapplication/json
json


Code Block
languagejs
themeEclipse
linenumberstrue
{
    "name": "Bocabio",
    "departments": [
        {
            "name": "Tissue Banking"
        }
    ]
}


Response


Code Block
languagejfx
themeEclipse
linenumberstrue
{
    "id": 3,
    "name": "Bocabio1",
    "activityStatus": "Active",
    "departmentsCount": 0,
    "usersCount": 0,
    "departments":
    [
        {
            "id": 54,
            "name": "Tissue Banking"
      
 }
    ] }


 Error Cases :

code
Applies to
Status Message
200All resourcesInstitute has been created successfully
400All requestsInvalid parameters, e.g  duplicate institute name, blank institute name etc
401All requestsAuthorization failed, user doesn’t have authority
500All requestsInternal server error, encountered server error while performing operations

...