-
Notifications
You must be signed in to change notification settings - Fork 1
GET child sleep by ID
JeffMedeiros edited this page Dec 2, 2019
·
3 revisions
Retrieves a sleep data associated with a Child.
GET https://localhost:4001/v1/children/{child_id}/sleep/{sleep_id}
child_id: string (A 24-byte hex ID)
sleep_id: string (A 24-byte hex ID)
curl -X GET "https://localhost:4001/v1/children/5a62be07d6f33400146c9b61/sleep/3bc1274329fb282470e45004" -H "accept: application/json"
-
200
Successful requisition.{ "id": "3bc1274329fb282470e45004", "start_time": "2019-08-18T01:40:30Z", "end_time": "2019-08-18T09:52:30Z", "duration": 29520000, "type": "classic", "pattern": { "data_set": [ { "start_time": "2019-08-18T01:40:30.00Z", "name": "restless", "duration": 60000 }, { "start_time": "2019-08-18T01:41:30.00Z", "name": "asleep", "duration": 360000 }, { "start_time": "2019-08-18T01:47:30.00Z", "name": "restless", "duration": 240000 }, { "start_time": "2019-08-18T01:51:30.00Z", "name": "asleep", "duration": 60000 }, { "start_time": "2019-08-18T02:32:30.00Z", "name": "awake", "duration": 180000 }, { "start_time": "2019-08-18T06:47:30.00Z", "name": "restless", "duration": 60000 }, { "start_time": "2019-08-18T06:48:30.00Z", "name": "asleep", "duration": 2580000 }, { "start_time": "2019-08-18T07:31:30.00Z", "name": "restless", "duration": 120000 }, { "start_time": "2019-08-18T09:36:30.00Z", "name": "asleep", "duration": 960000 } ], "summary": { "asleep": { "count": 4, "duration": 3960000 }, "awake": { "count": 1, "duration": 180000 }, "restless": { "count": 4, "duration": 480000 } } }, "child_id": "5a62be07de34500146d9c544" }
-
400
Validation errors -
404
Not Found Error
OCARIoT IoT Tracking Microservice API (Full documentation)
- POST children.physicalactivities
- GET children.physicalactivities
- GET children.physicalactivities.activity_id
- DELETE children.physicalactivities.activity_id
- POST children.weights
- GET children.weights
- GET children.weights.weight_id
- DELETE children.weights.weight_id
- POST children.bodyfats
- GET children.bodyfats
- GET children.bodyfats.bodyfat_id
- DELETE children.bodyfats.bodyfat_id