Thrive AI Health
Api reference

Sub-daily samples for a single metric

Polymorphic by `metric` path segment. Currently supported slugs: `heart_rate`, `hrv`, `steps`, `calories` — additional metrics (`glucose`, `blood_pressure`, `respiratory_rate`, ECG voltage, body-temperature delta) are wired in follow-up tickets as the underlying UDP point-reads land. Unsupported slugs return `404`. `granularity` requests server-side aggregation (`raw`, `five_minute`, `fifteen_minute`, `one_hour`). Sample shape varies by metric: blood pressure has `systolic`/`diastolic`, ECG voltage has `lead`, body-temperature delta has `sensor_location`; everything else uses `value` + `unit`.

GET
/v1/users/{user_id}/metrics/{metric}/timeseries

Authorization

MemberBearer
AuthorizationBearer <token>

Member-scoped JWT minted by POST /v1/auth/token. Required on every /v1/users/{user_id}/... route; the token's sub claim must match the path user_id.

In: header

Path Parameters

user_id*User Id
Formatuuid
metric*Metric

Query Parameters

start_time*Start Time
Formatdate-time
end_time*End Time
Formatdate-time
granularity?Granularity
Default"raw"
Value in"raw" | "five_minute" | "fifteen_minute" | "one_hour"
provider?string|null
limit?Limit
Default100
Range1 <= value <= 1000
offset?Offset
Default0
Range0 <= value

Header Parameters

org-id?string|null
x-user-id?string|null
x-request-id?string|null
traceparent?string|null
Idempotency-Key?|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/metrics/string/timeseries?start_time=2019-08-24T14%3A15%3A22Z&end_time=2019-08-24T14%3A15%3A22Z"
{
  "data": [
    {
      "start": "2019-08-24T14:15:22Z",
      "end": "2019-08-24T14:15:22Z",
      "unit": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}