Get data from the database

POST /api/v2/fetch/{method}

Get data from the database.

Path parameters

  • method string Required

    Can be one of the following: activeCaloriesBurned, basalBodyTemperature, basalMetabolicRate, bloodGlucose, bloodPressure, bodyFat, bodyTemperature, boneMass, cervicalMucus, distance, exerciseSession, elevationGained, floorsClimbed, heartRate, height, hydration, leanBodyMass, menstruationFlow, menstruationPeriod, nutrition, ovulationTest, oxygenSaturation, power, respiratoryRate, restingHeartRate, sleepSession, speed, steps, stepsCadence, totalCaloriesBurned, vo2Max, weight, wheelchairPushes

application/json

Body

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • _id string

      The id Health Connect stored the object with.

    • data object

      The actual data stored in Health Connect

      Additional properties are allowed.

    • id string
    • start string(date-time)

      The start time of the data

    • end string(date-time) | null

      The end time of the data. Only present if the data is a time-series.

    • app string

      The app that created the data

POST /api/v2/fetch/{method}
curl \
 -X POST https://api.hcgateway.shuchir.dev/api/v2/fetch/{method} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"queries":{}}'
Request examples
{
  "queries": {}
}
Response examples (200)
{
  "_id": "string",
  "data": {},
  "id": "string",
  "start": "2024-05-04T09:42:00+00:00",
  "end": "2024-05-04T09:42:00+00:00",
  "app": "string"
}