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": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "department",
"attributes": {
"name": "Computer Science"
},
"relationships": {
"parent": {
"data": {
"type": "department",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
}
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "department",
"attributes": {
"name": "Computer Science",
"created_at": "<string>",
"updated_at": "<string>",
"is_root": true
},
"relationships": {
"parent": {
"links": {
"related": "<string>"
},
"meta": {}
},
"children": {
"links": {
"related": "<string>"
},
"meta": {}
}
}
}
}Updates a department’s name following JSON:API specification
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": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "department",
"attributes": {
"name": "Computer Science"
},
"relationships": {
"parent": {
"data": {
"type": "department",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
}
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "department",
"attributes": {
"name": "Computer Science",
"created_at": "<string>",
"updated_at": "<string>",
"is_root": true
},
"relationships": {
"parent": {
"links": {
"related": "<string>"
},
"meta": {}
},
"children": {
"links": {
"related": "<string>"
},
"meta": {}
}
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer token
Department UUID
Show child attributes
"department""department"
department moved to root
Show child attributes
"department""department"
Show child attributes