curl --request GET \
  --url https://app-api.spikeapi.com/v3/queries/statistics \
  --header 'Authorization: Bearer <token>'
{
  "from_timestamp": "2006-01-02T00:00:00Z",
  "record_ids": [
    "1e85cf8b-ff50-43cf-9276-b0f4c14a500c"
  ],
  "to_timestamp": "2006-01-02T00:00:00Z",
  "values": {
    "calories_burned_active": 123.4567,
    "calories_burned_basal": 123.4567,
    "calories_burned_total": 123.4567,
    "distance_cycling": 123.4567,
    "distance_running": 123.4567,
    "distance_total": 123.4567,
    "distance_walking": 123.4567,
    "heartrate": 123,
    "heartrate_max": 123,
    "heartrate_min": 123,
    "heartrate_resting": 123,
    "sleep_duration_total": 123,
    "sleep_score": 123,
    "steps": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

from_timestamp
string

Start time of the query range in UTC

Examples:

"2006-01-02T15:04:05"

"2006-01-02T15:04:05Z"

to_timestamp
string

End time of the query range in UTC

Examples:

"2006-01-02T15:04:05"

"2006-01-02T15:04:05Z"

exclude_manual
boolean
default:false

Exclude manual metrics from the statistics

interval
enum<string>
required

Interval windows to aggregate data

Available options:
fifteen_minute,
thirty_minute,
hour,
day
types
enum<string>[]
required

Statistics values

Minimum length: 1
providers
string[] | null

Provider slugs

Response

200
application/json

OK

The response is of type object.