cURL
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 } } }
Updates a department’s name following JSON:API specification
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Bearer token
Department UUID
department moved to root
The response is of type object.
object