GET child weight by ID - ocariot/api-gateway GitHub Wiki
Description
Retrieves a weight measurement data associated with a Child.
Permissions:
-
Admin and Application users can list any Weight of any Child.
-
A Child can list any Weight as long as it is yours.
-
An Educator as well as a Health Professional can list any Weight of any Child as long as the Child belongs to one of their groups.
-
A Family user can list any Weight of any Child associated with it.
Scope
measurements:read
URL
GET https://localhost/v1/children/{child_id}/weights/{weight_id}
Parameters
child_id: string (A 24-byte hex ID)
weight_id: string (A 24-byte hex ID)
Curl example
curl -X GET "https://localhost/v1/children/5a62be07d6f33400146c9b61/weights/5c5277b8004ce629c1eef323" -H "accept: application/json" -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response body
-
200
Successful requisition.{ "id": "5a62be07de34500146d9c544", "timestamp": "2019-06-20T14:40:00Z", "value": 70.2, "unit": "kg", "body_fat": 20.1, "child_id": "5a62be07de34500146d9c544" }
-
400
Validation errors -
403
Permission Error -
404
Not Found Error