DELETE sleep by ID - ocariot/api-gateway GitHub Wiki
Description
Deletes a sleep data associated with a Child.
Permissions:
-
An Application can delete any Sleep of any Child.
-
An Educator can delete any Sleep from any Child as long as the Child belongs to one of their groups.
-
A Family user can delete any Sleep of any Child associated with it.
Scope
sleep:delete
URL
DELETE https://localhost/v1/children/{child_id}/sleep/{sleep_id}
Parameters
child_id: string (A 24-byte hex ID)
sleep_id: string (A 24-byte hex ID)
Curl example
curl -X DELETE "https://localhost/v1/children/5a62be07d6f33400146c9b61/sleep/3bc1274329fb282470e45004" -H "accept: /" -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response body
-
204
Operation performed successfully. There is no data to be returned. -
400
Validation errors -
403
Permission Error