Skip to content

Get the training volume

GET
/api/v1/metrics/training-volume
curl --request GET \
--url 'http://localhost:8080/api/v1/metrics/training-volume?filters%5Bfrom%5D=2023-09-04&filters%5Bto%5D=2023-09-10&filters%5BsportType%5D=Ride' \
--header 'Authorization: Bearer <token>'

Returns the total number of activities, moving time, distance, elevation and calories in a date range

GET /api/v1/metrics/training-volume?filters[from]=2023-09-04&filters[to]=2023-09-10&filters[sportType]=Run
filters
required
object
from
required

The first day of the range

string format: date
to
required

The last day of the range, not before from

string format: date
sportType

One sport type, or several separated by commas. Every sport type counts when left out.

string

The training volume for the date range.

Media typeapplication/json
object
from
required
string format: date
to
required
string format: date
numberOfActivities
required
integer
movingTimeInSeconds
required
integer
distanceInMeter
required
integer
elevationInMeter
required
integer
calories
required
integer
Example
{
"from": "2023-09-04",
"to": "2023-09-10",
"numberOfActivities": 4,
"movingTimeInSeconds": 14400,
"distanceInMeter": 82300,
"elevationInMeter": 910,
"calories": 2350
}
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
{
"error": "bad_request",
"message": "\"filters[from]\" is required."
}

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