Activities ¶
activities¶
GET /api/v1/activities/¶
List Activities
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
end |
query | No | |||
limit |
query | integer | 50 | No | |
offset |
query | integer | 0 | No | |
refreshed-token |
header | No | |||
sport |
query | array | No | ||
start |
query | No | |||
tags |
query | array | No | ||
token |
cookie | string | No |
Responses
[
{
"tags": [
"string"
],
"id": "string",
"sport": "cycling",
"start": "2022-04-13T15:42:05.901Z",
"end": "2022-04-13T15:42:05.901Z",
"metrics": [
"duration"
],
"source_id": "string",
"summary": null,
"laps": null,
"traces": null,
"app_metadata": null,
"duration": "string",
"start_local": "2022-04-13T15:42:05.901Z",
"end_local": "2022-04-13T15:42:05.901Z"
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ActivitySummary"
},
"title": "Response List Activities Api V1 Activities Get"
}
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/activities/latest¶
Latest Activity
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
sport |
query | No | |||
token |
cookie | string | No |
Responses
{
"tags": [
"string"
],
"id": "string",
"sport": "cycling",
"start": "2022-04-13T15:42:05.901Z",
"end": "2022-04-13T15:42:05.901Z",
"metrics": [
"duration"
],
"source_id": "string",
"summary": null,
"laps": null,
"traces": null,
"app_metadata": null,
"distance": null,
"devices": [
"string"
],
"duration": "string",
"start_local": "2022-04-13T15:42:05.901Z",
"end_local": "2022-04-13T15:42:05.901Z"
}
Schema of the response body
{
"properties": {
"tags": {
"items": {
"type": "string"
},
"type": "array",
"title": "Tags"
},
"id": {
"type": "string",
"title": "Id"
},
"sport": {
"$ref": "#/components/schemas/Sport"
},
"start": {
"type": "string",
"format": "date-time",
"title": "Start"
},
"end": {
"type": "string",
"format": "date-time",
"title": "End"
},
"metrics": {
"items": {
"$ref": "#/components/schemas/Metric"
},
"type": "array",
"title": "Metrics"
},
"source_id": {
"type": "string",
"title": "Source Id"
},
"summary": {
"anyOf": [
{
"$ref": "#/components/schemas/ActivitySummarySummary"
},
{
"type": "null"
}
]
},
"laps": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/Lap"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Laps"
},
"traces": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/TraceDetails"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Traces"
},
"app_metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "App Metadata"
},
"distance": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Distance"
},
"devices": {
"items": {
"type": "string"
},
"type": "array",
"title": "Devices"
},
"duration": {
"type": "string",
"format": "duration",
"title": "Duration",
"readOnly": true
},
"start_local": {
"type": "string",
"format": "date-time",
"title": "Start Local",
"readOnly": true
},
"end_local": {
"type": "string",
"format": "date-time",
"title": "End Local",
"readOnly": true
}
},
"type": "object",
"required": [
"id",
"sport",
"start",
"end",
"metrics",
"source_id",
"duration",
"start_local",
"end_local"
],
"title": "ActivityDetails"
}
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/activities/backfill-status¶
Get Backfill Status
Description
Get the backfill status as a streaming newline-delimited JSON (NDJSON) response.
This endpoint is intended for newly connected users who your application needs to wait for historical activity data to be backfilled. It provides real-time progress updates as the backfill processes.
Streaming behavior: - Updates are sent periodically, approximately every few seconds. - Each line contains a complete JSON object followed by a newline character - Streaming automatically stops after 60 seconds
The backfill_loaded_until timestamp indicates the earliest activity date that has been
successfully loaded. As activities are backfilled from newest to oldest, this timestamp
moves backward in time toward the user's historical data.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
token |
cookie | string | No |
Responses
[
null
]
Schema of the response body
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/BackfillStatus"
},
{
"$ref": "#/components/schemas/BackfillError"
}
]
},
"title": "Response Get Backfill Status Api V1 Activities Backfill Status Get"
}
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/activities/longitudinal-data¶
Get Longitudinal Data
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
adaptive_sampling_on |
query | No | |||
end |
query | No | |||
metrics |
query | array | ['duration', 'power', 'speed', 'heart_rate'] | No | Metrics to include in the longitudinal data. Duration is always included. |
refreshed-token |
header | No | |||
sport |
query | array | No | ||
start |
query | No | |||
token |
cookie | string | No |
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/activities/longitudinal-mean-max¶
Get Longitudinal Mean Max
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
date |
query | No | Deprecated: use 'start' and 'end' instead. | ||
durations |
query | No | Comma-separated durations in seconds (e.g., '5,60,300,1200') | ||
end |
query | No | End of date range (defaults to today). Used with 'start'. | ||
metric |
query | string | No | ||
refreshed-token |
header | No | |||
sport |
query | array | No | ||
start |
query | No | Start of date range. Preferred over 'date'/'window_days'. | ||
token |
cookie | string | No | ||
window_days |
query | No | Deprecated: use 'start' and 'end' instead. |
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/activities/longitudinal-accumulated-work-duration¶
Get Longitudinal Accumulated Work Duration
Description
Warning: This endpoint is in development and subject to change.
Get longitudinal accumulated work duration (AWD) data for a given sport and metric.
Returns AWD values for each intensity level: - max: The highest daily AWD - hard: Sustainable AWD for hard workouts - medium: Sustainable AWD for medium workouts - easy: Sustainable AWD for easy workouts
Args: format: Response format - "parquet" (default) or "json"
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
date |
query | No | Deprecated: use 'start' and 'end' instead. | ||
end |
query | No | End of date range (defaults to today). Used with 'start'. | ||
format |
query | string | parquet | No | |
metric |
query | No | |||
refreshed-token |
header | No | |||
sport |
query | array | No | ||
start |
query | No | Start of date range. Preferred over 'date'/'window_days'. | ||
token |
cookie | string | No | ||
window_days |
query | No | Deprecated: use 'start' and 'end' instead. |
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/activities/{activity_id}/data¶
Get Activity Data
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
activity_id |
path | string | No | ||
adaptive_sampling_on |
query | No | |||
metrics |
query | array | ['duration', 'power', 'speed', 'heart_rate'] | No | |
refreshed-token |
header | No | |||
token |
cookie | string | No |
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/activities/{activity_id}/mean-max¶
Get Activity Mean Max
Description
Get mean-max values for a specific metric of an activity.
For all sports, the default metric is power if available, else speed.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
activity_id |
path | string | No | ||
adaptive_sampling |
query | boolean | False | No | |
durations |
query | No | Comma-separated durations in seconds (e.g., '5,60,300,1200') | ||
metric |
query | string | No | ||
refreshed-token |
header | No | |||
token |
cookie | string | No |
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/activities/{activity_id}/accumulated-work-duration¶
Get Activity Accumulated Work Duration
Description
Get accumulated work duration (AWD) for an activity.
AWD represents the total duration spent at each intensity level, calculated by sorting the activity data by intensity and accumulating the time spent at or above each level.
If no metric is specified, the default metric is determined by the activity's sport: - Cycling: power - Other sports: speed
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
activity_id |
path | string | No | ||
metric |
query | No | |||
refreshed-token |
header | No | |||
token |
cookie | string | No |
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/activities/{activity_id}¶
Get Activity
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
activity_id |
path | string | No | ||
refreshed-token |
header | No | |||
token |
cookie | string | No |
Responses
{
"tags": [
"string"
],
"id": "string",
"sport": "cycling",
"start": "2022-04-13T15:42:05.901Z",
"end": "2022-04-13T15:42:05.901Z",
"metrics": [
"duration"
],
"source_id": "string",
"summary": null,
"laps": null,
"traces": null,
"app_metadata": null,
"distance": null,
"devices": [
"string"
],
"duration": "string",
"start_local": "2022-04-13T15:42:05.901Z",
"end_local": "2022-04-13T15:42:05.901Z"
}
Schema of the response body
{
"properties": {
"tags": {
"items": {
"type": "string"
},
"type": "array",
"title": "Tags"
},
"id": {
"type": "string",
"title": "Id"
},
"sport": {
"$ref": "#/components/schemas/Sport"
},
"start": {
"type": "string",
"format": "date-time",
"title": "Start"
},
"end": {
"type": "string",
"format": "date-time",
"title": "End"
},
"metrics": {
"items": {
"$ref": "#/components/schemas/Metric"
},
"type": "array",
"title": "Metrics"
},
"source_id": {
"type": "string",
"title": "Source Id"
},
"summary": {
"anyOf": [
{
"$ref": "#/components/schemas/ActivitySummarySummary"
},
{
"type": "null"
}
]
},
"laps": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/Lap"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Laps"
},
"traces": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/TraceDetails"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Traces"
},
"app_metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "App Metadata"
},
"distance": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Distance"
},
"devices": {
"items": {
"type": "string"
},
"type": "array",
"title": "Devices"
},
"duration": {
"type": "string",
"format": "duration",
"title": "Duration",
"readOnly": true
},
"start_local": {
"type": "string",
"format": "date-time",
"title": "Start Local",
"readOnly": true
},
"end_local": {
"type": "string",
"format": "date-time",
"title": "End Local",
"readOnly": true
}
},
"type": "object",
"required": [
"id",
"sport",
"start",
"end",
"metrics",
"source_id",
"duration",
"start_local",
"end_local"
],
"title": "ActivityDetails"
}
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/activities/{activity_id}/download¶
Download Activity
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
activity_id |
path | string | No | ||
refreshed-token |
header | No | |||
token |
cookie | string | No |
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
POST /api/v1/activities/upload¶
Upload Activity File
Description
Upload up to 10 activity files at once. Supported formats: .fit, .csv
For CSV files, the sport parameter is required. The CSV must contain a
timestamp column with ISO 8601 datetimes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
token |
cookie | string | No |
Request body
{
"files": [
"TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ="
],
"sport": null
}
Schema of the request body
{
"properties": {
"files": {
"items": {
"type": "string",
"format": "binary"
},
"type": "array",
"maxItems": 10,
"title": "Files"
},
"sport": {
"anyOf": [
{
"$ref": "#/components/schemas/Sport"
},
{
"type": "null"
}
]
}
},
"type": "object",
"required": [
"files"
],
"title": "Body_upload_activity_file_api_v1_activities_upload_post"
}
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
PUT /api/v1/activities/{activity_id}/app-metadata¶
Put Activity Metadata
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
activity_id |
path | string | No | ||
refreshed-token |
header | No | |||
token |
cookie | string | No |
Request body
Schema of the request body
{
"type": "object",
"additionalProperties": true,
"title": "Data"
}
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
DELETE /api/v1/activities/{activity_id}/app-metadata¶
Delete Activity Metadata
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
activity_id |
path | string | No | ||
refreshed-token |
header | No | |||
token |
cookie | string | No |
Responses
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
Schemas¶
ActivityDetails¶
| Name | Type | Description |
|---|---|---|
app_metadata |
||
devices |
Array<string> | |
distance |
||
duration |
string(duration) | |
end |
string(date-time) | |
end_local |
string(date-time) | |
id |
string | |
laps |
||
metrics |
Array<Metric> | |
source_id |
string | |
sport |
Sport | |
start |
string(date-time) | |
start_local |
string(date-time) | |
summary |
||
tags |
Array<string> | |
traces |
ActivitySummary¶
| Name | Type | Description |
|---|---|---|
app_metadata |
||
duration |
string(duration) | |
end |
string(date-time) | |
end_local |
string(date-time) | |
id |
string | |
laps |
||
metrics |
Array<Metric> | |
source_id |
string | |
sport |
Sport | |
start |
string(date-time) | |
start_local |
string(date-time) | |
summary |
||
tags |
Array<string> | |
traces |
ActivitySummarySummary¶
| Name | Type | Description |
|---|---|---|
altitude |
||
cadence |
||
core_temperature |
||
distance |
||
heart_rate |
||
power |
||
smo2 |
||
speed |
||
temperature |
AltitudeSummary¶
| Name | Type | Description |
|---|---|---|
gain |
||
loss |
||
max |
||
mean |
||
min |
BackfillError¶
| Name | Type | Description |
|---|---|---|
error |
string |
BackfillStatus¶
| Name | Type | Description |
|---|---|---|
backfill_loaded_until |
Body_upload_activity_file_api_v1_activities_upload_post¶
| Name | Type | Description |
|---|---|---|
files |
Array<string(binary)> | |
sport |
CadenceSummary¶
| Name | Type | Description |
|---|---|---|
max |
||
mean |
CoreTemperatureSummary¶
| Name | Type | Description |
|---|---|---|
end |
||
max |
||
mean |
||
min |
||
start |
DistanceSummary¶
| Name | Type | Description |
|---|---|---|
sum |
HeartRateSummary¶
| Name | Type | Description |
|---|---|---|
end |
||
max |
||
mean |
||
min |
||
start |
HTTPValidationError¶
| Name | Type | Description |
|---|---|---|
detail |
Array<ValidationError> |
Lap¶
| Name | Type | Description |
|---|---|---|
altitude |
||
cadence |
||
core_temperature |
||
distance |
||
duration |
string(duration) | |
end |
string(date-time) | |
end_local |
string(date-time) | |
heart_rate |
||
power |
||
smo2 |
||
speed |
||
start |
string(date-time) | |
start_local |
string(date-time) | |
temperature |
Marker¶
| Name | Type | Description |
|---|---|---|
heart_rate |
||
lactate |
||
power |
||
speed |
||
vo2 |
Metric¶
Type: string
PowerSummary¶
| Name | Type | Description |
|---|---|---|
max |
||
mean |
Smo2Summary¶
| Name | Type | Description |
|---|---|---|
end |
||
max |
||
mean |
||
min |
||
start |
SpeedSummary¶
| Name | Type | Description |
|---|---|---|
max |
||
mean |
Sport¶
Type: string
TemperatureSummary¶
| Name | Type | Description |
|---|---|---|
end |
||
max |
||
mean |
||
min |
||
start |
TestResults¶
| Name | Type | Description |
|---|---|---|
critical_power |
||
critical_speed |
||
d_prime |
||
economy |
||
efficiency |
||
fatmax |
||
first_threshold |
||
heart_rate_max |
||
lt1 |
||
lt2 |
||
mlss |
||
second_threshold |
||
vlamax |
||
vo2max |
||
vo2peak |
||
vt1 |
||
vt2 |
||
w_prime |
TestSummary¶
| Name | Type | Description |
|---|---|---|
app_metadata |
||
created_by |
||
end |
||
end_local |
||
id |
string | |
results |
||
sport |
Sport | |
start |
string(date-time) | |
start_local |
string(date-time) | |
tags |
Array<string> | |
title |
TraceDetails¶
| Name | Type | Description |
|---|---|---|
activity |
||
app_metadata |
||
heart_rate |
||
id |
string | |
lactate |
||
lap |
||
notes |
||
power |
||
rpe |
||
speed |
||
sport |
||
tags |
Array<string> | |
test |
||
test_id |
||
test_match |
||
timestamp |
string(date-time) | |
timestamp_local |
string(date-time) | |
vo2 |
ValidationError¶
| Name | Type | Description |
|---|---|---|
loc |
Array<> | |
msg |
string | |
type |
string |
Security schemes¶
| Name | Type | Scheme | Description |
|---|---|---|---|
| HTTPBearer | http | bearer | |
| HTTPBasic | http | basic |