Skip to content

GET child logs by resource

Jefferson Medeiros edited this page Jan 28, 2020 · 4 revisions

Description

Retrieves logs with information on the total steps, calories, active_minutes, lightly_active_minutes or sedentary_minutes of a Child in a given period.

The sedentary_minutes are calculated by movement, and you need to be inactive for 10 consecutive minutes before the period is considered stationary. The lightly_active_minutes field represents minutes of light activites. The active_minutes represent field represents minutes of fairly active and very active activities.

URL

GET https://localhost:4001/v1/children/{child_id}/logs/{resource}/date/{date_start}/{date_end}

Parameters

child_id: string (A 24-byte hex ID)

resource: string (steps, calories, active_minutes, lightly_active_minutes or sedentary_minutes)

date_start: string The start date of range.

date_end: string The end date of range.

Curl example

curl -X GET "https://localhost:4001/v1/children/5a62be07d6f33400146c9b61/logs/steps/date/2019-11-20/2019-11-25" -H "accept: application/json"

Response body

  • 200 Successful requisition.

    [
      {
        "date": "2019-04-23",
        "value": 14100
      },
      {
        "date": "2019-04-24",
        "value": 15687
      },
      {
        "date": "2019-04-25",
        "value": 0
      },
      {
        "date": "2019-04-26",
        "value": 2901
      },
      {
        "date": "2019-04-27",
        "value": 8561
      }
    ]
  • 400 Validation errors

  • 500 Internal Server Error

Clone this wiki locally