curl --request GET \
  --url https://app-api.spikeapi.com/v3/queries/samples \
  --header 'Authorization: Bearer <token>'
{
  "from_timestamp": "2006-01-02T00:00:00Z",
  "samples": [
    {
      "durations_ms": [
        123
      ],
      "metric": "heartrate_max",
      "offsets_ms": [
        123
      ],
      "provider": "strava",
      "provider_source": "apple_healthkit_sample",
      "record_ids": [
        "ff5f3062-fb30-4596-8981-94722fe92d87"
      ],
      "source_info": {
        "device_manufacturer": "<string>",
        "device_model": "<string>",
        "device_product": "<string>",
        "device_version": "<string>",
        "source_bundle_identifier": "<string>",
        "source_os_version": "<string>",
        "source_product": "<string>",
        "source_version": "<string>"
      },
      "start_at": "2023-11-07T05:31:56Z",
      "values": [
        "<string>"
      ]
    }
  ],
  "to_timestamp": "2006-01-02T00:00:00Z"
}

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"

metrics
enum<string>[] | null
required

An array of metrics you want to query

providers
string[] | null

Provider slugs

include_record_ids
boolean

Whether to include the record IDs in the response

only_best_source
boolean

Whether to include only the best source in the response

Response

200
application/json

OK

The response is of type object.