PATCH
/
api
/
v1
/
departments
/
{id}
Update a department
curl --request PATCH \
  --url https://api.scholarlysoftware.com/api/v1/departments/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
  "data": {
    "type": "department",
    "id": "<string>",
    "attributes": {
      "name": "<string>"
    },
    "relationships": {
      "parent": {
        "data": {
          "type": "department",
          "id": "<string>"
        }
      }
    }
  }
}'
{
  "data": {
    "id": "<string>",
    "type": "department",
    "attributes": {
      "name": "<string>",
      "created_at": "<string>",
      "updated_at": "<string>",
      "is_root": true
    },
    "relationships": {
      "institution": {
        "links": {
          "related": "<string>"
        }
      },
      "parent": {
        "links": {
          "related": "<string>"
        }
      },
      "children": {
        "links": {
          "related": "<string>"
        }
      }
    },
    "links": {
      "self": "<string>"
    },
    "meta": {
      "children_count": 123,
      "depth": 123,
      "root": true
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer token

Path Parameters

id
string
required

Department UUID

Body

application/vnd.api+json

Response

200
application/vnd.api+json

department moved to root

The response is of type object.