List Samples
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",
      "offsets_ms": [
        123
      ],
      "provider": "strava",
      "provider_source": "apple_healthkit_sample",
      "record_ids": [
        "0b583d97-4956-4fb3-9fc1-e7c8be6f921e"
      ],
      "source": {
        "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<date-time>

Start time of the query range in UTC

Examples:

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

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

to_timestamp
string<date-time>

End time of the query range in UTC

Examples:

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

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

metrics
enum<string>[]
required

An array of metrics you want to query

providers
enum<string>[]
include_record_ids
boolean

Whether to include the record IDs in the response

Response

200
application/json

OK

The response is of type object.