PaintMyRide · Actions GPT
Strava API v3
The [Swagger Playground](https://developers.strava.com/playground) is the easiest way to familiarize yourself with the Strava API by submitting HTTP requests and observing the responses before you write any client code. It will show what a response will look like with different endpoints depending on the authorization scope you receive from your athletes. To use the Playground, go to https://www.strava.com/settings/api and change your “Authorization Callback Domain” to developers.strava.com. Please note, we only support Swagger 2.0. There is a known issue where you can only select one scope at a time. For more information, please check the section “client code” at https://developers.strava.com/docs.
GET /athletes/{id}/statsGet Athlete StatsReturns the activity stats of an athlete. Only includes data from activities set to Everyone visibilty.
GET /athleteGet Authenticated AthleteReturns the currently authenticated athlete. Tokens with profile:read_all scope will receive a detailed athlete representation; all others will receive a summary representation.
PUT /athleteUpdate AthleteUpdate the currently authenticated athlete. Requires profile:write scope.
GET /athlete/zonesGet ZonesReturns the the authenticated athlete's heart rate and power zones. Requires profile:read_all.
POST /activitiesCreate an ActivityCreates a manual activity for an athlete, requires activity:write scope.
GET /activities/{id}Get ActivityReturns the given activity that is owned by the authenticated athlete. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.
PUT /activities/{id}Update ActivityUpdates the given activity that is owned by the authenticated athlete. Requires activity:write. Also requires activity:read_all in order to update Only Me activities
GET /athlete/activitiesList Athlete ActivitiesReturns the activities of an athlete for a specific identifier. Requires activity:read. Only Me activities will be filtered out unless requested by a token with activity:read_all.
GET /activities/{id}/lapsList Activity LapsReturns the laps of an activity identified by an identifier. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.
GET /activities/{id}/zonesGet Activity ZonesSummit Feature. Returns the zones of a given activity. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.
Schéma original API
{
"openapi": "3.0.1",
"info": {
"title": "Strava API v3",
"description": "The [Swagger Playground](https://developers.strava.com/playground) is the easiest way to familiarize yourself with the Strava API by submitting HTTP requests and observing the responses before you write any client code. It will show what a response will look like with different endpoints depending on the authorization scope you receive from your athletes. To use the Playground, go to https://www.strava.com/settings/api and change your “Authorization Callback Domain” to developers.strava.com. Please note, we only support Swagger 2.0. There is a known issue where you can only select one scope at a time. For more information, please check the section “client code” at https://developers.strava.com/docs.",
"version": "3.0.0"
},
"servers": [
{
"url": "https://www.strava.com/api/v3"
}
],
"security": [
{
"strava_oauth": [
"public"
]
}
],
"paths": {
"/athletes/{id}/stats": {
"get": {
"tags": [
"Athletes"
],
"summary": "Get Athlete Stats",
"description": "Returns the activity stats of an athlete. Only includes data from activities set to Everyone visibilty.",
"operationId": "getStats",
"parameters": [
{
"name": "id",
"in": "path",
"description": "The identifier of the athlete. Must match the authenticated athlete.",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "Activity stats of the athlete.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ActivityStats"
}
}
}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Fault"
}
}
}
}
}
}
},
"/athlete": {
"get": {
"tags": [
"Athletes"
],
"summary": "Get Authenticated Athlete",
"description": "Returns the currently authenticated athlete. Tokens with profile:read_all scope will receive a detailed athlete representation; all others will receive a summary representation.",
"operationId": "getLoggedInAthlete",
"responses": {
"200": {
"description": "Profile information for the authenticated athlete.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DetailedAthlete"
},
"example": {
"id": 1234567890987654400,
"username": "marianne_t",
"resource_state": 3,
"firstname": "Marianne",
"lastname": "Teutenberg",
"city": "San Francisco",
"state": "CA",
"country": "US",
"sex": "F",
"premium": true,
"created_at": "2017-11-14T02:30:05+00:00",
"updated_at": "2018-02-06T19:32:20+00:00",
"badge_type_id": 4,
"profile_medium": "https://xxxxxx.cloudfront.net/pictures/athletes/123456789/123456789/2/medium.jpg",
"profile": "https://xxxxx.cloudfront.net/pictures/athletes/123456789/123456789/2/large.jpg",
"follower_count": 5,
"friend_count": 5,
"mutual_friend_count": 0,
"athlete_type": 1,
"date_preference": "%m/%d/%Y",
"measurement_preference": "feet",
"clubs": [],
"weight": 0,
"bikes": [
{
"id": "b12345678987655",
"primary": true,
"name": "EMC",
"resource_state": 2,
"distance": 0
}
],
"shoes": [
{
"id": "g12345678987655",
"primary": true,
"name": "adidas",
"resource_state": 2,
"distance": 4904
}
]
}
}
}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Fault"
}
}
}
}
}
},
"put": {
"tags": [
"Athletes"
],
"summary": "Update Athlete",
"description": "Update the currently authenticated athlete. Requires profile:write scope.",
"operationId": "updateLoggedInAthlete",
"parameters": [
{
"name": "weight",
"in": "path",
"description": "The weight of the athlete in kilograms.",
"required": true,
"schema": {
"type": "number",
"format": "float"
}
}
],
"responses": {
"200": {
"description": "Profile information for the authenticated athlete.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DetailedAthlete"
},
"example": {
"id": 1.2345678987655098e+22,
"username": "marianne_v",
"resource_state": 3,
"firstname": "Marianne",
"lastname": "V.",
"city": "San Francisco",
"state": "CA",
"country": "US",
"sex": "F",
"premium": true,
"created_at": "2017-11-14T02:30:05+00:00",
"updated_at": "2018-02-06T19:32:20+00:00",
"badge_type_id": 4,
"profile_medium": "https://xxxxxx.cloudfront.net/pictures/athletes/1234567898765509876/1234567898765509876/2/medium.jpg",
"profile": "https://xxxxx.cloudfront.net/pictures/athletes/1234567898765509876/1234567898765509876/2/large.jpg",
"follower_count": 5,
"friend_count": 5,
"mutual_friend_count": 0,
"athlete_type": 1,
"date_preference": "%m/%d/%Y",
"measurement_preference": "feet",
"clubs": [],
"weight": 0,
"bikes": [
{
"id": "b1234567898765509876",
"primary": true,
"name": "EMC",
"resource_state": 2,
"distance": 0
}
],
"shoes": [
{
"id": "g1234567898765509876",
"primary": true,
"name": "adidas",
"resource_state": 2,
"distance": 4904
}
]
}
}
}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Fault"
}
}
}
}
}
}
},
"/athlete/zones": {
"get": {
"tags": [
"Athletes"
],
"summary": "Get Zones",
"description": "Returns the the authenticated athlete's heart rate and power zones. Requires profile:read_all.",
"operationId": "getLoggedInAthleteZones",
"responses": {
"200": {
"description": "Heart rate and power zones.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Zones"
},
"example": [
{
"distribution_buckets": [
{
"max": 0,
"min": 0,
"time": 1498
},
{
"max": 50,
"min": 0,
"time": 62
},
{
"max": 100,
"min": 50,
"time": 169
},
{
"max": 150,
"min": 100,
"time": 536
},
{
"max": 200,
"min": 150,
"time": 672
},
{
"max": 250,
"min": 200,
"time": 821
},
{
"max": 300,
"min": 250,
"time": 529
},
{
"max": 350,
"min": 300,
"time": 251
},
{
"max": 400,
"min": 350,
"time": 80
},
{
"max": 450,
"min": 400,
"time": 81
},
{
"max": -1,
"min": 450,
"time": 343
}
],
"type": "power",
"resource_state": 3,
"sensor_based": true
}
]
}
}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Fault"
}
}
}
}
}
}
},
"/activities": {
"post": {
"tags": [
"Activities"
],
"summary": "Create an Activity",
"description": "Creates a manual activity for an athlete, requires activity:write scope.",
"operationId": "createActivity",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"required": [
"elapsed_time",
"name",
"sport_type",
"start_date_local"
],
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the activity."
},
"type": {
"type": "string",
"description": "Type of activity. For example - Run, Ride etc."
},
"sport_type": {
"type": "string",
"description": "Sport type of activity. For example - Run, MountainBikeRide, Ride, etc."
},
"start_date_local": {
"type": "string",
"description": "ISO 8601 formatted date time.",
"format": "date-time"
},
"elapsed_time": {
"type": "integer",
"description": "In seconds.",
"format": "int32"
},
"description": {
"type": "string",
"description": "Description of the activity."
},
"distance": {
"type": "number",
"description": "In meters.",
"format": "float"
},
"trainer": {
"type": "integer",
"description": "Set to 1 to mark as a trainer activity.",
"format": "int32"
},
"commute": {
"type": "integer",
"description": "Set to 1 to mark as commute.",
"format": "int32"
}
}
}
}
},
"required": true
},
"responses": {
"201": {
"description": "The activity's detailed representation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DetailedActivity"
},
"example": {
"id": 123456778928065,
"resource_state": 3,
"athlete": {
"id": 12343545645788,
"resource_state": 1
},
"name": "Chill Day",
"distance": 0,
"moving_time": 18373,
"elapsed_time": 18373,
"total_elevation_gain": 0,
"type": "Ride",
"sport_type": "MountainBikeRide",
"start_date": "2018-02-20T18:02:13+00:00",
"start_date_local": "2018-02-20T10:02:13+00:00",
"timezone": "(GMT-08:00) America/Los_Angeles",
"utc_offset": -28800,
"achievement_count": 0,
"kudos_count": 0,
"comment_count": 0,
"athlete_count": 1,
"photo_count": 0,
"map": {
"id": "a12345678908766",
"resource_state": 3
},
"trainer": false,
"commute": false,
"manual": true,
"private": false,
"flagged": false,
"gear_id": "b453542543",
"average_speed": 0,
"max_speed": 0,
"device_watts": false,
"has_heartrate": false,
"pr_count": 0,
"total_photo_count": 0,
"has_kudoed": false,
"calories": 0,
"segment_efforts": []
}
}
}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Fault"
}
}
}
}
}
}
},
"/activities/{id}": {
"get": {
"tags": [
"Activities"
],
"summary": "Get Activity",
"description": "Returns the given activity that is owned by the authenticated athlete. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.",
"operationId": "getActivityById",
"parameters": [
{
"name": "id",
"in": "path",
"description": "The identifier of the activity.",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "include_all_efforts",
"in": "query",
"description": "To include all segments efforts.",
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "The activity's detailed representation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DetailedActivity"
},
"example": {
"id": 12345678987654320,
"resource_state": 3,
"external_id": "garmin_push_12345678987654321",
"upload_id": 98765432123456780,
"athlete": {
"id": 134815,
"resource_state": 1
},
"name": "Happy Friday",
"distance": 28099,
"moving_time": 4207,
"elapsed_time": 4410,
"total_elevation_gain": 516,
"type": "Ride",
"sport_type": "MountainBikeRide",
"start_date": "2018-02-16T14:52:54+00:00",
"start_date_local": "2018-02-16T06:52:54+00:00",
"timezone": "(GMT-08:00) America/Los_Angeles",
"utc_offset": -28800,
"start_latlng": [
37.83,
-122.26
],
"end_latlng": [
37.83,
-122.26
],
"achievement_count": 0,
"kudos_count": 19,
"comment_count": 0,
"athlete_count": 1,
"photo_count": 0,
"map": {
"id": "a1410355832",
"polyline": "ki{eFvqfiVqAWQIGEEKAYJgBVqDJ{BHa@jAkNJw@Pw@V{APs@^aABQAOEQGKoJ_FuJkFqAo@{A}@sH{DiAs@Q]?WVy@`@oBt@_CB]KYMMkB{AQEI@WT{BlE{@zAQPI@ICsCqA_BcAeCmAaFmCqIoEcLeG}KcG}A}@cDaBiDsByAkAuBqBi@y@_@o@o@kB}BgIoA_EUkAMcACa@BeBBq@LaAJe@b@uA`@_AdBcD`@iAPq@RgALqAB{@EqAyAoOCy@AmCBmANqBLqAZkB\\iCPiBJwCCsASiCq@iD]eA]y@[i@w@mAa@i@k@g@kAw@i@Ya@Q]EWFMLa@~BYpAFNpA`Aj@n@X`@V`AHh@JfB@xAMvAGZGHIDIAWOEQNcC@sACYK[MSOMe@QKKKYOs@UYQISCQ?Q@WNo@r@OHGAGCKOQ_BU}@MQGG]Io@@c@FYNg@d@s@d@ODQAMOMaASs@_@a@SESAQDqBn@a@RO?KK?UBU\\kA@Y?WMo@Iy@GWQ_@WSSGg@AkABQB_Ap@_A^o@b@Q@o@IS@OHi@n@OFS?OI}@iAQMQGQC}@DOIIUK{@IUOMyBo@kASOKIQCa@L[|AgATWN[He@?QKw@FOPCh@Fx@l@TDLELKl@aAHIJEX@r@ZTDV@LENQVg@RkA@c@MeA?WFOPMf@Ej@Fj@@LGHKDM?_@_@iC?a@HKRIl@NT?FCHMFW?YEYGWQa@GYBiAIq@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D_CtJKv@wGhD]YyEzBo@g@uKxGmHpCGtEtI~AuLrHkAcAaIvEgH_EaDR_FpBuBg@sNxHqEtHgLoTpIiCzKNr[sB|Es\\`JyObYeMbGsMnPsAfDxAnD}DBu@bCx@{BbEEyAoD`AmChNoQzMoGhOwX|[yIzBeFKg[zAkIdU_LiHxK}HzEh@vM_BtBg@xGzDbCcF~GhArHaIfByAhLsDiJuC?_HbHd@nL_Cz@ZnEkDDy@hHwJLiCbIrNrIvN_EfAjDWlEnEiAfBxDlFkBfBtEfDaAzBvDKdFx@|@XgJmDsHhAgD`GfElEzOwBnYdBxXgGlSc@bGdHpW|HdJztBnhAgFxc@HnCvBdA"
},
"trainer": false,
"commute": false,
"manual": false,
"private": false,
"flagged": false,
"gear_id": "b12345678987654321",
"from_accepted_tag": false,
"average_speed": 6.679,
"max_speed": 18.5,
"average_cadence": 78.5,
"average_temp": 4,
"average_watts": 185.5,
"weighted_average_watts": 230,
"kilojoules": 780.5,
"device_watts": true,
"has_heartrate": false,
"max_watts": 743,
"elev_high": 446.6,
"elev_low": 17.2,
"pr_count": 0,
"total_photo_count": 2,
"has_kudoed": false,
"workout_type": 10,
"description": "",
"calories": 870.2,
"segment_efforts": [
{
"id": 12345678987654320,
"resource_state": 2,
"name": "Tunnel Rd.",
"activity": {
"id": 12345678987654320,
"resource_state": 1
},
"athlete": {
"id": 134815,
"resource_state": 1
},
"elapsed_time": 2038,
"moving_time": 2038,
"start_date": "2018-02-16T14:56:25+00:00",
"start_date_local": "2018-02-16T06:56:25+00:00",
"distance": 9434.8,
"start_index": 211,
"end_index": 2246,
"average_cadence": 78.6,
"device_watts": true,
"average_watts": 237.6,
"segment": {
"id": 673683,
"resource_state": 2,
"name": "Tunnel Rd.",
"activity_type": "Ride",
"distance": 9220.7,
"average_grade": 4.2,
"maximum_grade": 25.8,
"elevation_high": 426.5,
"elevation_low": 43.4,
"start_latlng": [
37.8346153,
-122.2520872
],
"end_latlng": [
37.8476261,
-122.2008944
],
"climb_category": 3,
"city": "Oakland",
"state": "CA",
"country": "United States",
"private": false,
"hazardous": false,
"starred": false
},
"achievements": [],
"hidden": false
}
],
"splits_metric": [
{
"distance": 1001.5,
"elapsed_time": 141,
"elevation_difference": 4.4,
"moving_time": 141,
"split": 1,
"average_speed": 7.1,
"pace_zone": 0
}
],
"laps": [
{
"id": 4479306946,
"resource_state": 2,
"name": "Lap 1",
"activity": {
"id": 1410355832,
"resource_state": 1
},
"athlete": {
"id": 134815,
"resource_state": 1
},
"elapsed_time": 1573,
"moving_time": 1569,
"start_date": "2018-02-16T14:52:54+00:00",
"start_date_local": "2018-02-16T06:52:54+00:00",
"distance": 8046.72,
"start_index": 0,
"end_index": 1570,
"total_elevation_gain": 276,
"average_speed": 5.12,
"max_speed": 9.5,
"average_cadence": 78.6,
"device_watts": true,
"average_watts": 233.1,
"lap_index": 1,
"split": 1
}
],
"gear": {
"id": "b12345678987654321",
"primary": true,
"name": "Tarmac",
"resource_state": 2,
"distance": 32547610
},
"photos": {
"primary": {
"unique_id": "3FDGKL3-204E-4867-9E8D-89FC79EAAE17",
"urls": {
"100": "https://dgtzuqphqg23d.cloudfront.net/Bv93zv5t_mr57v0wXFbY_JyvtucgmU5Ym6N9z_bKeUI-128x96.jpg",
"600": "https://dgtzuqphqg23d.cloudfront.net/Bv93zv5t_mr57v0wXFbY_JyvtucgmU5Ym6N9z_bKeUI-768x576.jpg"
},
"source": 1
},
"use_primary_photo": true,
"count": 2
},
"highlighted_kudosers": [
{
"destination_url": "strava://athletes/12345678987654321",
"display_name": "Marianne V.",
"avatar_url": "https://dgalywyr863hv.cloudfront.net/pictures/athletes/12345678987654321/12345678987654321/3/medium.jpg",
"show_name": true
}
],
"hide_from_home": false,
"device_name": "Garmin Edge 1030",
"embed_token": "18e4615989b47dd4ff3dc711b0aa4502e4b311a9",
"segment_leaderboard_opt_out": false,
"leaderboard_opt_out": false
}
}
}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Fault"
}
}
}
}
}
},
"put": {
"tags": [
"Activities"
],
"summary": "Update Activity",
"description": "Updates the given activity that is owned by the authenticated athlete. Requires activity:write. Also requires activity:read_all in order to update Only Me activities",
"operationId": "updateActivityById",
"parameters": [
{
"name": "id",
"in": "path",
"description": "The identifier of the activity.",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"requestBody": {
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/UpdatableActivity"
}
}
},
"required": false
},
"responses": {
"200": {
"description": "The activity's detailed representation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DetailedActivity"
},
"example": {
"id": 12345678987654320,
"resource_state": 3,
"external_id": "garmin_push_12345678987654321",
"upload_id": 98765432123456780,
"athlete": {
"id": 134815,
"resource_state": 1
},
"name": "Happy Friday",
"distance": 28099,
"moving_time": 4207,
"elapsed_time": 4410,
"total_elevation_gain": 516,
"type": "Ride",
"sport_type": "MountainBikeRide",
"start_date": "2018-02-16T14:52:54+00:00",
"start_date_local": "2018-02-16T06:52:54+00:00",
"timezone": "(GMT-08:00) America/Los_Angeles",
"utc_offset": -28800,
"start_latlng": [
37.83,
-122.26
],
"end_latlng": [
37.83,
-122.26
],
"location_country": "United States",
"achievement_count": 0,
"kudos_count": 19,
"comment_count": 0,
"athlete_count": 1,
"photo_count": 0,
"map": {
"id": "a1410355832",
"polyline": "ki{eFvqfiVqAWQIGEEKAYJgBVqDJ{BHa@jAkNJw@Pw@V{APs@^aABQAOEQGKoJ_FuJkFqAo@{A}@sH{DiAs@Q]?WVy@`@oBt@_CB]KYMMkB{AQEI@WT{BlE{@zAQPI@ICsCqA_BcAeCmAaFmCqIoEcLeG}KcG}A}@cDaBiDsByAkAuBqBi@y@_@o@o@kB}BgIoA_EUkAMcACa@BeBBq@LaAJe@b@uA`@_AdBcD`@iAPq@RgALqAB{@EqAyAoOCy@AmCBmANqBLqAZkB\\iCPiBJwCCsASiCq@iD]eA]y@[i@w@mAa@i@k@g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@rAxBd@rA\\fARdAPjANrB?f@AtBCd@QfBkAjJOlBChA?rBFrBNlBdAfKFzAC~@Iz@Mz@Sv@s@jBmAxBi@hAWt@Sv@Qx@O`BA`@?dAPfBVpAd@`BfBlFf@fBdA~Cr@pAz@fApBhBjAt@H?IL?FBFJLx@^lHvDvh@~XnElCbAd@pGhDbAb@nAr@`Ad@`GhDnBbAxCbBrWhNJJDPARGP_@t@Qh@]pAUtAoA`Ny@jJApBBNFLJFJBv@Hb@HBF?\\",
"resource_state": 3,
"summary_polyline": "ki{eFvqfiVsBmA`Feh@qg@iX`B}JeCcCqGjIq~@kf@cM{KeHeX`@_GdGkSeBiXtB}YuEkPwFyDeAzAe@pC~DfGc@bIOsGmCcEiD~@oBuEkFhBcBmDiEfAVuDiAuD}NnDaNiIlCyDD_CtJKv@wGhD]YyEzBo@g@uKxGmHpCGtEtI~AuLrHkAcAaIvEgH_EaDR_FpBuBg@sNxHqEtHgLoTpIiCzKNr[sB|Es\\`JyObYeMbGsMnPsAfDxAnD}DBu@bCx@{BbEEyAoD`AmChNoQzMoGhOwX|[yIzBeFKg[zAkIdU_LiHxK}HzEh@vM_BtBg@xGzDbCcF~GhArHaIfByAhLsDiJuC?_HbHd@nL_Cz@ZnEkDDy@hHwJLiCbIrNrIvN_EfAjDWlEnEiAfBxDlFkBfBtEfDaAzBvDKdFx@|@XgJmDsHhAgD`GfElEzOwBnYdBxXgGlSc@bGdHpW|HdJztBnhAgFxc@HnCvBdA"
},
"trainer": false,
"commute": false,
"manual": false,
"private": false,
"flagged": false,
"gear_id": "b12345678987654321",
"from_accepted_tag": false,
"average_speed": 6.679,
"max_speed": 18.5,
"average_cadence": 78.5,
"average_temp": 4,
"average_watts": 185.5,
"weighted_average_watts": 230,
"kilojoules": 780.5,
"device_watts": true,
"has_heartrate": false,
"max_watts": 743,
"elev_high": 446.6,
"elev_low": 17.2,
"pr_count": 0,
"total_photo_count": 2,
"has_kudoed": false,
"workout_type": 10,
"description": "",
"calories": 870.2,
"segment_efforts": [
{
"id": 12345678987654320,
"resource_state": 2,
"name": "Tunnel Rd.",
"activity": {
"id": 12345678987654320,
"resource_state": 1
},
"athlete": {
"id": 12345678987654320,
"resource_state": 1
},
"elapsed_time": 2038,
"moving_time": 2038,
"start_date": "2018-02-16T14:56:25+00:00",
"start_date_local": "2018-02-16T06:56:25+00:00",
"distance": 9434.8,
"start_index": 211,
"end_index": 2246,
"average_cadence": 78.6,
"device_watts": true,
"average_watts": 237.6,
"segment": {
"id": 673683,
"resource_state": 2,
"name": "Tunnel Rd.",
"activity_type": "Ride",
"distance": 9220.7,
"average_grade": 4.2,
"maximum_grade": 25.8,
"elevation_high": 426.5,
"elevation_low": 43.4,
"start_latlng": [
37.8346153,
-122.2520872
],
"end_latlng": [
37.8476261,
-122.2008944
],
"climb_category": 3,
"city": "Oakland",
"state": "CA",
"country": "United States",
"private": false,
"hazardous": false,
"starred": false
},
"achievements": [],
"hidden": false
}
],
"splits_metric": [
{
"distance": 1001.5,
"elapsed_time": 141,
"elevation_difference": 4.4,
"moving_time": 141,
"split": 1,
"average_speed": 7.1,
"pace_zone": 0
}
],
"laps": [
{
"id": 4479306946,
"resource_state": 2,
"name": "Lap 1",
"activity": {
"id": 1410355832,
"resource_state": 1
},
"athlete": {
"id": 134815,
"resource_state": 1
},
"elapsed_time": 1573,
"moving_time": 1569,
"start_date": "2018-02-16T14:52:54+00:00",
"start_date_local": "2018-02-16T06:52:54+00:00",
"distance": 8046.72,
"start_index": 0,
"end_index": 1570,
"total_elevation_gain": 276,
"average_speed": 5.12,
"max_speed": 9.5,
"average_cadence": 78.6,
"device_watts": true,
"average_watts": 233.1,
"lap_index": 1,
"split": 1
}
],
"gear": {
"id": "b12345678987654321",
"primary": true,
"name": "Tarmac",
"resource_state": 2,
"distance": 32547610
},
"photos": {
"primary": {
"unique_id": "3FDGKL3-204E-4867-9E8D-89FC79EAAE17",
"urls": {
"100": "https://dgtzuqphqg23d.cloudfront.net/Bv93zv5t_mr57v0wXFbY_JyvtucgmU5Ym6N9z_bKeUI-128x96.jpg",
"600": "https://dgtzuqphqg23d.cloudfront.net/Bv93zv5t_mr57v0wXFbY_JyvtucgmU5Ym6N9z_bKeUI-768x576.jpg"
},
"source": 1
},
"use_primary_photo": true,
"count": 2
},
"highlighted_kudosers": [
{
"destination_url": "strava://athletes/12345678987654321",
"display_name": "Marianne V.",
"avatar_url": "https://dgalywyr863hv.cloudfront.net/pictures/athletes/12345678987654321/12345678987654321/3/medium.jpg",
"show_name": true
}
],
"hide_from_home": false,
"device_name": "Garmin Edge 1030",
"embed_token": "18e4615989b47dd4ff3dc711b0aa4502e4b311a9",
"segment_leaderboard_opt_out": false,
"leaderboard_opt_out": false
}
}
}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Fault"
}
}
}
}
},
"x-codegen-request-body-name": "body"
}
},
"/athlete/activities": {
"get": {
"tags": [
"Activities"
],
"summary": "List Athlete Activities",
"description": "Returns the activities of an athlete for a specific identifier. Requires activity:read. Only Me activities will be filtered out unless requested by a token with activity:read_all.",
"operationId": "getLoggedInAthleteActivities",
"parameters": [
{
"name": "before",
"in": "query",
"description": "An epoch timestamp to use for filtering activities that have taken place before a certain time. Use Python to calculate",
"schema": {
"type": "integer"
}
},
{
"name": "after",
"in": "query",
"description": "An epoch timestamp to use for filtering activities that have taken place after a certain time. Use Python to calculate",
"schema": {
"type": "integer"
}
},
{
"name": "page",
"in": "query",
"description": "Page number. Defaults to 1.",
"schema": {
"type": "integer"
}
},
{
"name": "per_page",
"in": "query",
"description": "Number of items per page. Defaults to 30.",
"schema": {
"type": "integer",
"default": 30
}
}
],
"responses": {
"200": {
"description": "The authenticated athlete's activities",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SummaryActivity"
}
},
"example": [
{
"resource_state": 2,
"athlete": {
"id": 134815,
"resource_state": 1
},
"name": "Happy Friday",
"distance": 24931.4,
"moving_time": 4500,
"elapsed_time": 4500,
"total_elevation_gain": 0,
"type": "Ride",
"sport_type": "MountainBikeRide",
"id": 154504250376823,
"external_id": "garmin_push_12345678987654321",
"upload_id": 987654321234567900000,
"start_date": "2018-05-02T12:15:09+00:00",
"start_date_local": "2018-05-02T05:15:09+00:00",
"timezone": "(GMT-08:00) America/Los_Angeles",
"utc_offset": -25200,
"location_country": "United States",
"achievement_count": 0,
"kudos_count": 3,
"comment_count": 1,
"athlete_count": 1,
"photo_count": 0,
"map": {
"id": "a12345678987654321",
"resource_state": 2
},
"trainer": true,
"commute": false,
"manual": false,
"private": false,
"flagged": false,
"gear_id": "b12345678987654321",
"from_accepted_tag": false,
"average_speed": 5.54,
"max_speed": 11,
"average_cadence": 67.1,
"average_watts": 175.3,
"weighted_average_watts": 210,
"kilojoules": 788.7,
"device_watts": true,
"has_heartrate": true,
"average_heartrate": 140.3,
"max_heartrate": 178,
"max_watts": 406,
"pr_count": 0,
"total_photo_count": 1,
"has_kudoed": false,
"suffer_score": 82
},
{
"resource_state": 2,
"athlete": {
"id": 167560,
"resource_state": 1
},
"name": "Bondcliff",
"distance": 23676.5,
"moving_time": 5400,
"elapsed_time": 5400,
"total_elevation_gain": 0,
"type": "Ride",
"sport_type": "MountainBikeRide",
"id": 1234567809,
"external_id": "garmin_push_12345678987654321",
"upload_id": 1234567819,
"start_date": "2018-04-30T12:35:51+00:00",
"start_date_local": "2018-04-30T05:35:51+00:00",
"timezone": "(GMT-08:00) America/Los_Angeles",
"utc_offset": -25200,
"location_country": "United States",
"achievement_count": 0,
"kudos_count": 4,
"comment_count": 0,
"athlete_count": 1,
"photo_count": 0,
"map": {
"id": "a12345689",
"resource_state": 2
},
"trainer": true,
"commute": false,
"manual": false,
"private": false,
"flagged": false,
"gear_id": "b12345678912343",
"from_accepted_tag": false,
"average_speed": 4.385,
"max_speed": 8.8,
"average_cadence": 69.8,
"average_watts": 200,
"weighted_average_watts": 214,
"kilojoules": 1080,
"device_watts": true,
"has_heartrate": true,
"average_heartrate": 152.4,
"max_heartrate": 183,
"max_watts": 403,
"pr_count": 0,
"total_photo_count": 1,
"has_kudoed": false,
"suffer_score": 162
}
]
}
}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Fault"
}
}
}
}
}
}
},
"/activities/{id}/laps": {
"get": {
"tags": [
"Activities"
],
"summary": "List Activity Laps",
"description": "Returns the laps of an activity identified by an identifier. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.",
"operationId": "getLapsByActivityId",
"parameters": [
{
"name": "id",
"in": "path",
"description": "The identifier of the activity.",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "Activity Laps.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Lap"
}
},
"example": [
{
"id": 12345678987654320,
"resource_state": 2,
"name": "Lap 1",
"activity": {
"id": 12345678987654320,
"resource_state": 1
},
"athlete": {
"id": 12345678987654320,
"resource_state": 1
},
"elapsed_time": 1691,
"moving_time": 1587,
"start_date": "2018-02-08T14:13:37+00:00",
"start_date_local": "2018-02-08T06:13:37+00:00",
"distance": 8046.72,
"start_index": 0,
"end_index": 1590,
"total_elevation_gain": 270,
"average_speed": 4.76,
"max_speed": 9.4,
"average_cadence": 79,
"device_watts": true,
"average_watts": 228.2,
"lap_index": 1,
"split": 1
}
]
}
}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Fault"
}
}
}
}
}
}
},
"/activities/{id}/zones": {
"get": {
"tags": [
"Activities"
],
"summary": "Get Activity Zones",
"description": "Summit Feature. Returns the zones of a given activity. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.",
"operationId": "getZonesByActivityId",
"parameters": [
{
"name": "id",
"in": "path",
"description": "The identifier of the activity.",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "Activity Zones.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ActivityZone"
}
}
}
}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Fault"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"ActivityStats": {
"type": "object",
"properties": {
"biggest_ride_distance": {
"type": "number",
"description": "The longest distance ridden by the athlete.",
"format": "double"
},
"biggest_climb_elevation_gain": {
"type": "number",
"description": "The highest climb ridden by the athlete.",
"format": "double"
},
"recent_ride_totals": {
"$ref": "#/components/schemas/ActivityTotal"
},
"recent_run_totals": {
"$ref": "#/components/schemas/ActivityTotal"
},
"recent_swim_totals": {
"$ref": "#/components/schemas/ActivityTotal"
},
"ytd_ride_totals": {
"$ref": "#/components/schemas/ActivityTotal"
},
"ytd_run_totals": {
"$ref": "#/components/schemas/ActivityTotal"
},
"ytd_swim_totals": {
"$ref": "#/components/schemas/ActivityTotal"
},
"all_ride_totals": {
"$ref": "#/components/schemas/ActivityTotal"
},
"all_run_totals": {
"$ref": "#/components/schemas/ActivityTotal"
},
"all_swim_totals": {
"$ref": "#/components/schemas/ActivityTotal"
}
},
"description": "A set of rolled-up statistics and totals for an athlete"
},
"ActivityTotal": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"description": "The number of activities considered in this total."
},
"distance": {
"type": "number",
"description": "The total distance covered by the considered activities.",
"format": "float"
},
"moving_time": {
"type": "integer",
"description": "The total moving time of the considered activities."
},
"elapsed_time": {
"type": "integer",
"description": "The total elapsed time of the considered activities."
},
"elevation_gain": {
"type": "number",
"description": "The total elevation gain of the considered activities.",
"format": "float"
},
"achievement_count": {
"type": "integer",
"description": "The total number of achievements of the considered activities."
}
},
"description": "A roll-up of metrics pertaining to a set of activities. Values are in seconds and meters."
},
"Fault": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"description": "The set of specific errors associated with this fault, if any.",
"items": {
"$ref": "#/components/schemas/Error"
}
},
"message": {
"type": "string",
"description": "The message of the fault."
}
},
"description": "Encapsulates the errors that may be returned from the API."
},
"Error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The code associated with this error."
},
"field": {
"type": "string",
"description": "The specific field or aspect of the resource associated with this error."
},
"resource": {
"type": "string",
"description": "The type of resource associated with this error."
}
}
},
"DetailedAthlete": {
"allOf": [
{
"$ref": "#/components/schemas/SummaryAthlete"
},
{
"type": "object",
"properties": {
"follower_count": {
"type": "integer",
"description": "The athlete's follower count."
},
"friend_count": {
"type": "integer",
"description": "The athlete's friend count."
},
"measurement_preference": {
"type": "string",
"description": "The athlete's preferred unit system.",
"enum": [
"feet",
"meters"
]
},
"ftp": {
"type": "integer",
"description": "The athlete's FTP (Functional Threshold Power)."
},
"weight": {
"type": "number",
"description": "The athlete's weight.",
"format": "float"
},
"clubs": {
"type": "array",
"description": "The athlete's clubs.",
"items": {
"$ref": "#/components/schemas/SummaryClub"
}
},
"bikes": {
"type": "array",
"description": "The athlete's bikes.",
"items": {
"$ref": "#/components/schemas/SummaryGear"
}
},
"shoes": {
"type": "array",
"description": "The athlete's shoes.",
"items": {
"$ref": "#/components/schemas/SummaryGear"
}
}
}
}
]
},
"SummaryAthlete": {
"allOf": [
{
"$ref": "#/components/schemas/MetaAthlete"
},
{
"type": "object",
"properties": {
"resource_state": {
"type": "integer",
"description": "Resource state, indicates level of detail. Possible values: 1 -> \"meta\", 2 -> \"summary\", 3 -> \"detail\""
},
"firstname": {
"type": "string",
"description": "The athlete's first name."
},
"lastname": {
"type": "string",
"description": "The athlete's last name."
},
"profile_medium": {
"type": "string",
"description": "URL to a 62x62 pixel profile picture."
},
"profile": {
"type": "string",
"description": "URL to a 124x124 pixel profile picture."
},
"city": {
"type": "string",
"description": "The athlete's city."
},
"state": {
"type": "string",
"description": "The athlete's state or geographical region."
},
"country": {
"type": "string",
"description": "The athlete's country."
},
"sex": {
"type": "string",
"description": "The athlete's sex.",
"enum": [
"M",
"F"
]
},
"premium": {
"type": "boolean",
"description": "Deprecated. Use summit field instead. Whether the athlete has any Summit subscription."
},
"summit": {
"type": "boolean",
"description": "Whether the athlete has any Summit subscription."
},
"created_at": {
"type": "string",
"description": "The time at which the athlete was created.",
"format": "date-time"
},
"updated_at": {
"type": "string",
"description": "The time at which the athlete was last updated.",
"format": "date-time"
}
}
}
]
},
"MetaAthlete": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier of the athlete",
"format": "int64"
}
}
},
"ActivityType": {
"type": "string",
"description": "An enumeration of the types an activity may have. Note that this enumeration does not include new sport types (e.g. MountainBikeRide, EMountainBikeRide), activities with these sport types will have the corresponding activity type (e.g. Ride for MountainBikeRide, EBikeRide for EMountainBikeRide)",
"enum": [
"AlpineSki",
"BackcountrySki",
"Canoeing",
"Crossfit",
"EBikeRide",
"Elliptical",
"Golf",
"Handcycle",
"Hike",
"IceSkate",
"InlineSkate",
"Kayaking",
"Kitesurf",
"NordicSki",
"Ride",
"RockClimbing",
"RollerSki",
"Rowing",
"Run",
"Sail",
"Skateboard",
"Snowboard",
"Snowshoe",
"Soccer",
"StairStepper",
"StandUpPaddling",
"Surfing",
"Swim",
"Velomobile",
"VirtualRide",
"VirtualRun",
"Walk",
"WeightTraining",
"Wheelchair",
"Windsurf",
"Workout",
"Yoga"
]
},
"Zones": {
"type": "object",
"properties": {
"heart_rate": {
"$ref": "#/components/schemas/HeartRateZoneRanges"
},
"power": {
"$ref": "#/components/schemas/PowerZoneRanges"
}
}
},
"HeartRateZoneRanges": {
"type": "object",
"properties": {
"custom_zones": {
"type": "boolean",
"description": "Whether the athlete has set their own custom heart rate zones"
},
"zones": {
"$ref": "#/components/schemas/ZoneRanges"
}
}
},
"ZoneRanges": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ZoneRange"
}
},
"ZoneRange": {
"type": "object",
"properties": {
"min": {
"type": "integer",
"description": "The minimum value in the range."
},
"max": {
"type": "integer",
"description": "The maximum value in the range."
}
}
},
"PowerZoneRanges": {
"type": "object",
"properties": {
"zones": {
"$ref": "#/components/schemas/ZoneRanges"
}
}
},
"LatLng": {
"maxItems": 2,
"minItems": 2,
"type": "array",
"description": "A pair of latitude/longitude coordinates, represented as an array of 2 floating point numbers.",
"items": {
"type": "number",
"format": "float"
}
},
"SummaryPRSegmentEffort": {
"type": "object",
"properties": {
"pr_activity_id": {
"type": "integer",
"description": "The unique identifier of the activity related to the PR effort.",
"format": "int64"
},
"pr_elapsed_time": {
"type": "integer",
"description": "The elapsed time ot the PR effort."
},
"pr_date": {
"type": "string",
"description": "The time at which the PR effort was started.",
"format": "date-time"
},
"effort_count": {
"type": "integer",
"description": "Number of efforts by the authenticated athlete on this segment."
}
}
},
"SummarySegmentEffort": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier of this effort",
"format": "int64"
},
"activity_id": {
"type": "integer",
"description": "The unique identifier of the activity related to this effort",
"format": "int64"
},
"elapsed_time": {
"type": "integer",
"description": "The effort's elapsed time"
},
"start_date": {
"type": "string",
"description": "The time at which the effort was started.",
"format": "date-time"
},
"start_date_local": {
"type": "string",
"description": "The time at which the effort was started in the local timezone.",
"format": "date-time"
},
"distance": {
"type": "number",
"description": "The effort's distance in meters",
"format": "float"
},
"is_kom": {
"type": "boolean",
"description": "Whether this effort is the current best on the leaderboard"
}
}
},
"PolylineMap": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The identifier of the map"
},
"polyline": {
"type": "string",
"description": "The polyline of the map, only returned on detailed representation of an object"
},
"summary_polyline": {
"type": "string",
"description": "The summary polyline of the map"
}
}
},
"DetailedSegmentEffort": {
"allOf": [
{
"$ref": "#/components/schemas/SummarySegmentEffort"
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the segment on which this effort was performed"
},
"activity": {
"$ref": "#/components/schemas/MetaActivity"
},
"athlete": {
"$ref": "#/components/schemas/MetaAthlete"
},
"moving_time": {
"type": "integer",
"description": "The effort's moving time"
},
"start_index": {
"type": "integer",
"description": "The start index of this effort in its activity's stream"
},
"end_index": {
"type": "integer",
"description": "The end index of this effort in its activity's stream"
},
"average_cadence": {
"type": "number",
"description": "The effort's average cadence",
"format": "float"
},
"average_watts": {
"type": "number",
"description": "The average wattage of this effort",
"format": "float"
},
"device_watts": {
"type": "boolean",
"description": "For riding efforts, whether the wattage was reported by a dedicated recording device"
},
"average_heartrate": {
"type": "number",
"description": "The heart heart rate of the athlete during this effort",
"format": "float"
},
"max_heartrate": {
"type": "number",
"description": "The maximum heart rate of the athlete during this effort",
"format": "float"
},
"segment": {
"$ref": "#/components/schemas/SummarySegment"
},
"kom_rank": {
"maximum": 10,
"minimum": 1,
"type": "integer",
"description": "The rank of the effort on the global leaderboard if it belongs in the top 10 at the time of upload"
},
"pr_rank": {
"maximum": 3,
"minimum": 1,
"type": "integer",
"description": "The rank of the effort on the athlete's leaderboard if it belongs in the top 3 at the time of upload"
},
"hidden": {
"type": "boolean",
"description": "Whether this effort should be hidden when viewed within an activity"
}
}
}
]
},
"MetaActivity": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier of the activity",
"format": "int64"
}
}
},
"SummaryActivity": {
"allOf": [
{
"$ref": "#/components/schemas/MetaActivity"
},
{
"type": "object",
"properties": {
"external_id": {
"type": "string",
"description": "The identifier provided at upload time"
},
"upload_id": {
"type": "integer",
"description": "The identifier of the upload that resulted in this activity",
"format": "int64"
},
"athlete": {
"$ref": "#/components/schemas/MetaAthlete"
},
"name": {
"type": "string",
"description": "The name of the activity"
},
"distance": {
"type": "number",
"description": "The activity's distance, in meters",
"format": "float"
},
"moving_time": {
"type": "integer",
"description": "The activity's moving time, in seconds"
},
"elapsed_time": {
"type": "integer",
"description": "The activity's elapsed time, in seconds"
},
"total_elevation_gain": {
"type": "number",
"description": "The activity's total elevation gain.",
"format": "float"
},
"elev_high": {
"type": "number",
"description": "The activity's highest elevation, in meters",
"format": "float"
},
"elev_low": {
"type": "number",
"description": "The activity's lowest elevation, in meters",
"format": "float"
},
"type": {
"$ref": "#/components/schemas/ActivityType"
},
"sport_type": {
"$ref": "#/components/schemas/SportType"
},
"start_date": {
"type": "string",
"description": "The time at which the activity was started.",
"format": "date-time"
},
"start_date_local": {
"type": "string",
"description": "The time at which the activity was started in the local timezone.",
"format": "date-time"
},
"timezone": {
"type": "string",
"description": "The timezone of the activity"
},
"start_latlng": {
"$ref": "#/components/schemas/LatLng"
},
"end_latlng": {
"$ref": "#/components/schemas/LatLng"
},
"achievement_count": {
"type": "integer",
"description": "The number of achievements gained during this activity"
},
"kudos_count": {
"type": "integer",
"description": "The number of kudos given for this activity"
},
"comment_count": {
"type": "integer",
"description": "The number of comments for this activity"
},
"athlete_count": {
"minimum": 1,
"type": "integer",
"description": "The number of athletes for taking part in a group activity"
},
"photo_count": {
"type": "integer",
"description": "The number of Instagram photos for this activity"
},
"total_photo_count": {
"type": "integer",
"description": "The number of Instagram and Strava photos for this activity"
},
"map": {
"$ref": "#/components/schemas/PolylineMap"
},
"trainer": {
"type": "boolean",
"description": "Whether this activity was recorded on a training machine"
},
"commute": {
"type": "boolean",
"description": "Whether this activity is a commute"
},
"manual": {
"type": "boolean",
"description": "Whether this activity was created manually"
},
"private": {
"type": "boolean",
"description": "Whether this activity is private"
},
"flagged": {
"type": "boolean",
"description": "Whether this activity is flagged"
},
"workout_type": {
"type": "integer",
"description": "The activity's workout type"
},
"upload_id_str": {
"type": "string",
"description": "The unique identifier of the upload in string format"
},
"average_speed": {
"type": "number",
"description": "The activity's average speed, in meters per second",
"format": "float"
},
"max_speed": {
"type": "number",
"description": "The activity's max speed, in meters per second",
"format": "float"
},
"has_kudoed": {
"type": "boolean",
"description": "Whether the logged-in athlete has kudoed this activity"
},
"hide_from_home": {
"type": "boolean",
"description": "Whether the activity is muted"
},
"gear_id": {
"type": "string",
"description": "The id of the gear for the activity"
},
"kilojoules": {
"type": "number",
"description": "The total work done in kilojoules during this activity. Rides only",
"format": "float"
},
"average_watts": {
"type": "number",
"description": "Average power output in watts during this activity. Rides only",
"format": "float"
},
"device_watts": {
"type": "boolean",
"description": "Whether the watts are from a power meter, false if estimated"
},
"max_watts": {
"type": "integer",
"description": "Rides with power meter data only"
},
"weighted_average_watts": {
"type": "integer",
"description": "Similar to Normalized Power. Rides with power meter data only"
}
}
}
]
},
"SportType": {
"type": "string",
"description": "An enumeration of the sport types an activity may have. Distinct from ActivityType in that it has new types (e.g. MountainBikeRide)",
"enum": [
"AlpineSki",
"BackcountrySki",
"Badminton",
"Canoeing",
"Crossfit",
"EBikeRide",
"Elliptical",
"EMountainBikeRide",
"Golf",
"GravelRide",
"Handcycle",
"HighIntensityIntervalTraining",
"Hike",
"IceSkate",
"InlineSkate",
"Kayaking",
"Kitesurf",
"MountainBikeRide",
"NordicSki",
"Pickleball",
"Pilates",
"Racquetball",
"Ride",
"RockClimbing",
"RollerSki",
"Rowing",
"Run",
"Sail",
"Skateboard",
"Snowboard",
"Snowshoe",
"Soccer",
"Squash",
"StairStepper",
"StandUpPaddling",
"Surfing",
"Swim",
"TableTennis",
"Tennis",
"TrailRun",
"Velomobile",
"VirtualRide",
"VirtualRow",
"VirtualRun",
"Walk",
"WeightTraining",
"Wheelchair",
"Windsurf",
"Workout",
"Yoga"
]
},
"PhotosSummary": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"description": "The number of photos"
},
"primary": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"source": {
"type": "integer"
},
"unique_id": {
"type": "string"
},
"urls": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"Lap": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier of this lap",
"format": "int64"
},
"activity": {
"$ref": "#/components/schemas/MetaActivity"
},
"athlete": {
"$ref": "#/components/schemas/MetaAthlete"
},
"average_cadence": {
"type": "number",
"description": "The lap's average cadence",
"format": "float"
},
"average_speed": {
"type": "number",
"description": "The lap's average speed",
"format": "float"
},
"distance": {
"type": "number",
"description": "The lap's distance, in meters",
"format": "float"
},
"elapsed_time": {
"type": "integer",
"description": "The lap's elapsed time, in seconds"
},
"start_index": {
"type": "integer",
"description": "The start index of this effort in its activity's stream"
},
"end_index": {
"type": "integer",
"description": "The end index of this effort in its activity's stream"
},
"lap_index": {
"type": "integer",
"description": "The index of this lap in the activity it belongs to"
},
"max_speed": {
"type": "number",
"description": "The maximum speed of this lat, in meters per second",
"format": "float"
},
"moving_time": {
"type": "integer",
"description": "The lap's moving time, in seconds"
},
"name": {
"type": "string",
"description": "The name of the lap"
},
"pace_zone": {
"type": "integer",
"description": "The athlete's pace zone during this lap"
},
"split": {
"type": "integer"
},
"start_date": {
"type": "string",
"description": "The time at which the lap was started.",
"format": "date-time"
},
"start_date_local": {
"type": "string",
"description": "The time at which the lap was started in the local timezone.",
"format": "date-time"
},
"total_elevation_gain": {
"type": "number",
"description": "The elevation gain of this lap, in meters",
"format": "float"
}
}
},
"UpdatableActivity": {
"type": "object",
"properties": {
"commute": {
"type": "boolean",
"description": "Whether this activity is a commute"
},
"trainer": {
"type": "boolean",
"description": "Whether this activity was recorded on a training machine"
},
"hide_from_home": {
"type": "boolean",
"description": "Whether this activity is muted"
},
"description": {
"type": "string",
"description": "The description of the activity"
},
"name": {
"type": "string",
"description": "The name of the activity"
},
"type": {
"$ref": "#/components/schemas/ActivityType"
},
"sport_type": {
"$ref": "#/components/schemas/SportType"
},
"gear_id": {
"type": "string",
"description": "Identifier for the gear associated with the activity. ‘none’ clears gear from activity"
}
}
},
"ActivityZone": {
"type": "object",
"properties": {
"score": {
"type": "integer"
},
"distribution_buckets": {
"$ref": "#/components/schemas/TimedZoneDistribution"
},
"type": {
"type": "string",
"enum": [
"heartrate",
"power"
]
},
"sensor_based": {
"type": "boolean"
},
"points": {
"type": "integer"
},
"custom_zones": {
"type": "boolean"
},
"max": {
"type": "integer"
}
}
},
"TimedZoneDistribution": {
"type": "array",
"description": "Stores the exclusive ranges representing zones and the time spent in each.",
"items": {
"$ref": "#/components/schemas/TimedZoneRange"
}
},
"TimedZoneRange": {
"description": "A union type representing the time spent in a given zone.",
"allOf": [
{
"$ref": "#/components/schemas/ZoneRange"
},
{
"type": "object",
"properties": {
"time": {
"type": "integer",
"description": "The number of seconds spent in this zone"
}
}
}
]
}
},
"parameters": {
"page": {
"name": "page",
"in": "query",
"description": "Page number. Defaults to 1.",
"schema": {
"type": "integer"
}
},
"perPage": {
"name": "per_page",
"in": "query",
"description": "Number of items per page. Defaults to 30.",
"schema": {
"type": "integer",
"default": 30
}
}
},
"securitySchemes": {
"strava_oauth": {
"type": "oauth2",
"flows": {
"authorizationCode": {
"authorizationUrl": "https://www.strava.com/api/v3/oauth/authorize",
"tokenUrl": "https://www.strava.com/api/v3/oauth/token",
"scopes": {
"read": "Read public segments, public routes, public profile data, public posts, public events, club feeds, and leaderboards",
"read_all": "Read private routes, private segments, and private events for the user",
"profile:read_all": "Read all profile information even if the user has set their profile visibility to Followers or Only You",
"profile:write": "Update the user's weight and Functional Threshold Power (FTP), and access to star or unstar segments on their behalf",
"activity:read": "Read the user's activity data for activities that are visible to Everyone and Followers, excluding privacy zone data",
"activity:read_all": "The same access as activity:read, plus privacy zone data and access to read the user's activities with visibility set to Only You",
"activity:write": "Access to create manual activities and uploads, and access to edit any activities that are visible to the app, based on activity read access level"
}
}
}
}
}
},
"x-original-swagger-version": "2.0"
}