Download as GPX
GET
/api/v1/activities/{activityId}/gpx
const url = 'http://localhost:8080/api/v1/activities/activity-9756441741/gpx';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8080/api/v1/activities/activity-9756441741/gpx \ --header 'Authorization: Bearer <token>'Only activities recorded with GPS data can be exported. Check hasGpx on the activity first
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”activityId
required
string
The prefixed activity identifier, activity- included.
Responses
Section titled “Responses”The route as a GPX 1.1 document.
Media typeapplication/gpx+xml
string
Headers
Section titled “Headers”Content-Disposition
string
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
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."}Headers
Section titled “Headers”WWW-Authenticate
string
The activity does not exist, or it exists but has no GPS data.
Media typeapplication/json
Every error uses this shape.
object
error
required
A stable, machine readable code.
string
message
required
string
Examples
No such activity
{ "error": "not_found", "message": "Activity \"activity-1\" not found"}A manual or indoor activity
{ "error": "gpx_not_available", "message": "Activity \"activity-9542782314\" has no GPS or time data to export as GPX."}