Skip to content

Get activity streams

GET
/api/v1/activities/{activityId}/streams
curl --request GET \
--url http://localhost:8080/api/v1/activities/activity-9756441741/streams \
--header 'Authorization: Bearer <token>'

Returns the streams of an activity: its time-series data, one array per metric. The arrays line up by index, so the n-th value of every stream belongs to the same moment

activityId
required
string

The prefixed activity identifier, activity- included.

The streams of the activity.

Media typeapplication/json
object
timeInSeconds
required

Seconds since the start of the activity.

Array<integer> | null
distanceInMeter
required

Distance covered since the start, in meters.

Array<number> | null
latLng
required

[latitude, longitude] pairs. A point without a GPS fix is null.

Array<Array<number> | null> | null
altitudeInMeter
required
Array<number> | null
velocityInMeterPerSecond
required
Array<number> | null
heartRate
required

Beats per minute.

Array<integer> | null
cadence
required

Revolutions or steps per minute.

Array<integer> | null
powerInWatts
required
Array<integer> | null
temperatureInCelsius
required
Array<number> | null
moving
required

Whether the athlete was moving at that moment.

Array<boolean> | null
gradeInPercent
required
Array<number> | null
Example
{
"timeInSeconds": [
0,
1,
2
],
"distanceInMeter": [
0,
4.1,
8.3
],
"latLng": [
[
51.2,
3.18
],
[
51.2001,
3.1802
]
],
"altitudeInMeter": [
10.5,
11,
11.5
],
"velocityInMeterPerSecond": [
8.1,
8.3,
8.2
],
"heartRate": [
120,
121,
122
],
"cadence": [
80,
81,
82
],
"powerInWatts": [
200,
210,
220
],
"temperatureInCelsius": [
20,
20,
21
],
"moving": [
true,
true,
false
],
"gradeInPercent": [
0.5,
1.2,
1.1
]
}

The Authorization header was missing, malformed, or did not match the configured key.

Media typeapplication/json

Every error uses this shape.

object
error
required

A stable, machine readable code.

string
Allowed values: invalid_token missing_file unsupported_media_type unsupported_file_type file_too_large import_mode_not_files gpx_not_available not_found method_not_allowed bad_request forbidden internal_error
message
required
string
Examples
ExampleinvalidToken
{
"error": "invalid_token",
"message": "A valid API token is required. Send it in the Authorization header as a Bearer token."
}
WWW-Authenticate
string

No activity with this identifier exists.

Media typeapplication/json

Every error uses this shape.

object
error
required

A stable, machine readable code.

string
Allowed values: invalid_token missing_file unsupported_media_type unsupported_file_type file_too_large import_mode_not_files gpx_not_available not_found method_not_allowed bad_request forbidden internal_error
message
required
string
Examples
ExampleunknownActivity
{
"error": "not_found",
"message": "Activity \"activity-1\" not found"
}