Strava API v3

Activities

Create an Activity (createActivity)

Creates a manual activity for an athlete, requires activity:write scope.

post
/activities

Parameters

name
required String, in form
The name of the activity.
type
String, in form
Type of activity. For example - Run, Ride etc.
sport_type
required String, in form
Sport type of activity. For example - Run, MountainBikeRide, Ride, etc.
start_date_local
required Date, in form
ISO 8601 formatted date time.
elapsed_time
required Integer, in form
In seconds.
description
String, in form
Description of the activity.
distance
Float, in form
In meters.
trainer
Integer, in form
Set to 1 to mark as a trainer activity.
commute
Integer, in form
Set to 1 to mark as commute.

Responses

HTTP code 201 The activity's detailed representation. An instance of DetailedActivity.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http post "https://www.strava.com/api/v3/activities" name='value' type='value' sport_type='value' start_date_local='value' elapsed_time='value' description='value' distance='value' trainer='value' commute='value' "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.ActivitiesApi;

import rx.Observable;

public class ActivitiesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    ActivitiesApi api = client.createService(ActivitiesApi.class);

    String name = name_example; // String | The name of the activity.
    String sportType = sportType_example; // String | Sport type of activity. For example - Run, MountainBikeRide, Ride, etc.
    Date startDateLocal = 2013-10-20T19:20:30+01:00; // Date | ISO 8601 formatted date time.
    Integer elapsedTime = 56; // Integer | In seconds.
    String type = type_example; // String | Type of activity. For example - Run, Ride etc.
    String description = description_example; // String | Description of the activity.
    Float distance = 3.4; // Float | In meters.
    Integer trainer = 56; // Integer | Set to 1 to mark as a trainer activity.
    Integer commute = 56; // Integer | Set to 1 to mark as commute.

    Observable<DetailedActivity> result = apiInstance.createActivity(name, sportType, startDateLocal, elapsedTime, type, description, distance, trainer, commute);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *name = name_example; // The name of the activity.
String *sportType = sportType_example; // Sport type of activity. For example - Run, MountainBikeRide, Ride, etc.
Date *startDateLocal = 2013-10-20T19:20:30+01:00; // ISO 8601 formatted date time.
Integer *elapsedTime = 56; // In seconds.
String *type = type_example; // Type of activity. For example - Run, Ride etc. (optional)
String *description = description_example; // Description of the activity. (optional)
Float *distance = 3.4; // In meters. (optional)
Integer *trainer = 56; // Set to 1 to mark as a trainer activity. (optional)
Integer *commute = 56; // Set to 1 to mark as commute. (optional)

STRVActivitiesApi *apiInstance = [[STRVActivitiesApi alloc] init];

// Create an Activity
[apiInstance createActivityWith:name
    sportType:sportType
    startDateLocal:startDateLocal
    elapsedTime:elapsedTime
    type:type
    description:description
    distance:distance
    trainer:trainer
    commute:commute
              completionHandler: ^(STRVDetailedActivity output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.ActivitiesApi()

var name = name_example; // {String} The name of the activity.

var sportType = sportType_example; // {String} Sport type of activity. For example - Run, MountainBikeRide, Ride, etc.

var startDateLocal = 2013-10-20T19:20:30+01:00; // {Date} ISO 8601 formatted date time.

var elapsedTime = 56; // {Integer} In seconds.

var opts = { 
  'type': type_example, // {String} Type of activity. For example - Run, Ride etc.
  'description': description_example, // {String} Description of the activity.
  'distance': 3.4, // {Float} In meters.
  'trainer': 56, // {Integer} Set to 1 to mark as a trainer activity.
  'commute': 56 // {Integer} Set to 1 to mark as commute.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createActivity(name, sportType, startDateLocal, elapsedTime, opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class createActivityExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ActivitiesApi();
            var name = name_example;  // String | The name of the activity.
            var sportType = sportType_example;  // String | Sport type of activity. For example - Run, MountainBikeRide, Ride, etc.
            var startDateLocal = 2013-10-20T19:20:30+01:00;  // Date | ISO 8601 formatted date time.
            var elapsedTime = 56;  // Integer | In seconds.
            var type = type_example;  // String | Type of activity. For example - Run, Ride etc. (optional) 
            var description = description_example;  // String | Description of the activity. (optional) 
            var distance = 3.4;  // Float | In meters. (optional) 
            var trainer = 56;  // Integer | Set to 1 to mark as a trainer activity. (optional) 
            var commute = 56;  // Integer | Set to 1 to mark as commute. (optional) 

            try
            {
                // Create an Activity
                DetailedActivity result = apiInstance.createActivity(name, sportType, startDateLocal, elapsedTime, type, description, distance, trainer, commute);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ActivitiesApi.createActivity: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ActivitiesApi()
name = name_example # String | The name of the activity.
sportType = sportType_example # String | Sport type of activity. For example - Run, MountainBikeRide, Ride, etc.
startDateLocal = 2013-10-20T19:20:30+01:00 # Date | ISO 8601 formatted date time.
elapsedTime = 56 # Integer | In seconds.
type = type_example # String | Type of activity. For example - Run, Ride etc. (optional)
description = description_example # String | Description of the activity. (optional)
distance = 3.4 # Float | In meters. (optional)
trainer = 56 # Integer | Set to 1 to mark as a trainer activity. (optional)
commute = 56 # Integer | Set to 1 to mark as commute. (optional)

try: 
    # Create an Activity
    api_response = api_instance.createActivity(name, sportType, startDateLocal, elapsedTime, type=type, description=description, distance=distance, trainer=trainer, commute=commute)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ActivitiesApi->createActivity: %s\n" % e)

Sample Response

{
  "id" : 123456778928065,
  "resource_state" : 3,
  "external_id" : null,
  "upload_id" : null,
  "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:13Z",
  "start_date_local" : "2018-02-20T10:02:13Z",
  "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",
    "polyline" : null,
    "resource_state" : 3
  },
  "trainer" : false,
  "commute" : false,
  "manual" : true,
  "private" : false,
  "flagged" : false,
  "gear_id" : "b453542543",
  "from_accepted_tag" : null,
  "average_speed" : 0,
  "max_speed" : 0,
  "device_watts" : false,
  "has_heartrate" : false,
  "pr_count" : 0,
  "total_photo_count" : 0,
  "has_kudoed" : false,
  "workout_type" : null,
  "description" : null,
  "calories" : 0,
  "segment_efforts" : [ ]
}

Get Activity (getActivityById)

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.

get
/activities/{id}

Parameters

id
required Long, in path
The identifier of the activity.
include_all_efforts
Boolean, in query
To include all segments efforts.

Responses

HTTP code 200 The activity's detailed representation. An instance of DetailedActivity.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/activities/{id}?include_all_efforts=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.ActivitiesApi;

import rx.Observable;

public class ActivitiesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    ActivitiesApi api = client.createService(ActivitiesApi.class);

    Long id = 789; // Long | The identifier of the activity.
    Boolean includeAllEfforts = true; // Boolean | To include all segments efforts.

    Observable<DetailedActivity> result = apiInstance.getActivityById(id, includeAllEfforts);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the activity.
Boolean *includeAllEfforts = true; // To include all segments efforts. (optional)

STRVActivitiesApi *apiInstance = [[STRVActivitiesApi alloc] init];

// Get Activity
[apiInstance getActivityByIdWith:id
    includeAllEfforts:includeAllEfforts
              completionHandler: ^(STRVDetailedActivity output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.ActivitiesApi()

var id = 789; // {Long} The identifier of the activity.

var opts = { 
  'includeAllEfforts': true // {Boolean} To include all segments efforts.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getActivityById(id, opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getActivityByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ActivitiesApi();
            var id = 789;  // Long | The identifier of the activity.
            var includeAllEfforts = true;  // Boolean | To include all segments efforts. (optional) 

            try
            {
                // Get Activity
                DetailedActivity result = apiInstance.getActivityById(id, includeAllEfforts);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ActivitiesApi.getActivityById: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ActivitiesApi()
id = 789 # Long | The identifier of the activity.
includeAllEfforts = true # Boolean | To include all segments efforts. (optional)

try: 
    # Get Activity
    api_response = api_instance.getActivityById(id, includeAllEfforts=includeAllEfforts)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ActivitiesApi->getActivityById: %s\n" % e)

Sample Response

{
  "id" : 12345678987654321,
  "resource_state" : 3,
  "external_id" : "garmin_push_12345678987654321",
  "upload_id" : 98765432123456789,
  "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:54Z",
  "start_date_local" : "2018-02-16T06:52:54Z",
  "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@Gq@L_BHSHK|@WJETSLQZs@z@_A~@uA^U`@G\\CRB\\Tl@p@Th@JZ^bB`@lAHLXVLDP?LGFSKiDBo@d@wBVi@R]VYVE\\@`@Lh@Fh@CzAk@RSDQA]GYe@eAGWSiBAWBWBIJORK`@KPOPSTg@h@}Ad@o@F[E_@EGMKUGmAEYGMIMYKs@?a@J}@@_BD_@HQJMx@e@LKHKHWAo@UoAAWFmAH}@?w@C[YwAAc@HSNM|Ao@rA}@zAq@`@a@j@eAxAuBXQj@MXSR[b@gAFg@?YISOGaAHi@Xw@v@_@d@WRSFqARUHQJc@d@m@`A[VSFUBcAEU@WFULUPa@v@Y~@UrBc@dBI~@?l@P~ABt@N`HEjA]zAEp@@p@TrBCl@CTQb@k@dAg@jAU^KJYLK@k@A[Js@d@a@b@]RgBl@[FMAw@[]G]?m@D_@F]P[Vu@t@[TMF_@Do@E_@@q@P]PWZUZw@vAkAlAGJOj@IlAMd@OR{@p@a@d@sBpD]v@a@`Aa@n@]TODgBVk@Pe@^cBfBc@Rs@La@RSPm@|@wCpDS^Wp@QZML{@l@qBbCYd@k@lAIVCZBZNTr@`@RRHZANIZQPKDW@e@CaASU?I@YTKRQx@@\\VmALYRQLCL?v@P|@D\\GJEFKDM@OCa@COOYIGm@YMUCM@]JYr@uAx@kAt@}@jAeAPWbAkBj@s@bAiAz@oAj@m@VQlAc@VQ~@aA`Au@p@Q`AIv@MZORUV_@p@iB|AoCh@q@dAaANUNWH[N{AJ[^m@t@_Av@wA\\a@`@W`@In@Al@B^E`@Wl@u@\\[VQ\\K`@Eb@?R@dAZP@d@CRExAs@\\Yt@{@LG\\MjAATINOXo@d@kAl@_AHYBOCe@QiBCm@Fq@\\wADo@AyGEeBWuB@YHu@Tu@Lk@VcCTo@d@aA\\WJE`@G~@FP?VI\\U~@sANO`@SfAMj@U\\WjAsAXS`@UNENALBHFFL?^Ml@Uj@]b@q@RUJSPkChEc@XcAb@sA|@]PaA\\OJKNER?TDTNj@Jn@?p@OfC@ZR`B@VCV_@n@{@l@WbACv@OlABnAPl@LNNHbBBNBLFFJ@^GLg@x@i@|AMP[X}@XOJKPET?l@LhAFXp@fBDRCd@S\\_@Ps@PQ@}A]S?QDe@V]b@MR[fAKt@ErAF~CANILYDKGIKe@{@Yy@e@sB[gA[c@e@YUCU?WBUHUNQPq@`AiArAMV[^e@Zc@JQJKNMz@?r@Bb@PfAAfA@VVbADn@E`@KHSEe@SMAKDKFM\\^dDCh@m@LoAQ_@@MFOZLfBEl@QbASd@KLQBOAaAc@QAQ@QHc@v@ONMJOBOCg@c@]O[EMBKFGL?RHv@ARERGNe@h@{@h@WVGNDt@JLNFPFz@LdBf@f@PJNHPF`ADPJJJDl@I`@B^Tp@bALJNDNALIf@i@PGPCt@DNE`@Uv@[dAw@RITGRCtAARBPJLPJRZxB?VEX_@vAAR?RDNHJJBh@UnBm@h@IRDRJNNJPNbBFRJLLBLCzAmAd@Uf@Gf@?P@PFJNHPFTH`BDTHNJJJ@LG`@m@^YPER@RDPHNNJRLn@HRLN^VNPHTFX@\\UlDFb@FHh@NP@HKPsB?}ASkCQ{@[y@q@}@cA{@KOCQDa@t@{CFGJCf@Nl@ZtA~@r@p@`@h@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,
  "suffer_score" : null,
  "description" : "",
  "calories" : 870.2,
  "segment_efforts" : [ {
    "id" : 12345678987654321,
    "resource_state" : 2,
    "name" : "Tunnel Rd.",
    "activity" : {
      "id" : 12345678987654321,
      "resource_state" : 1
    },
    "athlete" : {
      "id" : 134815,
      "resource_state" : 1
    },
    "elapsed_time" : 2038,
    "moving_time" : 2038,
    "start_date" : "2018-02-16T14:56:25Z",
    "start_date_local" : "2018-02-16T06:56:25Z",
    "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
    },
    "kom_rank" : null,
    "pr_rank" : null,
    "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:54Z",
    "start_date_local" : "2018-02-16T06:52:54Z",
    "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
  },
  "partner_brand_tag" : null,
  "photos" : {
    "primary" : {
      "id" : null,
      "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
}

List Activity Comments (getCommentsByActivityId)

Returns the comments on the given activity. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.

get
/activities/{id}/comments

Parameters

id
required Long, in path
The identifier of the activity.
page
Integer, in query
Deprecated. Prefer to use after_cursor.
per_page
Integer, in query
Deprecated. Prefer to use page_size.
page_size
Integer, in query
Number of items per page. Defaults to 30.
after_cursor
String, in query
Cursor of the last item in the previous page of results, used to request the subsequent page of results. When omitted, the first page of results is fetched.

Responses

HTTP code 200 An array of Comment objects.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/activities/{id}/comments?page=&per_page=&page_size=&after_cursor=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.ActivitiesApi;

import rx.Observable;

public class ActivitiesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    ActivitiesApi api = client.createService(ActivitiesApi.class);

    Long id = 789; // Long | The identifier of the activity.
    Integer page = 56; // Integer | Deprecated. Prefer to use after_cursor.
    Integer perPage = 56; // Integer | Deprecated. Prefer to use page_size.
    Integer pageSize = 56; // Integer | Number of items per page. Defaults to 30.
    String afterCursor = afterCursor_example; // String | Cursor of the last item in the previous page of results, used to request the subsequent page of results.  When omitted, the first page of results is fetched.

    Observable<List<Comment>> result = apiInstance.getCommentsByActivityId(id, page, perPage, pageSize, afterCursor);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the activity.
Integer *page = 56; // Deprecated. Prefer to use after_cursor. (optional)
Integer *perPage = 56; // Deprecated. Prefer to use page_size. (optional) (default to 30)
Integer *pageSize = 56; // Number of items per page. Defaults to 30. (optional) (default to 30)
String *afterCursor = afterCursor_example; // Cursor of the last item in the previous page of results, used to request the subsequent page of results.  When omitted, the first page of results is fetched. (optional)

STRVActivitiesApi *apiInstance = [[STRVActivitiesApi alloc] init];

// List Activity Comments
[apiInstance getCommentsByActivityIdWith:id
    page:page
    perPage:perPage
    pageSize:pageSize
    afterCursor:afterCursor
              completionHandler: ^(NSArray<STRVComment>* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.ActivitiesApi()

var id = 789; // {Long} The identifier of the activity.

var opts = { 
  'page': 56, // {Integer} Deprecated. Prefer to use after_cursor.
  'perPage': 56, // {Integer} Deprecated. Prefer to use page_size.
  'pageSize': 56, // {Integer} Number of items per page. Defaults to 30.
  'afterCursor': afterCursor_example // {String} Cursor of the last item in the previous page of results, used to request the subsequent page of results.  When omitted, the first page of results is fetched.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCommentsByActivityId(id, opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getCommentsByActivityIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ActivitiesApi();
            var id = 789;  // Long | The identifier of the activity.
            var page = 56;  // Integer | Deprecated. Prefer to use after_cursor. (optional) 
            var perPage = 56;  // Integer | Deprecated. Prefer to use page_size. (optional)  (default to 30)
            var pageSize = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)
            var afterCursor = afterCursor_example;  // String | Cursor of the last item in the previous page of results, used to request the subsequent page of results.  When omitted, the first page of results is fetched. (optional) 

            try
            {
                // List Activity Comments
                array[Comment] result = apiInstance.getCommentsByActivityId(id, page, perPage, pageSize, afterCursor);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ActivitiesApi.getCommentsByActivityId: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ActivitiesApi()
id = 789 # Long | The identifier of the activity.
page = 56 # Integer | Deprecated. Prefer to use after_cursor. (optional)
perPage = 56 # Integer | Deprecated. Prefer to use page_size. (optional) (default to 30)
pageSize = 56 # Integer | Number of items per page. Defaults to 30. (optional) (default to 30)
afterCursor = afterCursor_example # String | Cursor of the last item in the previous page of results, used to request the subsequent page of results.  When omitted, the first page of results is fetched. (optional)

try: 
    # List Activity Comments
    api_response = api_instance.getCommentsByActivityId(id, page=page, perPage=perPage, pageSize=pageSize, afterCursor=afterCursor)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ActivitiesApi->getCommentsByActivityId: %s\n" % e)

Sample Response

[ {
  "id" : 12345678987654321,
  "activity_id" : 12345678987654321,
  "post_id" : null,
  "resource_state" : 2,
  "text" : "Good job and keep the cat pictures coming!",
  "mentions_metadata" : null,
  "created_at" : "2018-02-08T19:25:39Z",
  "athlete" : {
    "firstname" : "Peter",
    "lastname" : "S"
  },
  "cursor" : "abc123%20"
} ]

List Activity Kudoers (getKudoersByActivityId)

Returns the athletes who kudoed 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}/kudos

Parameters

id
required Long, in path
The identifier of the activity.
page
Integer, in query
Page number. Defaults to 1.
per_page
Integer, in query
Number of items per page. Defaults to 30.

Responses

HTTP code 200 An array of SummaryAthlete objects.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/activities/{id}/kudos?page=&per_page=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.ActivitiesApi;

import rx.Observable;

public class ActivitiesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    ActivitiesApi api = client.createService(ActivitiesApi.class);

    Long id = 789; // Long | The identifier of the activity.
    Integer page = 56; // Integer | Page number. Defaults to 1.
    Integer perPage = 56; // Integer | Number of items per page. Defaults to 30.

    Observable<List<SummaryAthlete>> result = apiInstance.getKudoersByActivityId(id, page, perPage);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the activity.
Integer *page = 56; // Page number. Defaults to 1. (optional)
Integer *perPage = 56; // Number of items per page. Defaults to 30. (optional) (default to 30)

STRVActivitiesApi *apiInstance = [[STRVActivitiesApi alloc] init];

// List Activity Kudoers
[apiInstance getKudoersByActivityIdWith:id
    page:page
    perPage:perPage
              completionHandler: ^(NSArray<STRVSummaryAthlete>* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.ActivitiesApi()

var id = 789; // {Long} The identifier of the activity.

var opts = { 
  'page': 56, // {Integer} Page number. Defaults to 1.
  'perPage': 56 // {Integer} Number of items per page. Defaults to 30.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getKudoersByActivityId(id, opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getKudoersByActivityIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ActivitiesApi();
            var id = 789;  // Long | The identifier of the activity.
            var page = 56;  // Integer | Page number. Defaults to 1. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Activity Kudoers
                array[SummaryAthlete] result = apiInstance.getKudoersByActivityId(id, page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ActivitiesApi.getKudoersByActivityId: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ActivitiesApi()
id = 789 # Long | The identifier of the activity.
page = 56 # Integer | Page number. Defaults to 1. (optional)
perPage = 56 # Integer | Number of items per page. Defaults to 30. (optional) (default to 30)

try: 
    # List Activity Kudoers
    api_response = api_instance.getKudoersByActivityId(id, page=page, perPage=perPage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ActivitiesApi->getKudoersByActivityId: %s\n" % e)

Sample Response

[ {
  "firstname" : "Peter",
  "lastname" : "S"
} ]

List Activity Laps (getLapsByActivityId)

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.

get
/activities/{id}/laps

Parameters

id
required Long, in path
The identifier of the activity.

Responses

HTTP code 200 An array of Lap objects.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/activities/{id}/laps" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.ActivitiesApi;

import rx.Observable;

public class ActivitiesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    ActivitiesApi api = client.createService(ActivitiesApi.class);

    Long id = 789; // Long | The identifier of the activity.

    Observable<List<Lap>> result = apiInstance.getLapsByActivityId(id);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the activity.

STRVActivitiesApi *apiInstance = [[STRVActivitiesApi alloc] init];

// List Activity Laps
[apiInstance getLapsByActivityIdWith:id
              completionHandler: ^(NSArray<STRVLap>* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.ActivitiesApi()

var id = 789; // {Long} The identifier of the activity.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLapsByActivityId(id, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getLapsByActivityIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ActivitiesApi();
            var id = 789;  // Long | The identifier of the activity.

            try
            {
                // List Activity Laps
                array[Lap] result = apiInstance.getLapsByActivityId(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ActivitiesApi.getLapsByActivityId: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ActivitiesApi()
id = 789 # Long | The identifier of the activity.

try: 
    # List Activity Laps
    api_response = api_instance.getLapsByActivityId(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ActivitiesApi->getLapsByActivityId: %s\n" % e)

Sample Response

[ {
  "id" : 12345678987654321,
  "resource_state" : 2,
  "name" : "Lap 1",
  "activity" : {
    "id" : 12345678987654321,
    "resource_state" : 1
  },
  "athlete" : {
    "id" : 12345678987654321,
    "resource_state" : 1
  },
  "elapsed_time" : 1691,
  "moving_time" : 1587,
  "start_date" : "2018-02-08T14:13:37Z",
  "start_date_local" : "2018-02-08T06:13:37Z",
  "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
} ]

List Athlete Activities (getLoggedInAthleteActivities)

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.

get
/athlete/activities

Parameters

before
Integer, in query
An epoch timestamp to use for filtering activities that have taken place before a certain time.
after
Integer, in query
An epoch timestamp to use for filtering activities that have taken place after a certain time.
page
Integer, in query
Page number. Defaults to 1.
per_page
Integer, in query
Number of items per page. Defaults to 30.

Responses

HTTP code 200 An array of SummaryActivity objects.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/athlete/activities?before=&after=&page=&per_page=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.ActivitiesApi;

import rx.Observable;

public class ActivitiesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    ActivitiesApi api = client.createService(ActivitiesApi.class);

    Integer before = 56; // Integer | An epoch timestamp to use for filtering activities that have taken place before a certain time.
    Integer after = 56; // Integer | An epoch timestamp to use for filtering activities that have taken place after a certain time.
    Integer page = 56; // Integer | Page number. Defaults to 1.
    Integer perPage = 56; // Integer | Number of items per page. Defaults to 30.

    Observable<List<SummaryActivity>> result = apiInstance.getLoggedInAthleteActivities(before, after, page, perPage);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Integer *before = 56; // An epoch timestamp to use for filtering activities that have taken place before a certain time. (optional)
Integer *after = 56; // An epoch timestamp to use for filtering activities that have taken place after a certain time. (optional)
Integer *page = 56; // Page number. Defaults to 1. (optional)
Integer *perPage = 56; // Number of items per page. Defaults to 30. (optional) (default to 30)

STRVActivitiesApi *apiInstance = [[STRVActivitiesApi alloc] init];

// List Athlete Activities
[apiInstance getLoggedInAthleteActivitiesWith:before
    after:after
    page:page
    perPage:perPage
              completionHandler: ^(NSArray<STRVSummaryActivity>* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.ActivitiesApi()

var opts = { 
  'before': 56, // {Integer} An epoch timestamp to use for filtering activities that have taken place before a certain time.
  'after': 56, // {Integer} An epoch timestamp to use for filtering activities that have taken place after a certain time.
  'page': 56, // {Integer} Page number. Defaults to 1.
  'perPage': 56 // {Integer} Number of items per page. Defaults to 30.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLoggedInAthleteActivities(opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getLoggedInAthleteActivitiesExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ActivitiesApi();
            var before = 56;  // Integer | An epoch timestamp to use for filtering activities that have taken place before a certain time. (optional) 
            var after = 56;  // Integer | An epoch timestamp to use for filtering activities that have taken place after a certain time. (optional) 
            var page = 56;  // Integer | Page number. Defaults to 1. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Athlete Activities
                array[SummaryActivity] result = apiInstance.getLoggedInAthleteActivities(before, after, page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ActivitiesApi.getLoggedInAthleteActivities: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ActivitiesApi()
before = 56 # Integer | An epoch timestamp to use for filtering activities that have taken place before a certain time. (optional)
after = 56 # Integer | An epoch timestamp to use for filtering activities that have taken place after a certain time. (optional)
page = 56 # Integer | Page number. Defaults to 1. (optional)
perPage = 56 # Integer | Number of items per page. Defaults to 30. (optional) (default to 30)

try: 
    # List Athlete Activities
    api_response = api_instance.getLoggedInAthleteActivities(before=before, after=after, page=page, perPage=perPage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ActivitiesApi->getLoggedInAthleteActivities: %s\n" % e)

Sample Response

[ {
  "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",
  "workout_type" : null,
  "id" : 154504250376823,
  "external_id" : "garmin_push_12345678987654321",
  "upload_id" : 987654321234567891234,
  "start_date" : "2018-05-02T12:15:09Z",
  "start_date_local" : "2018-05-02T05:15:09Z",
  "timezone" : "(GMT-08:00) America/Los_Angeles",
  "utc_offset" : -25200,
  "start_latlng" : null,
  "end_latlng" : null,
  "location_city" : null,
  "location_state" : null,
  "location_country" : "United States",
  "achievement_count" : 0,
  "kudos_count" : 3,
  "comment_count" : 1,
  "athlete_count" : 1,
  "photo_count" : 0,
  "map" : {
    "id" : "a12345678987654321",
    "summary_polyline" : null,
    "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",
  "workout_type" : null,
  "id" : 1234567809,
  "external_id" : "garmin_push_12345678987654321",
  "upload_id" : 1234567819,
  "start_date" : "2018-04-30T12:35:51Z",
  "start_date_local" : "2018-04-30T05:35:51Z",
  "timezone" : "(GMT-08:00) America/Los_Angeles",
  "utc_offset" : -25200,
  "start_latlng" : null,
  "end_latlng" : null,
  "location_city" : null,
  "location_state" : null,
  "location_country" : "United States",
  "achievement_count" : 0,
  "kudos_count" : 4,
  "comment_count" : 0,
  "athlete_count" : 1,
  "photo_count" : 0,
  "map" : {
    "id" : "a12345689",
    "summary_polyline" : null,
    "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
} ]

Get Activity Zones (getZonesByActivityId)

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.

get
/activities/{id}/zones

Parameters

id
required Long, in path
The identifier of the activity.

Responses

HTTP code 200 An array of ActivityZone objects.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/activities/{id}/zones" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.ActivitiesApi;

import rx.Observable;

public class ActivitiesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    ActivitiesApi api = client.createService(ActivitiesApi.class);

    Long id = 789; // Long | The identifier of the activity.

    Observable<List<ActivityZone>> result = apiInstance.getZonesByActivityId(id);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the activity.

STRVActivitiesApi *apiInstance = [[STRVActivitiesApi alloc] init];

// Get Activity Zones
[apiInstance getZonesByActivityIdWith:id
              completionHandler: ^(NSArray<STRVActivityZone>* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.ActivitiesApi()

var id = 789; // {Long} The identifier of the activity.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getZonesByActivityId(id, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getZonesByActivityIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ActivitiesApi();
            var id = 789;  // Long | The identifier of the activity.

            try
            {
                // Get Activity Zones
                array[ActivityZone] result = apiInstance.getZonesByActivityId(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ActivitiesApi.getZonesByActivityId: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ActivitiesApi()
id = 789 # Long | The identifier of the activity.

try: 
    # Get Activity Zones
    api_response = api_instance.getZonesByActivityId(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ActivitiesApi->getZonesByActivityId: %s\n" % e)

Sample Response

[ {
  "score" : 0,
  "sensor_based" : true,
  "custom_zones" : true,
  "max" : 1,
  "distribution_buckets" : "",
  "type" : "heartrate",
  "points" : 6
} ]

Update Activity (updateActivityById)

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

put
/activities/{id}

Parameters

id
required Long, in path
The identifier of the activity.
<Parameter Name>
UpdatableActivity, in body
An instance of UpdatableActivity.

Responses

HTTP code 200 The activity's detailed representation. An instance of DetailedActivity.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http put "https://www.strava.com/api/v3/activities/{id}" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.ActivitiesApi;

import rx.Observable;

public class ActivitiesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    ActivitiesApi api = client.createService(ActivitiesApi.class);

    Long id = 789; // Long | The identifier of the activity.
    UpdatableActivity body = ; // UpdatableActivity | 

    Observable<DetailedActivity> result = apiInstance.updateActivityById(id, body);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the activity.
UpdatableActivity *body = ; //  (optional)

STRVActivitiesApi *apiInstance = [[STRVActivitiesApi alloc] init];

// Update Activity
[apiInstance updateActivityByIdWith:id
    body:body
              completionHandler: ^(STRVDetailedActivity output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.ActivitiesApi()

var id = 789; // {Long} The identifier of the activity.

var opts = { 
  'body':  // {UpdatableActivity} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateActivityById(id, opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class updateActivityByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ActivitiesApi();
            var id = 789;  // Long | The identifier of the activity.
            var body = new UpdatableActivity(); // UpdatableActivity |  (optional) 

            try
            {
                // Update Activity
                DetailedActivity result = apiInstance.updateActivityById(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ActivitiesApi.updateActivityById: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ActivitiesApi()
id = 789 # Long | The identifier of the activity.
body =  # UpdatableActivity |  (optional)

try: 
    # Update Activity
    api_response = api_instance.updateActivityById(id, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ActivitiesApi->updateActivityById: %s\n" % e)

Sample Response

{
  "id" : 12345678987654321,
  "resource_state" : 3,
  "external_id" : "garmin_push_12345678987654321",
  "upload_id" : 98765432123456789,
  "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:54Z",
  "start_date_local" : "2018-02-16T06:52:54Z",
  "timezone" : "(GMT-08:00) America/Los_Angeles",
  "utc_offset" : -28800,
  "start_latlng" : [ 37.83, -122.26 ],
  "end_latlng" : [ 37.83, -122.26 ],
  "location_city" : null,
  "location_state" : null,
  "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@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@Gq@L_BHSHK|@WJETSLQZs@z@_A~@uA^U`@G\\CRB\\Tl@p@Th@JZ^bB`@lAHLXVLDP?LGFSKiDBo@d@wBVi@R]VYVE\\@`@Lh@Fh@CzAk@RSDQA]GYe@eAGWSiBAWBWBIJORK`@KPOPSTg@h@}Ad@o@F[E_@EGMKUGmAEYGMIMYKs@?a@J}@@_BD_@HQJMx@e@LKHKHWAo@UoAAWFmAH}@?w@C[YwAAc@HSNM|Ao@rA}@zAq@`@a@j@eAxAuBXQj@MXSR[b@gAFg@?YISOGaAHi@Xw@v@_@d@WRSFqARUHQJc@d@m@`A[VSFUBcAEU@WFULUPa@v@Y~@UrBc@dBI~@?l@P~ABt@N`HEjA]zAEp@@p@TrBCl@CTQb@k@dAg@jAU^KJYLK@k@A[Js@d@a@b@]RgBl@[FMAw@[]G]?m@D_@F]P[Vu@t@[TMF_@Do@E_@@q@P]PWZUZw@vAkAlAGJOj@IlAMd@OR{@p@a@d@sBpD]v@a@`Aa@n@]TODgBVk@Pe@^cBfBc@Rs@La@RSPm@|@wCpDS^Wp@QZML{@l@qBbCYd@k@lAIVCZBZNTr@`@RRHZANIZQPKDW@e@CaASU?I@YTKRQx@@\\VmALYRQLCL?v@P|@D\\GJEFKDM@OCa@COOYIGm@YMUCM@]JYr@uAx@kAt@}@jAeAPWbAkBj@s@bAiAz@oAj@m@VQlAc@VQ~@aA`Au@p@Q`AIv@MZORUV_@p@iB|AoCh@q@dAaANUNWH[N{AJ[^m@t@_Av@wA\\a@`@W`@In@Al@B^E`@Wl@u@\\[VQ\\K`@Eb@?R@dAZP@d@CRExAs@\\Yt@{@LG\\MjAATINOXo@d@kAl@_AHYBOCe@QiBCm@Fq@\\wADo@AyGEeBWuB@YHu@Tu@Lk@VcCTo@d@aA\\WJE`@G~@FP?VI\\U~@sANO`@SfAMj@U\\WjAsAXS`@UNENALBHFFL?^Ml@Uj@]b@q@RUJSPkChEc@XcAb@sA|@]PaA\\OJKNER?TDTNj@Jn@?p@OfC@ZR`B@VCV_@n@{@l@WbACv@OlABnAPl@LNNHbBBNBLFFJ@^GLg@x@i@|AMP[X}@XOJKPET?l@LhAFXp@fBDRCd@S\\_@Ps@PQ@}A]S?QDe@V]b@MR[fAKt@ErAF~CANILYDKGIKe@{@Yy@e@sB[gA[c@e@YUCU?WBUHUNQPq@`AiArAMV[^e@Zc@JQJKNMz@?r@Bb@PfAAfA@VVbADn@E`@KHSEe@SMAKDKFM\\^dDCh@m@LoAQ_@@MFOZLfBEl@QbASd@KLQBOAaAc@QAQ@QHc@v@ONMJOBOCg@c@]O[EMBKFGL?RHv@ARERGNe@h@{@h@WVGNDt@JLNFPFz@LdBf@f@PJNHPF`ADPJJJDl@I`@B^Tp@bALJNDNALIf@i@PGPCt@DNE`@Uv@[dAw@RITGRCtAARBPJLPJRZxB?VEX_@vAAR?RDNHJJBh@UnBm@h@IRDRJNNJPNbBFRJLLBLCzAmAd@Uf@Gf@?P@PFJNHPFTH`BDTHNJJJ@LG`@m@^YPER@RDPHNNJRLn@HRLN^VNPHTFX@\\UlDFb@FHh@NP@HKPsB?}ASkCQ{@[y@q@}@cA{@KOCQDa@t@{CFGJCf@Nl@ZtA~@r@p@`@h@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,
  "suffer_score" : null,
  "description" : "",
  "calories" : 870.2,
  "segment_efforts" : [ {
    "id" : 12345678987654321,
    "resource_state" : 2,
    "name" : "Tunnel Rd.",
    "activity" : {
      "id" : 12345678987654321,
      "resource_state" : 1
    },
    "athlete" : {
      "id" : 12345678987654321,
      "resource_state" : 1
    },
    "elapsed_time" : 2038,
    "moving_time" : 2038,
    "start_date" : "2018-02-16T14:56:25Z",
    "start_date_local" : "2018-02-16T06:56:25Z",
    "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
    },
    "kom_rank" : null,
    "pr_rank" : null,
    "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:54Z",
    "start_date_local" : "2018-02-16T06:52:54Z",
    "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
  },
  "partner_brand_tag" : null,
  "photos" : {
    "primary" : {
      "id" : null,
      "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
}

Athletes

Get Authenticated Athlete (getLoggedInAthlete)

Returns the currently authenticated athlete. Tokens with profile:read_all scope will receive a detailed athlete representation; all others will receive a summary representation.

get
/athlete

Responses

HTTP code 200 Profile information for the authenticated athlete. An instance of DetailedAthlete.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/athlete" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.AthletesApi;

import rx.Observable;

public class AthletesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    AthletesApi api = client.createService(AthletesApi.class);


    Observable<DetailedAthlete> result = apiInstance.getLoggedInAthlete();
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


STRVAthletesApi *apiInstance = [[STRVAthletesApi alloc] init];

// Get Authenticated Athlete
[apiInstance getLoggedInAthleteWithCompletionHandler: 
              ^(STRVDetailedAthlete output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.AthletesApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLoggedInAthlete(callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getLoggedInAthleteExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AthletesApi();

            try
            {
                // Get Authenticated Athlete
                DetailedAthlete result = apiInstance.getLoggedInAthlete();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AthletesApi.getLoggedInAthlete: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AthletesApi()

try: 
    # Get Authenticated Athlete
    api_response = api_instance.getLoggedInAthlete()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AthletesApi->getLoggedInAthlete: %s\n" % e)

Sample Response

{
  "id" : 1234567890987654321,
  "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:05Z",
  "updated_at" : "2018-02-06T19:32:20Z",
  "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",
  "friend" : null,
  "follower" : null,
  "follower_count" : 5,
  "friend_count" : 5,
  "mutual_friend_count" : 0,
  "athlete_type" : 1,
  "date_preference" : "%m/%d/%Y",
  "measurement_preference" : "feet",
  "clubs" : [ ],
  "ftp" : null,
  "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
  } ]
}

Get Zones (getLoggedInAthleteZones)

Returns the the authenticated athlete's heart rate and power zones. Requires profile:read_all.

get
/athlete/zones

Responses

HTTP code 200 Heart rate and power zones. An instance of Zones.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/athlete/zones" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.AthletesApi;

import rx.Observable;

public class AthletesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    AthletesApi api = client.createService(AthletesApi.class);


    Observable<Zones> result = apiInstance.getLoggedInAthleteZones();
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


STRVAthletesApi *apiInstance = [[STRVAthletesApi alloc] init];

// Get Zones
[apiInstance getLoggedInAthleteZonesWithCompletionHandler: 
              ^(STRVZones output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.AthletesApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLoggedInAthleteZones(callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getLoggedInAthleteZonesExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AthletesApi();

            try
            {
                // Get Zones
                Zones result = apiInstance.getLoggedInAthleteZones();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AthletesApi.getLoggedInAthleteZones: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AthletesApi()

try: 
    # Get Zones
    api_response = api_instance.getLoggedInAthleteZones()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AthletesApi->getLoggedInAthleteZones: %s\n" % e)

Sample Response

[ {
  "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
} ]

Get Athlete Stats (getStats)

Returns the activity stats of an athlete. Only includes data from activities set to Everyone visibilty.

get
/athletes/{id}/stats

Parameters

id
required Long, in path
The identifier of the athlete. Must match the authenticated athlete.

Responses

HTTP code 200 Activity stats of the athlete. An instance of ActivityStats.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/athletes/{id}/stats" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.AthletesApi;

import rx.Observable;

public class AthletesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    AthletesApi api = client.createService(AthletesApi.class);

    Long id = 789; // Long | The identifier of the athlete. Must match the authenticated athlete.

    Observable<ActivityStats> result = apiInstance.getStats(id);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the athlete. Must match the authenticated athlete.

STRVAthletesApi *apiInstance = [[STRVAthletesApi alloc] init];

// Get Athlete Stats
[apiInstance getStatsWith:id
              completionHandler: ^(STRVActivityStats output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.AthletesApi()

var id = 789; // {Long} The identifier of the athlete. Must match the authenticated athlete.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getStats(id, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getStatsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AthletesApi();
            var id = 789;  // Long | The identifier of the athlete. Must match the authenticated athlete.

            try
            {
                // Get Athlete Stats
                ActivityStats result = apiInstance.getStats(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AthletesApi.getStats: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AthletesApi()
id = 789 # Long | The identifier of the athlete. Must match the authenticated athlete.

try: 
    # Get Athlete Stats
    api_response = api_instance.getStats(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AthletesApi->getStats: %s\n" % e)

Sample Response

{
  "recent_run_totals" : "",
  "all_run_totals" : "",
  "recent_swim_totals" : "",
  "biggest_ride_distance" : 0.8008281904610115,
  "ytd_swim_totals" : "",
  "all_swim_totals" : "",
  "recent_ride_totals" : {
    "distance" : 5.962134,
    "achievement_count" : 9,
    "count" : 1,
    "elapsed_time" : 2,
    "elevation_gain" : 7.0614014,
    "moving_time" : 5
  },
  "biggest_climb_elevation_gain" : 6.027456183070403,
  "ytd_ride_totals" : "",
  "all_ride_totals" : "",
  "ytd_run_totals" : ""
}

Update Athlete (updateLoggedInAthlete)

Update the currently authenticated athlete. Requires profile:write scope.

put
/athlete

Parameters

weight
required Float, in path
The weight of the athlete in kilograms.

Responses

HTTP code 200 Profile information for the authenticated athlete. An instance of DetailedAthlete.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http put "https://www.strava.com/api/v3/athlete" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.AthletesApi;

import rx.Observable;

public class AthletesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    AthletesApi api = client.createService(AthletesApi.class);

    Float weight = 3.4; // Float | The weight of the athlete in kilograms.

    Observable<DetailedAthlete> result = apiInstance.updateLoggedInAthlete(weight);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Float *weight = 3.4; // The weight of the athlete in kilograms.

STRVAthletesApi *apiInstance = [[STRVAthletesApi alloc] init];

// Update Athlete
[apiInstance updateLoggedInAthleteWith:weight
              completionHandler: ^(STRVDetailedAthlete output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.AthletesApi()

var weight = 3.4; // {Float} The weight of the athlete in kilograms.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLoggedInAthlete(weight, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class updateLoggedInAthleteExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AthletesApi();
            var weight = 3.4;  // Float | The weight of the athlete in kilograms.

            try
            {
                // Update Athlete
                DetailedAthlete result = apiInstance.updateLoggedInAthlete(weight);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AthletesApi.updateLoggedInAthlete: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AthletesApi()
weight = 3.4 # Float | The weight of the athlete in kilograms.

try: 
    # Update Athlete
    api_response = api_instance.updateLoggedInAthlete(weight)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AthletesApi->updateLoggedInAthlete: %s\n" % e)

Sample Response

{
  "id" : 12345678987655098765444,
  "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:05Z",
  "updated_at" : "2018-02-06T19:32:20Z",
  "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",
  "friend" : null,
  "follower" : null,
  "follower_count" : 5,
  "friend_count" : 5,
  "mutual_friend_count" : 0,
  "athlete_type" : 1,
  "date_preference" : "%m/%d/%Y",
  "measurement_preference" : "feet",
  "clubs" : [ ],
  "ftp" : null,
  "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
  } ]
}

Clubs

List Club Activities (getClubActivitiesById)

Retrieve recent activities from members of a specific club. The authenticated athlete must belong to the requested club in order to hit this endpoint. Pagination is supported. Athlete profile visibility is respected for all activities.

get
/clubs/{id}/activities

Parameters

id
required Long, in path
The identifier of the club.
page
Integer, in query
Page number. Defaults to 1.
per_page
Integer, in query
Number of items per page. Defaults to 30.

Responses

HTTP code 200 An array of ClubActivity objects.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/clubs/{id}/activities?page=&per_page=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.ClubsApi;

import rx.Observable;

public class ClubsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    ClubsApi api = client.createService(ClubsApi.class);

    Long id = 789; // Long | The identifier of the club.
    Integer page = 56; // Integer | Page number. Defaults to 1.
    Integer perPage = 56; // Integer | Number of items per page. Defaults to 30.

    Observable<List<ClubActivity>> result = apiInstance.getClubActivitiesById(id, page, perPage);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the club.
Integer *page = 56; // Page number. Defaults to 1. (optional)
Integer *perPage = 56; // Number of items per page. Defaults to 30. (optional) (default to 30)

STRVClubsApi *apiInstance = [[STRVClubsApi alloc] init];

// List Club Activities
[apiInstance getClubActivitiesByIdWith:id
    page:page
    perPage:perPage
              completionHandler: ^(NSArray<STRVClubActivity>* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.ClubsApi()

var id = 789; // {Long} The identifier of the club.

var opts = { 
  'page': 56, // {Integer} Page number. Defaults to 1.
  'perPage': 56 // {Integer} Number of items per page. Defaults to 30.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getClubActivitiesById(id, opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getClubActivitiesByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ClubsApi();
            var id = 789;  // Long | The identifier of the club.
            var page = 56;  // Integer | Page number. Defaults to 1. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Club Activities
                array[ClubActivity] result = apiInstance.getClubActivitiesById(id, page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClubsApi.getClubActivitiesById: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ClubsApi()
id = 789 # Long | The identifier of the club.
page = 56 # Integer | Page number. Defaults to 1. (optional)
perPage = 56 # Integer | Number of items per page. Defaults to 30. (optional) (default to 30)

try: 
    # List Club Activities
    api_response = api_instance.getClubActivitiesById(id, page=page, perPage=perPage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClubsApi->getClubActivitiesById: %s\n" % e)

Sample Response

[ {
  "resource_state" : 2,
  "athlete" : {
    "resource_state" : 2,
    "firstname" : "Peter",
    "lastname" : "S."
  },
  "name" : "World Championship",
  "distance" : 2641.7,
  "moving_time" : 577,
  "elapsed_time" : 635,
  "total_elevation_gain" : 8.8,
  "type" : "Ride",
  "sport_type" : "MountainBikeRide",
  "workout_type" : null
} ]

List Club Administrators (getClubAdminsById)

Returns a list of the administrators of a given club.

get
/clubs/{id}/admins

Parameters

id
required Long, in path
The identifier of the club.
page
Integer, in query
Page number. Defaults to 1.
per_page
Integer, in query
Number of items per page. Defaults to 30.

Responses

HTTP code 200 An array of SummaryAthlete objects.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/clubs/{id}/admins?page=&per_page=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.ClubsApi;

import rx.Observable;

public class ClubsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    ClubsApi api = client.createService(ClubsApi.class);

    Long id = 789; // Long | The identifier of the club.
    Integer page = 56; // Integer | Page number. Defaults to 1.
    Integer perPage = 56; // Integer | Number of items per page. Defaults to 30.

    Observable<List<SummaryAthlete>> result = apiInstance.getClubAdminsById(id, page, perPage);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the club.
Integer *page = 56; // Page number. Defaults to 1. (optional)
Integer *perPage = 56; // Number of items per page. Defaults to 30. (optional) (default to 30)

STRVClubsApi *apiInstance = [[STRVClubsApi alloc] init];

// List Club Administrators
[apiInstance getClubAdminsByIdWith:id
    page:page
    perPage:perPage
              completionHandler: ^(NSArray<STRVSummaryAthlete>* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.ClubsApi()

var id = 789; // {Long} The identifier of the club.

var opts = { 
  'page': 56, // {Integer} Page number. Defaults to 1.
  'perPage': 56 // {Integer} Number of items per page. Defaults to 30.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getClubAdminsById(id, opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getClubAdminsByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ClubsApi();
            var id = 789;  // Long | The identifier of the club.
            var page = 56;  // Integer | Page number. Defaults to 1. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Club Administrators
                array[SummaryAthlete] result = apiInstance.getClubAdminsById(id, page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClubsApi.getClubAdminsById: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ClubsApi()
id = 789 # Long | The identifier of the club.
page = 56 # Integer | Page number. Defaults to 1. (optional)
perPage = 56 # Integer | Number of items per page. Defaults to 30. (optional) (default to 30)

try: 
    # List Club Administrators
    api_response = api_instance.getClubAdminsById(id, page=page, perPage=perPage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClubsApi->getClubAdminsById: %s\n" % e)

Sample Response

[ {
  "resource_state" : 2,
  "firstname" : "Peter",
  "lastname" : "S."
} ]

Get Club (getClubById)

Returns a given club using its identifier.

get
/clubs/{id}

Parameters

id
required Long, in path
The identifier of the club.

Responses

HTTP code 200 The detailed representation of a club. An instance of DetailedClub.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/clubs/{id}" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.ClubsApi;

import rx.Observable;

public class ClubsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    ClubsApi api = client.createService(ClubsApi.class);

    Long id = 789; // Long | The identifier of the club.

    Observable<DetailedClub> result = apiInstance.getClubById(id);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the club.

STRVClubsApi *apiInstance = [[STRVClubsApi alloc] init];

// Get Club
[apiInstance getClubByIdWith:id
              completionHandler: ^(STRVDetailedClub output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.ClubsApi()

var id = 789; // {Long} The identifier of the club.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getClubById(id, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getClubByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ClubsApi();
            var id = 789;  // Long | The identifier of the club.

            try
            {
                // Get Club
                DetailedClub result = apiInstance.getClubById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClubsApi.getClubById: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ClubsApi()
id = 789 # Long | The identifier of the club.

try: 
    # Get Club
    api_response = api_instance.getClubById(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClubsApi->getClubById: %s\n" % e)

Sample Response

{
  "id" : 1,
  "resource_state" : 3,
  "name" : "Team Strava Cycling",
  "profile_medium" : "https://dgalywyr863hv.cloudfront.net/pictures/clubs/1/1582/4/medium.jpg",
  "profile" : "https://dgalywyr863hv.cloudfront.net/pictures/clubs/1/1582/4/large.jpg",
  "cover_photo" : "https://dgalywyr863hv.cloudfront.net/pictures/clubs/1/4328276/1/large.jpg",
  "cover_photo_small" : "https://dgalywyr863hv.cloudfront.net/pictures/clubs/1/4328276/1/small.jpg",
  "sport_type" : "cycling",
  "activity_types" : [ "Ride", "VirtualRide", "EBikeRide", "Velomobile", "Handcycle" ],
  "city" : "San Francisco",
  "state" : "California",
  "country" : "United States",
  "private" : true,
  "member_count" : 116,
  "featured" : false,
  "verified" : false,
  "url" : "team-strava-bike",
  "membership" : "member",
  "admin" : false,
  "owner" : false,
  "description" : "Private club for Cyclists who work at Strava.",
  "club_type" : "company",
  "post_count" : 29,
  "owner_id" : 759,
  "following_count" : 107
}

List Club Members (getClubMembersById)

Returns a list of the athletes who are members of a given club.

get
/clubs/{id}/members

Parameters

id
required Long, in path
The identifier of the club.
page
Integer, in query
Page number. Defaults to 1.
per_page
Integer, in query
Number of items per page. Defaults to 30.

Responses

HTTP code 200 An array of ClubAthlete objects.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/clubs/{id}/members?page=&per_page=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.ClubsApi;

import rx.Observable;

public class ClubsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    ClubsApi api = client.createService(ClubsApi.class);

    Long id = 789; // Long | The identifier of the club.
    Integer page = 56; // Integer | Page number. Defaults to 1.
    Integer perPage = 56; // Integer | Number of items per page. Defaults to 30.

    Observable<List<ClubAthlete>> result = apiInstance.getClubMembersById(id, page, perPage);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the club.
Integer *page = 56; // Page number. Defaults to 1. (optional)
Integer *perPage = 56; // Number of items per page. Defaults to 30. (optional) (default to 30)

STRVClubsApi *apiInstance = [[STRVClubsApi alloc] init];

// List Club Members
[apiInstance getClubMembersByIdWith:id
    page:page
    perPage:perPage
              completionHandler: ^(NSArray<STRVClubAthlete>* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.ClubsApi()

var id = 789; // {Long} The identifier of the club.

var opts = { 
  'page': 56, // {Integer} Page number. Defaults to 1.
  'perPage': 56 // {Integer} Number of items per page. Defaults to 30.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getClubMembersById(id, opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getClubMembersByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ClubsApi();
            var id = 789;  // Long | The identifier of the club.
            var page = 56;  // Integer | Page number. Defaults to 1. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Club Members
                array[ClubAthlete] result = apiInstance.getClubMembersById(id, page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClubsApi.getClubMembersById: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ClubsApi()
id = 789 # Long | The identifier of the club.
page = 56 # Integer | Page number. Defaults to 1. (optional)
perPage = 56 # Integer | Number of items per page. Defaults to 30. (optional) (default to 30)

try: 
    # List Club Members
    api_response = api_instance.getClubMembersById(id, page=page, perPage=perPage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClubsApi->getClubMembersById: %s\n" % e)

Sample Response

[ {
  "resource_state" : 2,
  "firstname" : "Peter",
  "lastname" : "S.",
  "membership" : "member",
  "admin" : false,
  "owner" : false
} ]

List Athlete Clubs (getLoggedInAthleteClubs)

Returns a list of the clubs whose membership includes the authenticated athlete.

get
/athlete/clubs

Parameters

page
Integer, in query
Page number. Defaults to 1.
per_page
Integer, in query
Number of items per page. Defaults to 30.

Responses

HTTP code 200 An array of SummaryClub objects.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/athlete/clubs?page=&per_page=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.ClubsApi;

import rx.Observable;

public class ClubsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    ClubsApi api = client.createService(ClubsApi.class);

    Integer page = 56; // Integer | Page number. Defaults to 1.
    Integer perPage = 56; // Integer | Number of items per page. Defaults to 30.

    Observable<List<SummaryClub>> result = apiInstance.getLoggedInAthleteClubs(page, perPage);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Integer *page = 56; // Page number. Defaults to 1. (optional)
Integer *perPage = 56; // Number of items per page. Defaults to 30. (optional) (default to 30)

STRVClubsApi *apiInstance = [[STRVClubsApi alloc] init];

// List Athlete Clubs
[apiInstance getLoggedInAthleteClubsWith:page
    perPage:perPage
              completionHandler: ^(NSArray<STRVSummaryClub>* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.ClubsApi()

var opts = { 
  'page': 56, // {Integer} Page number. Defaults to 1.
  'perPage': 56 // {Integer} Number of items per page. Defaults to 30.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLoggedInAthleteClubs(opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getLoggedInAthleteClubsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ClubsApi();
            var page = 56;  // Integer | Page number. Defaults to 1. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Athlete Clubs
                array[SummaryClub] result = apiInstance.getLoggedInAthleteClubs(page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClubsApi.getLoggedInAthleteClubs: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ClubsApi()
page = 56 # Integer | Page number. Defaults to 1. (optional)
perPage = 56 # Integer | Number of items per page. Defaults to 30. (optional) (default to 30)

try: 
    # List Athlete Clubs
    api_response = api_instance.getLoggedInAthleteClubs(page=page, perPage=perPage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClubsApi->getLoggedInAthleteClubs: %s\n" % e)

Sample Response

[ {
  "id" : 231407,
  "resource_state" : 2,
  "name" : "The Strava Club",
  "profile_medium" : "https://dgalywyr863hv.cloudfront.net/pictures/clubs/231407/5319085/1/medium.jpg",
  "profile" : "https://dgalywyr863hv.cloudfront.net/pictures/clubs/231407/5319085/1/large.jpg",
  "cover_photo" : "https://dgalywyr863hv.cloudfront.net/pictures/clubs/231407/5098428/4/large.jpg",
  "cover_photo_small" : "https://dgalywyr863hv.cloudfront.net/pictures/clubs/231407/5098428/4/small.jpg",
  "sport_type" : "other",
  "city" : "San Francisco",
  "state" : "California",
  "country" : "United States",
  "private" : false,
  "member_count" : 93151,
  "featured" : false,
  "verified" : true,
  "url" : "strava"
} ]

Gears

Get Equipment (getGearById)

Returns an equipment using its identifier.

get
/gear/{id}

Parameters

id
required String, in path
The identifier of the gear.

Responses

HTTP code 200 A representation of the gear. An instance of DetailedGear.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/gear/{id}" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.GearsApi;

import rx.Observable;

public class GearsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    GearsApi api = client.createService(GearsApi.class);

    String id = id_example; // String | The identifier of the gear.

    Observable<DetailedGear> result = apiInstance.getGearById(id);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *id = id_example; // The identifier of the gear.

STRVGearsApi *apiInstance = [[STRVGearsApi alloc] init];

// Get Equipment
[apiInstance getGearByIdWith:id
              completionHandler: ^(STRVDetailedGear output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.GearsApi()

var id = id_example; // {String} The identifier of the gear.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getGearById(id, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getGearByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new GearsApi();
            var id = id_example;  // String | The identifier of the gear.

            try
            {
                // Get Equipment
                DetailedGear result = apiInstance.getGearById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GearsApi.getGearById: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.GearsApi()
id = id_example # String | The identifier of the gear.

try: 
    # Get Equipment
    api_response = api_instance.getGearById(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GearsApi->getGearById: %s\n" % e)

Sample Response

{
  "id" : "b1231",
  "primary" : false,
  "resource_state" : 3,
  "distance" : 388206,
  "brand_name" : "BMC",
  "model_name" : "Teammachine",
  "frame_type" : 3,
  "description" : "My Bike."
}

Routes

Export Route GPX (getRouteAsGPX)

Returns a GPX file of the route. Requires read_all scope for private routes.

get
/routes/{id}/export_gpx

Parameters

id
required Long, in path
The identifier of the route.

Responses

HTTP code 200 A GPX file with the route.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/routes/{id}/export_gpx" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.RoutesApi;

import rx.Observable;

public class RoutesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    RoutesApi api = client.createService(RoutesApi.class);

    Long id = 789; // Long | The identifier of the route.

    apiInstance.getRouteAsGPX(id);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the route.

STRVRoutesApi *apiInstance = [[STRVRoutesApi alloc] init];

// Export Route GPX
[apiInstance getRouteAsGPXWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.RoutesApi()

var id = 789; // {Long} The identifier of the route.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getRouteAsGPX(id, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getRouteAsGPXExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new RoutesApi();
            var id = 789;  // Long | The identifier of the route.

            try
            {
                // Export Route GPX
                apiInstance.getRouteAsGPX(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RoutesApi.getRouteAsGPX: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.RoutesApi()
id = 789 # Long | The identifier of the route.

try: 
    # Export Route GPX
    api_instance.getRouteAsGPX(id)
except ApiException as e:
    print("Exception when calling RoutesApi->getRouteAsGPX: %s\n" % e)

Export Route TCX (getRouteAsTCX)

Returns a TCX file of the route. Requires read_all scope for private routes.

get
/routes/{id}/export_tcx

Parameters

id
required Long, in path
The identifier of the route.

Responses

HTTP code 200 A TCX file with the route.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/routes/{id}/export_tcx" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.RoutesApi;

import rx.Observable;

public class RoutesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    RoutesApi api = client.createService(RoutesApi.class);

    Long id = 789; // Long | The identifier of the route.

    apiInstance.getRouteAsTCX(id);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the route.

STRVRoutesApi *apiInstance = [[STRVRoutesApi alloc] init];

// Export Route TCX
[apiInstance getRouteAsTCXWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.RoutesApi()

var id = 789; // {Long} The identifier of the route.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getRouteAsTCX(id, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getRouteAsTCXExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new RoutesApi();
            var id = 789;  // Long | The identifier of the route.

            try
            {
                // Export Route TCX
                apiInstance.getRouteAsTCX(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RoutesApi.getRouteAsTCX: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.RoutesApi()
id = 789 # Long | The identifier of the route.

try: 
    # Export Route TCX
    api_instance.getRouteAsTCX(id)
except ApiException as e:
    print("Exception when calling RoutesApi->getRouteAsTCX: %s\n" % e)

Get Route (getRouteById)

Returns a route using its identifier. Requires read_all scope for private routes.

get
/routes/{id}

Parameters

id
required Long, in path
The identifier of the route.

Responses

HTTP code 200 A representation of the route. An instance of Route.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/routes/{id}" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.RoutesApi;

import rx.Observable;

public class RoutesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    RoutesApi api = client.createService(RoutesApi.class);

    Long id = 789; // Long | The identifier of the route.

    Observable<Route> result = apiInstance.getRouteById(id);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the route.

STRVRoutesApi *apiInstance = [[STRVRoutesApi alloc] init];

// Get Route
[apiInstance getRouteByIdWith:id
              completionHandler: ^(STRVRoute output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.RoutesApi()

var id = 789; // {Long} The identifier of the route.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRouteById(id, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getRouteByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new RoutesApi();
            var id = 789;  // Long | The identifier of the route.

            try
            {
                // Get Route
                Route result = apiInstance.getRouteById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RoutesApi.getRouteById: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.RoutesApi()
id = 789 # Long | The identifier of the route.

try: 
    # Get Route
    api_response = api_instance.getRouteById(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RoutesApi->getRouteById: %s\n" % e)

Sample Response

{
  "private" : true,
  "distance" : 0.8008282,
  "athlete" : "",
  "description" : "aeiou",
  "created_at" : "2000-01-23T04:56:07.000+00:00",
  "elevation_gain" : 6.0274563,
  "type" : 5,
  "estimated_moving_time" : 7,
  "waypoints" : [ {
    "distance_into_route" : 9,
    "target_latlng" : "",
    "description" : "aeiou",
    "categories" : [ "aeiou" ],
    "title" : "aeiou",
    "latlng" : ""
  } ],
  "segments" : [ {
    "country" : "aeiou",
    "private" : true,
    "distance" : 3.6160767,
    "average_grade" : 2.027123,
    "maximum_grade" : 4.145608,
    "climb_category" : 1,
    "city" : "aeiou",
    "elevation_high" : 7.386282,
    "athlete_pr_effort" : {
      "pr_elapsed_time" : 6,
      "pr_date" : "2000-01-23T04:56:07.000+00:00",
      "effort_count" : 7,
      "pr_activity_id" : 1
    },
    "athlete_segment_stats" : {
      "distance" : 9.965781,
      "start_date_local" : "2000-01-23T04:56:07.000+00:00",
      "activity_id" : 4,
      "elapsed_time" : 5,
      "is_kom" : true,
      "id" : 1,
      "start_date" : "2000-01-23T04:56:07.000+00:00"
    },
    "start_latlng" : "",
    "elevation_low" : 1.2315135,
    "end_latlng" : "",
    "activity_type" : "Ride",
    "name" : "aeiou",
    "id" : 9,
    "state" : "aeiou"
  } ],
  "starred" : true,
  "updated_at" : "2000-01-23T04:56:07.000+00:00",
  "sub_type" : 2,
  "id_str" : "aeiou",
  "name" : "aeiou",
  "id" : 1,
  "map" : {
    "summary_polyline" : "aeiou",
    "id" : "aeiou",
    "polyline" : "aeiou"
  },
  "timestamp" : 5
}

List Athlete Routes (getRoutesByAthleteId)

Returns a list of the routes created by the authenticated athlete. Private routes are filtered out unless requested by a token with read_all scope.

get
/athletes/{id}/routes

Parameters

page
Integer, in query
Page number. Defaults to 1.
per_page
Integer, in query
Number of items per page. Defaults to 30.

Responses

HTTP code 200 An array of Route objects.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/athletes/{id}/routes?page=&per_page=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.RoutesApi;

import rx.Observable;

public class RoutesApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    RoutesApi api = client.createService(RoutesApi.class);

    Integer page = 56; // Integer | Page number. Defaults to 1.
    Integer perPage = 56; // Integer | Number of items per page. Defaults to 30.

    Observable<List<Route>> result = apiInstance.getRoutesByAthleteId(page, perPage);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Integer *page = 56; // Page number. Defaults to 1. (optional)
Integer *perPage = 56; // Number of items per page. Defaults to 30. (optional) (default to 30)

STRVRoutesApi *apiInstance = [[STRVRoutesApi alloc] init];

// List Athlete Routes
[apiInstance getRoutesByAthleteIdWith:page
    perPage:perPage
              completionHandler: ^(NSArray<STRVRoute>* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.RoutesApi()

var opts = { 
  'page': 56, // {Integer} Page number. Defaults to 1.
  'perPage': 56 // {Integer} Number of items per page. Defaults to 30.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRoutesByAthleteId(opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getRoutesByAthleteIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new RoutesApi();
            var page = 56;  // Integer | Page number. Defaults to 1. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Athlete Routes
                array[Route] result = apiInstance.getRoutesByAthleteId(page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RoutesApi.getRoutesByAthleteId: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.RoutesApi()
page = 56 # Integer | Page number. Defaults to 1. (optional)
perPage = 56 # Integer | Number of items per page. Defaults to 30. (optional) (default to 30)

try: 
    # List Athlete Routes
    api_response = api_instance.getRoutesByAthleteId(page=page, perPage=perPage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RoutesApi->getRoutesByAthleteId: %s\n" % e)

Sample Response

[ {
  "private" : true,
  "distance" : 0.8008282,
  "athlete" : "",
  "description" : "aeiou",
  "created_at" : "2000-01-23T04:56:07.000+00:00",
  "elevation_gain" : 6.0274563,
  "type" : 5,
  "estimated_moving_time" : 7,
  "waypoints" : [ {
    "distance_into_route" : 9,
    "target_latlng" : "",
    "description" : "aeiou",
    "categories" : [ "aeiou" ],
    "title" : "aeiou",
    "latlng" : ""
  } ],
  "segments" : [ {
    "country" : "aeiou",
    "private" : true,
    "distance" : 3.6160767,
    "average_grade" : 2.027123,
    "maximum_grade" : 4.145608,
    "climb_category" : 1,
    "city" : "aeiou",
    "elevation_high" : 7.386282,
    "athlete_pr_effort" : {
      "pr_elapsed_time" : 6,
      "pr_date" : "2000-01-23T04:56:07.000+00:00",
      "effort_count" : 7,
      "pr_activity_id" : 1
    },
    "athlete_segment_stats" : {
      "distance" : 9.965781,
      "start_date_local" : "2000-01-23T04:56:07.000+00:00",
      "activity_id" : 4,
      "elapsed_time" : 5,
      "is_kom" : true,
      "id" : 1,
      "start_date" : "2000-01-23T04:56:07.000+00:00"
    },
    "start_latlng" : "",
    "elevation_low" : 1.2315135,
    "end_latlng" : "",
    "activity_type" : "Ride",
    "name" : "aeiou",
    "id" : 9,
    "state" : "aeiou"
  } ],
  "starred" : true,
  "updated_at" : "2000-01-23T04:56:07.000+00:00",
  "sub_type" : 2,
  "id_str" : "aeiou",
  "name" : "aeiou",
  "id" : 1,
  "map" : {
    "summary_polyline" : "aeiou",
    "id" : "aeiou",
    "polyline" : "aeiou"
  },
  "timestamp" : 5
} ]

SegmentEfforts

List Segment Efforts (getEffortsBySegmentId)

Returns a set of the authenticated athlete's segment efforts for a given segment. Requires subscription.

get
/segment_efforts

Parameters

segment_id
required Integer, in query
The identifier of the segment.
start_date_local
Date, in query
ISO 8601 formatted date time.
end_date_local
Date, in query
ISO 8601 formatted date time.
per_page
Integer, in query
Number of items per page. Defaults to 30.

Responses

HTTP code 200 An array of DetailedSegmentEffort objects.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/segment_efforts?segment_id=&start_date_local=&end_date_local=&per_page=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.SegmentEffortsApi;

import rx.Observable;

public class SegmentEffortsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    SegmentEffortsApi api = client.createService(SegmentEffortsApi.class);

    Integer segmentId = 56; // Integer | The identifier of the segment.
    Date startDateLocal = 2013-10-20T19:20:30+01:00; // Date | ISO 8601 formatted date time.
    Date endDateLocal = 2013-10-20T19:20:30+01:00; // Date | ISO 8601 formatted date time.
    Integer perPage = 56; // Integer | Number of items per page. Defaults to 30.

    Observable<List<DetailedSegmentEffort>> result = apiInstance.getEffortsBySegmentId(segmentId, startDateLocal, endDateLocal, perPage);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Integer *segmentId = 56; // The identifier of the segment.
Date *startDateLocal = 2013-10-20T19:20:30+01:00; // ISO 8601 formatted date time. (optional)
Date *endDateLocal = 2013-10-20T19:20:30+01:00; // ISO 8601 formatted date time. (optional)
Integer *perPage = 56; // Number of items per page. Defaults to 30. (optional) (default to 30)

STRVSegmentEffortsApi *apiInstance = [[STRVSegmentEffortsApi alloc] init];

// List Segment Efforts
[apiInstance getEffortsBySegmentIdWith:segmentId
    startDateLocal:startDateLocal
    endDateLocal:endDateLocal
    perPage:perPage
              completionHandler: ^(NSArray<STRVDetailedSegmentEffort>* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.SegmentEffortsApi()

var segmentId = 56; // {Integer} The identifier of the segment.

var opts = { 
  'startDateLocal': 2013-10-20T19:20:30+01:00, // {Date} ISO 8601 formatted date time.
  'endDateLocal': 2013-10-20T19:20:30+01:00, // {Date} ISO 8601 formatted date time.
  'perPage': 56 // {Integer} Number of items per page. Defaults to 30.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getEffortsBySegmentId(segmentId, opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getEffortsBySegmentIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new SegmentEffortsApi();
            var segmentId = 56;  // Integer | The identifier of the segment.
            var startDateLocal = 2013-10-20T19:20:30+01:00;  // Date | ISO 8601 formatted date time. (optional) 
            var endDateLocal = 2013-10-20T19:20:30+01:00;  // Date | ISO 8601 formatted date time. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Segment Efforts
                array[DetailedSegmentEffort] result = apiInstance.getEffortsBySegmentId(segmentId, startDateLocal, endDateLocal, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SegmentEffortsApi.getEffortsBySegmentId: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.SegmentEffortsApi()
segmentId = 56 # Integer | The identifier of the segment.
startDateLocal = 2013-10-20T19:20:30+01:00 # Date | ISO 8601 formatted date time. (optional)
endDateLocal = 2013-10-20T19:20:30+01:00 # Date | ISO 8601 formatted date time. (optional)
perPage = 56 # Integer | Number of items per page. Defaults to 30. (optional) (default to 30)

try: 
    # List Segment Efforts
    api_response = api_instance.getEffortsBySegmentId(segmentId, startDateLocal=startDateLocal, endDateLocal=endDateLocal, perPage=perPage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SegmentEffortsApi->getEffortsBySegmentId: %s\n" % e)

Sample Response

[ {
  "id" : 123456789,
  "resource_state" : 2,
  "name" : "Alpe d'Huez",
  "activity" : {
    "id" : 1234567890,
    "resource_state" : 1
  },
  "athlete" : {
    "id" : 123445678689,
    "resource_state" : 1
  },
  "elapsed_time" : 1657,
  "moving_time" : 1642,
  "start_date" : "2007-09-15T08:15:29Z",
  "start_date_local" : "2007-09-15T09:15:29Z",
  "distance" : 6148.92,
  "start_index" : 1102,
  "end_index" : 1366,
  "device_watts" : false,
  "average_watts" : 220.2,
  "segment" : {
    "id" : 788127,
    "resource_state" : 2,
    "name" : "Alpe d'Huez",
    "activity_type" : "Ride",
    "distance" : 6297.46,
    "average_grade" : 4.8,
    "maximum_grade" : 16.3,
    "elevation_high" : 416,
    "elevation_low" : 104.6,
    "start_latlng" : [ 52.98501000581467, -3.1869720001197366 ],
    "end_latlng" : [ 53.02204074375785, -3.2039630001245736 ],
    "climb_category" : 2,
    "city" : "Le Bourg D'Oisans",
    "state" : "RA",
    "country" : "France",
    "private" : false,
    "hazardous" : false,
    "starred" : false
  },
  "kom_rank" : null,
  "pr_rank" : null,
  "achievements" : [ ]
} ]

Get Segment Effort (getSegmentEffortById)

Returns a segment effort from an activity that is owned by the authenticated athlete. Requires subscription.

get
/segment_efforts/{id}

Parameters

id
required Long, in path
The identifier of the segment effort.

Responses

HTTP code 200 Representation of a segment effort. An instance of DetailedSegmentEffort.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/segment_efforts/{id}" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.SegmentEffortsApi;

import rx.Observable;

public class SegmentEffortsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    SegmentEffortsApi api = client.createService(SegmentEffortsApi.class);

    Long id = 789; // Long | The identifier of the segment effort.

    Observable<DetailedSegmentEffort> result = apiInstance.getSegmentEffortById(id);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the segment effort.

STRVSegmentEffortsApi *apiInstance = [[STRVSegmentEffortsApi alloc] init];

// Get Segment Effort
[apiInstance getSegmentEffortByIdWith:id
              completionHandler: ^(STRVDetailedSegmentEffort output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.SegmentEffortsApi()

var id = 789; // {Long} The identifier of the segment effort.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSegmentEffortById(id, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getSegmentEffortByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new SegmentEffortsApi();
            var id = 789;  // Long | The identifier of the segment effort.

            try
            {
                // Get Segment Effort
                DetailedSegmentEffort result = apiInstance.getSegmentEffortById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SegmentEffortsApi.getSegmentEffortById: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.SegmentEffortsApi()
id = 789 # Long | The identifier of the segment effort.

try: 
    # Get Segment Effort
    api_response = api_instance.getSegmentEffortById(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SegmentEffortsApi->getSegmentEffortById: %s\n" % e)

Sample Response

{
  "id" : 1234556789,
  "resource_state" : 3,
  "name" : "Alpe d'Huez",
  "activity" : {
    "id" : 3454504,
    "resource_state" : 1
  },
  "athlete" : {
    "id" : 54321,
    "resource_state" : 1
  },
  "elapsed_time" : 381,
  "moving_time" : 340,
  "start_date" : "2018-02-12T16:12:41Z",
  "start_date_local" : "2018-02-12T08:12:41Z",
  "distance" : 83,
  "start_index" : 65,
  "end_index" : 83,
  "segment" : {
    "id" : 63450,
    "resource_state" : 2,
    "name" : "Alpe d'Huez",
    "activity_type" : "Run",
    "distance" : 780.35,
    "average_grade" : -0.5,
    "maximum_grade" : 0,
    "elevation_high" : 21,
    "elevation_low" : 17.2,
    "start_latlng" : [ 37.808407654682, -122.426682919323 ],
    "end_latlng" : [ 37.808297909724, -122.421324329674 ],
    "climb_category" : 0,
    "city" : "San Francisco",
    "state" : "CA",
    "country" : "United States",
    "private" : false,
    "hazardous" : false,
    "starred" : false
  },
  "kom_rank" : null,
  "pr_rank" : null,
  "achievements" : [ ],
  "athlete_segment_stats" : {
    "pr_elapsed_time" : 212,
    "pr_date" : "2015-02-12",
    "effort_count" : 149
  }
}

Segments

Explore segments (exploreSegments)

Returns the top 10 segments matching a specified query.

get
/segments/explore

Parameters

bounds
required array[Float], in query
The latitude and longitude for two points describing a rectangular boundary for the search: [southwest corner latitutde, southwest corner longitude, northeast corner latitude, northeast corner longitude]
activity_type
String, in query
Desired activity type. May take one of the following values: running, riding
min_cat
Integer, in query
The minimum climbing category.
max_cat
Integer, in query
The maximum climbing category.

Responses

HTTP code 200 List of matching segments. An instance of ExplorerResponse.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/segments/explore?bounds=&activity_type=&min_cat=&max_cat=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.SegmentsApi;

import rx.Observable;

public class SegmentsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    SegmentsApi api = client.createService(SegmentsApi.class);

    array[Float] bounds = ; // array[Float] | The latitude and longitude for two points describing a rectangular boundary for the search: [southwest corner latitutde, southwest corner longitude, northeast corner latitude, northeast corner longitude]
    String activityType = activityType_example; // String | Desired activity type.
    Integer minCat = 56; // Integer | The minimum climbing category.
    Integer maxCat = 56; // Integer | The maximum climbing category.

    Observable<ExplorerResponse> result = apiInstance.exploreSegments(bounds, activityType, minCat, maxCat);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

array[Float] *bounds = ; // The latitude and longitude for two points describing a rectangular boundary for the search: [southwest corner latitutde, southwest corner longitude, northeast corner latitude, northeast corner longitude]
String *activityType = activityType_example; // Desired activity type. (optional)
Integer *minCat = 56; // The minimum climbing category. (optional)
Integer *maxCat = 56; // The maximum climbing category. (optional)

STRVSegmentsApi *apiInstance = [[STRVSegmentsApi alloc] init];

// Explore segments
[apiInstance exploreSegmentsWith:bounds
    activityType:activityType
    minCat:minCat
    maxCat:maxCat
              completionHandler: ^(STRVExplorerResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.SegmentsApi()

var bounds = ; // {array[Float]} The latitude and longitude for two points describing a rectangular boundary for the search: [southwest corner latitutde, southwest corner longitude, northeast corner latitude, northeast corner longitude]

var opts = { 
  'activityType': activityType_example, // {String} Desired activity type.
  'minCat': 56, // {Integer} The minimum climbing category.
  'maxCat': 56 // {Integer} The maximum climbing category.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.exploreSegments(bounds, opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class exploreSegmentsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new SegmentsApi();
            var bounds = new array[Float](); // array[Float] | The latitude and longitude for two points describing a rectangular boundary for the search: [southwest corner latitutde, southwest corner longitude, northeast corner latitude, northeast corner longitude]
            var activityType = activityType_example;  // String | Desired activity type. (optional) 
            var minCat = 56;  // Integer | The minimum climbing category. (optional) 
            var maxCat = 56;  // Integer | The maximum climbing category. (optional) 

            try
            {
                // Explore segments
                ExplorerResponse result = apiInstance.exploreSegments(bounds, activityType, minCat, maxCat);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SegmentsApi.exploreSegments: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.SegmentsApi()
bounds =  # array[Float] | The latitude and longitude for two points describing a rectangular boundary for the search: [southwest corner latitutde, southwest corner longitude, northeast corner latitude, northeast corner longitude]
activityType = activityType_example # String | Desired activity type. (optional)
minCat = 56 # Integer | The minimum climbing category. (optional)
maxCat = 56 # Integer | The maximum climbing category. (optional)

try: 
    # Explore segments
    api_response = api_instance.exploreSegments(bounds, activityType=activityType, minCat=minCat, maxCat=maxCat)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SegmentsApi->exploreSegments: %s\n" % e)

Sample Response

{
  "segments" : [ {
    "id" : 229781,
    "resource_state" : 2,
    "name" : "Hawk Hill",
    "climb_category" : 1,
    "climb_category_desc" : "4",
    "avg_grade" : 5.7,
    "start_latlng" : [ 37.8331119, -122.4834356 ],
    "end_latlng" : [ 37.8280722, -122.4981393 ],
    "elev_difference" : 152.8,
    "distance" : 2684.8,
    "points" : "}g|eFnpqjVl@En@Md@HbAd@d@^h@Xx@VbARjBDh@OPQf@w@d@k@XKXDFPH\\EbGT`AV`@v@|@NTNb@?XOb@cAxAWLuE@eAFMBoAv@eBt@q@b@}@tAeAt@i@dAC`AFZj@dB?~@[h@MbAVn@b@b@\\d@Eh@Qb@_@d@eB|@c@h@WfBK|AMpA?VF\\\\t@f@t@h@j@|@b@hCb@b@XTd@Bl@GtA?jAL`ALp@Tr@RXd@Rx@Pn@^Zh@Tx@Zf@`@FTCzDy@f@Yx@m@n@Op@VJr@",
    "starred" : false
  } ]
}

List Starred Segments (getLoggedInAthleteStarredSegments)

List of the authenticated athlete's starred segments. Private segments are filtered out unless requested by a token with read_all scope.

get
/segments/starred

Parameters

page
Integer, in query
Page number. Defaults to 1.
per_page
Integer, in query
Number of items per page. Defaults to 30.

Responses

HTTP code 200 An array of SummarySegment objects.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/segments/starred?page=&per_page=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.SegmentsApi;

import rx.Observable;

public class SegmentsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    SegmentsApi api = client.createService(SegmentsApi.class);

    Integer page = 56; // Integer | Page number. Defaults to 1.
    Integer perPage = 56; // Integer | Number of items per page. Defaults to 30.

    Observable<List<SummarySegment>> result = apiInstance.getLoggedInAthleteStarredSegments(page, perPage);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Integer *page = 56; // Page number. Defaults to 1. (optional)
Integer *perPage = 56; // Number of items per page. Defaults to 30. (optional) (default to 30)

STRVSegmentsApi *apiInstance = [[STRVSegmentsApi alloc] init];

// List Starred Segments
[apiInstance getLoggedInAthleteStarredSegmentsWith:page
    perPage:perPage
              completionHandler: ^(NSArray<STRVSummarySegment>* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.SegmentsApi()

var opts = { 
  'page': 56, // {Integer} Page number. Defaults to 1.
  'perPage': 56 // {Integer} Number of items per page. Defaults to 30.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLoggedInAthleteStarredSegments(opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getLoggedInAthleteStarredSegmentsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new SegmentsApi();
            var page = 56;  // Integer | Page number. Defaults to 1. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Starred Segments
                array[SummarySegment] result = apiInstance.getLoggedInAthleteStarredSegments(page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SegmentsApi.getLoggedInAthleteStarredSegments: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.SegmentsApi()
page = 56 # Integer | Page number. Defaults to 1. (optional)
perPage = 56 # Integer | Number of items per page. Defaults to 30. (optional) (default to 30)

try: 
    # List Starred Segments
    api_response = api_instance.getLoggedInAthleteStarredSegments(page=page, perPage=perPage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SegmentsApi->getLoggedInAthleteStarredSegments: %s\n" % e)

Sample Response

{
  "id" : 229781,
  "resource_state" : 3,
  "name" : "Hawk Hill",
  "activity_type" : "Ride",
  "distance" : 2684.82,
  "average_grade" : 5.7,
  "maximum_grade" : 14.2,
  "elevation_high" : 245.3,
  "elevation_low" : 92.4,
  "start_latlng" : [ 37.8331119, -122.4834356 ],
  "end_latlng" : [ 37.8280722, -122.4981393 ],
  "climb_category" : 1,
  "city" : "San Francisco",
  "state" : "CA",
  "country" : "United States",
  "private" : false,
  "hazardous" : false,
  "starred" : false,
  "created_at" : "2009-09-21T20:29:41Z",
  "updated_at" : "2018-02-15T09:04:18Z",
  "total_elevation_gain" : 155.733,
  "map" : {
    "id" : "s229781",
    "polyline" : "}g|eFnpqjVl@En@Md@HbAd@d@^h@Xx@VbARjBDh@OPQf@w@d@k@XKXDFPH\\EbGT`AV`@v@|@NTNb@?XOb@cAxAWLuE@eAFMBoAv@eBt@q@b@}@tAeAt@i@dAC`AFZj@dB?~@[h@MbAVn@b@b@\\d@Eh@Qb@_@d@eB|@c@h@WfBK|AMpA?VF\\\\t@f@t@h@j@|@b@hCb@b@XTd@Bl@GtA?jAL`ALp@Tr@RXd@Rx@Pn@^Zh@Tx@Zf@`@FTCzDy@f@Yx@m@n@Op@VJr@",
    "resource_state" : 3
  },
  "effort_count" : 309974,
  "athlete_count" : 30623,
  "star_count" : 2428,
  "athlete_segment_stats" : {
    "pr_elapsed_time" : 553,
    "pr_date" : "1993-04-03",
    "effort_count" : 2
  }
}

Get Segment (getSegmentById)

Returns the specified segment. read_all scope required in order to retrieve athlete-specific segment information, or to retrieve private segments.

get
/segments/{id}

Parameters

id
required Long, in path
The identifier of the segment.

Responses

HTTP code 200 Representation of a segment. An instance of DetailedSegment.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/segments/{id}" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.SegmentsApi;

import rx.Observable;

public class SegmentsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    SegmentsApi api = client.createService(SegmentsApi.class);

    Long id = 789; // Long | The identifier of the segment.

    Observable<DetailedSegment> result = apiInstance.getSegmentById(id);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the segment.

STRVSegmentsApi *apiInstance = [[STRVSegmentsApi alloc] init];

// Get Segment
[apiInstance getSegmentByIdWith:id
              completionHandler: ^(STRVDetailedSegment output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.SegmentsApi()

var id = 789; // {Long} The identifier of the segment.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSegmentById(id, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getSegmentByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new SegmentsApi();
            var id = 789;  // Long | The identifier of the segment.

            try
            {
                // Get Segment
                DetailedSegment result = apiInstance.getSegmentById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SegmentsApi.getSegmentById: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.SegmentsApi()
id = 789 # Long | The identifier of the segment.

try: 
    # Get Segment
    api_response = api_instance.getSegmentById(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SegmentsApi->getSegmentById: %s\n" % e)

Sample Response

{
  "id" : 229781,
  "resource_state" : 3,
  "name" : "Hawk Hill",
  "activity_type" : "Ride",
  "distance" : 2684.82,
  "average_grade" : 5.7,
  "maximum_grade" : 14.2,
  "elevation_high" : 245.3,
  "elevation_low" : 92.4,
  "start_latlng" : [ 37.8331119, -122.4834356 ],
  "end_latlng" : [ 37.8280722, -122.4981393 ],
  "climb_category" : 1,
  "city" : "San Francisco",
  "state" : "CA",
  "country" : "United States",
  "private" : false,
  "hazardous" : false,
  "starred" : false,
  "created_at" : "2009-09-21T20:29:41Z",
  "updated_at" : "2018-02-15T09:04:18Z",
  "total_elevation_gain" : 155.733,
  "map" : {
    "id" : "s229781",
    "polyline" : "}g|eFnpqjVl@En@Md@HbAd@d@^h@Xx@VbARjBDh@OPQf@w@d@k@XKXDFPH\\EbGT`AV`@v@|@NTNb@?XOb@cAxAWLuE@eAFMBoAv@eBt@q@b@}@tAeAt@i@dAC`AFZj@dB?~@[h@MbAVn@b@b@\\d@Eh@Qb@_@d@eB|@c@h@WfBK|AMpA?VF\\\\t@f@t@h@j@|@b@hCb@b@XTd@Bl@GtA?jAL`ALp@Tr@RXd@Rx@Pn@^Zh@Tx@Zf@`@FTCzDy@f@Yx@m@n@Op@VJr@",
    "resource_state" : 3
  },
  "effort_count" : 309974,
  "athlete_count" : 30623,
  "star_count" : 2428,
  "athlete_segment_stats" : {
    "pr_elapsed_time" : 553,
    "pr_date" : "1993-04-03",
    "effort_count" : 2
  }
}

Star Segment (starSegment)

Stars/Unstars the given segment for the authenticated athlete. Requires profile:write scope.

put
/segments/{id}/starred

Parameters

id
required Long, in path
The identifier of the segment to star.
starred
required Boolean, in form
If true, star the segment; if false, unstar the segment.

Responses

HTTP code 200 Representation of a segment. An instance of DetailedSegment.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http put "https://www.strava.com/api/v3/segments/{id}/starred" starred='value' "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.SegmentsApi;

import rx.Observable;

public class SegmentsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    SegmentsApi api = client.createService(SegmentsApi.class);

    Long id = 789; // Long | The identifier of the segment to star.
    Boolean starred = true; // Boolean | If true, star the segment; if false, unstar the segment.

    Observable<DetailedSegment> result = apiInstance.starSegment(id, starred);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the segment to star.
Boolean *starred = true; // If true, star the segment; if false, unstar the segment. (default to false)

STRVSegmentsApi *apiInstance = [[STRVSegmentsApi alloc] init];

// Star Segment
[apiInstance starSegmentWith:id
    starred:starred
              completionHandler: ^(STRVDetailedSegment output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.SegmentsApi()

var id = 789; // {Long} The identifier of the segment to star.

var starred = true; // {Boolean} If true, star the segment; if false, unstar the segment.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.starSegment(id, starred, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class starSegmentExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new SegmentsApi();
            var id = 789;  // Long | The identifier of the segment to star.
            var starred = true;  // Boolean | If true, star the segment; if false, unstar the segment. (default to false)

            try
            {
                // Star Segment
                DetailedSegment result = apiInstance.starSegment(id, starred);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SegmentsApi.starSegment: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.SegmentsApi()
id = 789 # Long | The identifier of the segment to star.
starred = true # Boolean | If true, star the segment; if false, unstar the segment. (default to false)

try: 
    # Star Segment
    api_response = api_instance.starSegment(id, starred)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SegmentsApi->starSegment: %s\n" % e)

Sample Response

{
  "id" : 229781,
  "resource_state" : 3,
  "name" : "Hawk Hill",
  "activity_type" : "Ride",
  "distance" : 2684.82,
  "average_grade" : 5.7,
  "maximum_grade" : 14.2,
  "elevation_high" : 245.3,
  "elevation_low" : 92.4,
  "start_latlng" : [ 37.8331119, -122.4834356 ],
  "end_latlng" : [ 37.8280722, -122.4981393 ],
  "climb_category" : 1,
  "city" : "San Francisco",
  "state" : "CA",
  "country" : "United States",
  "private" : false,
  "hazardous" : false,
  "starred" : false,
  "created_at" : "2009-09-21T20:29:41Z",
  "updated_at" : "2018-02-15T09:04:18Z",
  "total_elevation_gain" : 155.733,
  "map" : {
    "id" : "s229781",
    "polyline" : "}g|eFnpqjVl@En@Md@HbAd@d@^h@Xx@VbARjBDh@OPQf@w@d@k@XKXDFPH\\EbGT`AV`@v@|@NTNb@?XOb@cAxAWLuE@eAFMBoAv@eBt@q@b@}@tAeAt@i@dAC`AFZj@dB?~@[h@MbAVn@b@b@\\d@Eh@Qb@_@d@eB|@c@h@WfBK|AMpA?VF\\\\t@f@t@h@j@|@b@hCb@b@XTd@Bl@GtA?jAL`ALp@Tr@RXd@Rx@Pn@^Zh@Tx@Zf@`@FTCzDy@f@Yx@m@n@Op@VJr@",
    "resource_state" : 3
  },
  "effort_count" : 309974,
  "athlete_count" : 30623,
  "star_count" : 2428,
  "athlete_segment_stats" : {
    "pr_elapsed_time" : 553,
    "pr_date" : "1993-04-03",
    "effort_count" : 2
  }
}

Streams

Get Activity Streams (getActivityStreams)

Returns the given activity's streams. Requires activity:read scope. Requires activity:read_all scope for Only Me activities.

get
/activities/{id}/streams

Parameters

id
required Long, in path
The identifier of the activity.
keys
required array[String], in query
Desired stream types. May take one of the following values:
key_by_type
required Boolean, in query
Must be true.

Responses

HTTP code 200 The set of requested streams. An instance of StreamSet.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/activities/{id}/streams?keys=&key_by_type=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.StreamsApi;

import rx.Observable;

public class StreamsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    StreamsApi api = client.createService(StreamsApi.class);

    Long id = 789; // Long | The identifier of the activity.
    array[String] keys = ; // array[String] | Desired stream types.
    Boolean keyByType = true; // Boolean | Must be true.

    Observable<StreamSet> result = apiInstance.getActivityStreams(id, keys, keyByType);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the activity.
array[String] *keys = ; // Desired stream types.
Boolean *keyByType = true; // Must be true. (default to true)

STRVStreamsApi *apiInstance = [[STRVStreamsApi alloc] init];

// Get Activity Streams
[apiInstance getActivityStreamsWith:id
    keys:keys
    keyByType:keyByType
              completionHandler: ^(STRVStreamSet output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.StreamsApi()

var id = 789; // {Long} The identifier of the activity.

var keys = ; // {array[String]} Desired stream types.

var keyByType = true; // {Boolean} Must be true.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getActivityStreams(id, keys, keyByType, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getActivityStreamsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new StreamsApi();
            var id = 789;  // Long | The identifier of the activity.
            var keys = new array[String](); // array[String] | Desired stream types.
            var keyByType = true;  // Boolean | Must be true. (default to true)

            try
            {
                // Get Activity Streams
                StreamSet result = apiInstance.getActivityStreams(id, keys, keyByType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StreamsApi.getActivityStreams: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.StreamsApi()
id = 789 # Long | The identifier of the activity.
keys =  # array[String] | Desired stream types.
keyByType = true # Boolean | Must be true. (default to true)

try: 
    # Get Activity Streams
    api_response = api_instance.getActivityStreams(id, keys, keyByType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StreamsApi->getActivityStreams: %s\n" % e)

Sample Response

[ {
  "type" : "distance",
  "data" : [ 2.9, 5.8, 8.5, 11.7, 15, 19, 23.2, 28, 32.8, 38.1, 43.8, 49.5 ],
  "series_type" : "distance",
  "original_size" : 12,
  "resolution" : "high"
} ]

Get Route Streams (getRouteStreams)

Returns the given route's streams. Requires read_all scope for private routes.

get
/routes/{id}/streams

Parameters

id
required Long, in path
The identifier of the route.

Responses

HTTP code 200 The set of requested streams. An instance of StreamSet.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/routes/{id}/streams" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.StreamsApi;

import rx.Observable;

public class StreamsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    StreamsApi api = client.createService(StreamsApi.class);

    Long id = 789; // Long | The identifier of the route.

    Observable<StreamSet> result = apiInstance.getRouteStreams(id);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the route.

STRVStreamsApi *apiInstance = [[STRVStreamsApi alloc] init];

// Get Route Streams
[apiInstance getRouteStreamsWith:id
              completionHandler: ^(STRVStreamSet output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.StreamsApi()

var id = 789; // {Long} The identifier of the route.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRouteStreams(id, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getRouteStreamsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new StreamsApi();
            var id = 789;  // Long | The identifier of the route.

            try
            {
                // Get Route Streams
                StreamSet result = apiInstance.getRouteStreams(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StreamsApi.getRouteStreams: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.StreamsApi()
id = 789 # Long | The identifier of the route.

try: 
    # Get Route Streams
    api_response = api_instance.getRouteStreams(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StreamsApi->getRouteStreams: %s\n" % e)

Sample Response

[ {
  "type" : "latlng",
  "data" : [ [ 37.833112, -122.483436 ], [ 37.832964, -122.483406 ] ]
}, {
  "type" : "distance",
  "data" : [ 0, 16.8 ]
}, {
  "type" : "altitude",
  "data" : [ 92.4, 93.4 ]
} ]

Get Segment Effort Streams (getSegmentEffortStreams)

Returns a set of streams for a segment effort completed by the authenticated athlete. Requires read_all scope.

get
/segment_efforts/{id}/streams

Parameters

id
required Long, in path
The identifier of the segment effort.
keys
required array[String], in query
The types of streams to return. May take one of the following values:
key_by_type
required Boolean, in query
Must be true.

Responses

HTTP code 200 The set of requested streams. An instance of StreamSet.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/segment_efforts/{id}/streams?keys=&key_by_type=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.StreamsApi;

import rx.Observable;

public class StreamsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    StreamsApi api = client.createService(StreamsApi.class);

    Long id = 789; // Long | The identifier of the segment effort.
    array[String] keys = ; // array[String] | The types of streams to return.
    Boolean keyByType = true; // Boolean | Must be true.

    Observable<StreamSet> result = apiInstance.getSegmentEffortStreams(id, keys, keyByType);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the segment effort.
array[String] *keys = ; // The types of streams to return.
Boolean *keyByType = true; // Must be true. (default to true)

STRVStreamsApi *apiInstance = [[STRVStreamsApi alloc] init];

// Get Segment Effort Streams
[apiInstance getSegmentEffortStreamsWith:id
    keys:keys
    keyByType:keyByType
              completionHandler: ^(STRVStreamSet output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.StreamsApi()

var id = 789; // {Long} The identifier of the segment effort.

var keys = ; // {array[String]} The types of streams to return.

var keyByType = true; // {Boolean} Must be true.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSegmentEffortStreams(id, keys, keyByType, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getSegmentEffortStreamsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new StreamsApi();
            var id = 789;  // Long | The identifier of the segment effort.
            var keys = new array[String](); // array[String] | The types of streams to return.
            var keyByType = true;  // Boolean | Must be true. (default to true)

            try
            {
                // Get Segment Effort Streams
                StreamSet result = apiInstance.getSegmentEffortStreams(id, keys, keyByType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StreamsApi.getSegmentEffortStreams: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.StreamsApi()
id = 789 # Long | The identifier of the segment effort.
keys =  # array[String] | The types of streams to return.
keyByType = true # Boolean | Must be true. (default to true)

try: 
    # Get Segment Effort Streams
    api_response = api_instance.getSegmentEffortStreams(id, keys, keyByType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StreamsApi->getSegmentEffortStreams: %s\n" % e)

Sample Response

[ {
  "type" : "distance",
  "data" : [ 904.5, 957.8, 963.1, 989.1, 1011.9, 1049.7, 1082.4, 1098.1, 1113.2, 1124.7, 1139.2, 1142.1, 1170.4, 1173 ],
  "series_type" : "distance",
  "original_size" : 14,
  "resolution" : "high"
} ]

Get Segment Streams (getSegmentStreams)

Returns the given segment's streams. Requires read_all scope for private segments.

get
/segments/{id}/streams

Parameters

id
required Long, in path
The identifier of the segment.
keys
required array[String], in query
The types of streams to return. May take one of the following values:
key_by_type
required Boolean, in query
Must be true.

Responses

HTTP code 200 The set of requested streams. An instance of StreamSet.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/segments/{id}/streams?keys=&key_by_type=" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.StreamsApi;

import rx.Observable;

public class StreamsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    StreamsApi api = client.createService(StreamsApi.class);

    Long id = 789; // Long | The identifier of the segment.
    array[String] keys = ; // array[String] | The types of streams to return.
    Boolean keyByType = true; // Boolean | Must be true.

    Observable<StreamSet> result = apiInstance.getSegmentStreams(id, keys, keyByType);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // The identifier of the segment.
array[String] *keys = ; // The types of streams to return.
Boolean *keyByType = true; // Must be true. (default to true)

STRVStreamsApi *apiInstance = [[STRVStreamsApi alloc] init];

// Get Segment Streams
[apiInstance getSegmentStreamsWith:id
    keys:keys
    keyByType:keyByType
              completionHandler: ^(STRVStreamSet output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.StreamsApi()

var id = 789; // {Long} The identifier of the segment.

var keys = ; // {array[String]} The types of streams to return.

var keyByType = true; // {Boolean} Must be true.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSegmentStreams(id, keys, keyByType, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getSegmentStreamsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new StreamsApi();
            var id = 789;  // Long | The identifier of the segment.
            var keys = new array[String](); // array[String] | The types of streams to return.
            var keyByType = true;  // Boolean | Must be true. (default to true)

            try
            {
                // Get Segment Streams
                StreamSet result = apiInstance.getSegmentStreams(id, keys, keyByType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StreamsApi.getSegmentStreams: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.StreamsApi()
id = 789 # Long | The identifier of the segment.
keys =  # array[String] | The types of streams to return.
keyByType = true # Boolean | Must be true. (default to true)

try: 
    # Get Segment Streams
    api_response = api_instance.getSegmentStreams(id, keys, keyByType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StreamsApi->getSegmentStreams: %s\n" % e)

Sample Response

[ {
  "type" : "latlng",
  "data" : [ [ 37.833112, -122.483436 ], [ 37.832964, -122.483406 ] ],
  "series_type" : "distance",
  "original_size" : 2,
  "resolution" : "high"
}, {
  "type" : "distance",
  "data" : [ 0, 16.8 ],
  "series_type" : "distance",
  "original_size" : 2,
  "resolution" : "high"
}, {
  "type" : "altitude",
  "data" : [ 92.4, 93.4 ],
  "series_type" : "distance",
  "original_size" : 2,
  "resolution" : "high"
} ]

Uploads

Upload Activity (createUpload)

Uploads a new data file to create an activity from. Requires activity:write scope.

post
/uploads

Parameters

file
File, in form
The uploaded file.
name
String, in form
The desired name of the resulting activity.
description
String, in form
The desired description of the resulting activity.
trainer
String, in form
Whether the resulting activity should be marked as having been performed on a trainer.
commute
String, in form
Whether the resulting activity should be tagged as a commute.
data_type
String, in form
The format of the uploaded file. May take one of the following values: fit, fit.gz, tcx, tcx.gz, gpx, gpx.gz
external_id
String, in form
The desired external identifier of the resulting activity.

Responses

HTTP code 201 A representation of the created upload. An instance of Upload.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http post "https://www.strava.com/api/v3/uploads" file@/path/to/file name='value' description='value' trainer='value' commute='value' data_type='value' external_id='value' "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.UploadsApi;

import rx.Observable;

public class UploadsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    UploadsApi api = client.createService(UploadsApi.class);

    File file = /path/to/file.txt; // File | The uploaded file.
    String name = name_example; // String | The desired name of the resulting activity.
    String description = description_example; // String | The desired description of the resulting activity.
    String trainer = trainer_example; // String | Whether the resulting activity should be marked as having been performed on a trainer.
    String commute = commute_example; // String | Whether the resulting activity should be tagged as a commute.
    String dataType = dataType_example; // String | The format of the uploaded file.
    String externalId = externalId_example; // String | The desired external identifier of the resulting activity.

    Observable<Upload> result = apiInstance.createUpload(file, name, description, trainer, commute, dataType, externalId);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

File *file = /path/to/file.txt; // The uploaded file. (optional)
String *name = name_example; // The desired name of the resulting activity. (optional)
String *description = description_example; // The desired description of the resulting activity. (optional)
String *trainer = trainer_example; // Whether the resulting activity should be marked as having been performed on a trainer. (optional)
String *commute = commute_example; // Whether the resulting activity should be tagged as a commute. (optional)
String *dataType = dataType_example; // The format of the uploaded file. (optional)
String *externalId = externalId_example; // The desired external identifier of the resulting activity. (optional)

STRVUploadsApi *apiInstance = [[STRVUploadsApi alloc] init];

// Upload Activity
[apiInstance createUploadWith:file
    name:name
    description:description
    trainer:trainer
    commute:commute
    dataType:dataType
    externalId:externalId
              completionHandler: ^(STRVUpload output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.UploadsApi()

var opts = { 
  'file': /path/to/file.txt, // {File} The uploaded file.
  'name': name_example, // {String} The desired name of the resulting activity.
  'description': description_example, // {String} The desired description of the resulting activity.
  'trainer': trainer_example, // {String} Whether the resulting activity should be marked as having been performed on a trainer.
  'commute': commute_example, // {String} Whether the resulting activity should be tagged as a commute.
  'dataType': dataType_example, // {String} The format of the uploaded file.
  'externalId': externalId_example // {String} The desired external identifier of the resulting activity.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createUpload(opts, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class createUploadExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UploadsApi();
            var file = new File(); // File | The uploaded file. (optional) 
            var name = name_example;  // String | The desired name of the resulting activity. (optional) 
            var description = description_example;  // String | The desired description of the resulting activity. (optional) 
            var trainer = trainer_example;  // String | Whether the resulting activity should be marked as having been performed on a trainer. (optional) 
            var commute = commute_example;  // String | Whether the resulting activity should be tagged as a commute. (optional) 
            var dataType = dataType_example;  // String | The format of the uploaded file. (optional) 
            var externalId = externalId_example;  // String | The desired external identifier of the resulting activity. (optional) 

            try
            {
                // Upload Activity
                Upload result = apiInstance.createUpload(file, name, description, trainer, commute, dataType, externalId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UploadsApi.createUpload: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UploadsApi()
file = /path/to/file.txt # File | The uploaded file. (optional)
name = name_example # String | The desired name of the resulting activity. (optional)
description = description_example # String | The desired description of the resulting activity. (optional)
trainer = trainer_example # String | Whether the resulting activity should be marked as having been performed on a trainer. (optional)
commute = commute_example # String | Whether the resulting activity should be tagged as a commute. (optional)
dataType = dataType_example # String | The format of the uploaded file. (optional)
externalId = externalId_example # String | The desired external identifier of the resulting activity. (optional)

try: 
    # Upload Activity
    api_response = api_instance.createUpload(file=file, name=name, description=description, trainer=trainer, commute=commute, dataType=dataType, externalId=externalId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UploadsApi->createUpload: %s\n" % e)

Sample Response

{
  "id_str" : "aeiou",
  "activity_id" : 6,
  "external_id" : "aeiou",
  "id" : 0,
  "error" : "aeiou",
  "status" : "aeiou"
}

Get Upload (getUploadById)

Returns an upload for a given identifier. Requires activity:write scope.

get
/uploads/{uploadId}

Parameters

uploadId
required Long, in path
The identifier of the upload.

Responses

HTTP code 200 Representation of the upload. An instance of Upload.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/uploads/{uploadId}" "Authorization: Bearer [[token]]"
import com.strava.api.v3.*;
import com.strava.api.v3.auth.*;
import com.strava.api.v3.model.*;
import com.strava.api.v3.api.UploadsApi;

import rx.Observable;

public class UploadsApiExample {
  public static void main(String... args) {
    ApiClient client = new ApiClient(...);
    UploadsApi api = client.createService(UploadsApi.class);

    Long uploadId = 789; // Long | The identifier of the upload.

    Observable<Upload> result = apiInstance.getUploadById(uploadId);
    result.subscribe(System.out::println, Throwable::printStackTrace);
  }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: strava_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *uploadId = 789; // The identifier of the upload.

STRVUploadsApi *apiInstance = [[STRVUploadsApi alloc] init];

// Get Upload
[apiInstance getUploadByIdWith:uploadId
              completionHandler: ^(STRVUpload output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;

// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new StravaApiV3.UploadsApi()

var uploadId = 789; // {Long} The identifier of the upload.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUploadById(uploadId, callback);
using System;
using System.Diagnostics;
using com.strava.api.v3.Api;
using com.strava.api.v3.Client;
using com.strava.api.v3.Model;

namespace Example
{
    public class getUploadByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UploadsApi();
            var uploadId = 789;  // Long | The identifier of the upload.

            try
            {
                // Get Upload
                Upload result = apiInstance.getUploadById(uploadId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UploadsApi.getUploadById: " + e.Message );
            }
        }
    }
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: strava_oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UploadsApi()
uploadId = 789 # Long | The identifier of the upload.

try: 
    # Get Upload
    api_response = api_instance.getUploadById(uploadId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UploadsApi->getUploadById: %s\n" % e)

Sample Response

{
  "id_str" : "aeiou",
  "activity_id" : 6,
  "external_id" : "aeiou",
  "id" : 0,
  "error" : "aeiou",
  "status" : "aeiou"
}

All Models

ActivityStats

A set of rolled-up statistics and totals for an athlete

biggest_ride_distance
double
The longest distance ridden by the athlete.
biggest_climb_elevation_gain
double
The highest climb ridden by the athlete.
recent_ride_totals
ActivityTotal
The recent (last 4 weeks) ride stats for the athlete.
recent_run_totals
ActivityTotal
The recent (last 4 weeks) run stats for the athlete.
recent_swim_totals
ActivityTotal
The recent (last 4 weeks) swim stats for the athlete.
ytd_ride_totals
ActivityTotal
The year to date ride stats for the athlete.
ytd_run_totals
ActivityTotal
The year to date run stats for the athlete.
ytd_swim_totals
ActivityTotal
The year to date swim stats for the athlete.
all_ride_totals
ActivityTotal
The all time ride stats for the athlete.
all_run_totals
ActivityTotal
The all time run stats for the athlete.
all_swim_totals
ActivityTotal
The all time swim stats for the athlete.

ActivityTotal

A roll-up of metrics pertaining to a set of activities. Values are in seconds and meters.

count
integer
The number of activities considered in this total.
distance
float
The total distance covered by the considered activities.
moving_time
integer
The total moving time of the considered activities.
elapsed_time
integer
The total elapsed time of the considered activities.
elevation_gain
float
The total elevation gain of the considered activities.
achievement_count
integer
The total number of achievements of the considered activities.

ActivityType

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)

May be one of the following values: 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

ActivityZone

score
integer
An instance of integer.
distribution_buckets
#/TimedZoneDistribution
An instance of #/TimedZoneDistribution.
type
string
May take one of the following values: heartrate, power
sensor_based
boolean
An instance of boolean.
points
integer
An instance of integer.
custom_zones
boolean
An instance of boolean.
max
integer
An instance of integer.

BaseStream

original_size
integer
The number of data points in this stream
resolution
string
The level of detail (sampling) in which this stream was returned May take one of the following values: low, medium, high
series_type
string
The base series used in the case the stream was downsampled May take one of the following values: distance, time

ClubActivity

athlete
MetaAthlete
An instance of MetaAthlete.
name
string
The name of the activity
distance
float
The activity's distance, in meters
moving_time
integer
The activity's moving time, in seconds
elapsed_time
integer
The activity's elapsed time, in seconds
total_elevation_gain
float
The activity's total elevation gain.
type
ActivityType
Deprecated. Prefer to use sport_type
sport_type
SportType
An instance of SportType.
workout_type
integer
The activity's workout type

ClubAthlete

resource_state
integer
Resource state, indicates level of detail. Possible values: 1 -> "meta", 2 -> "summary", 3 -> "detail"
firstname
string
The athlete's first name.
lastname
string
The athlete's last initial.
member
string
The athlete's member status.
admin
boolean
Whether the athlete is a club admin.
owner
boolean
Whether the athlete is club owner.

Comment

id
long
The unique identifier of this comment
activity_id
long
The identifier of the activity this comment is related to
text
string
The content of the comment
athlete
SummaryAthlete
An instance of SummaryAthlete.
created_at
DateTime
The time at which this comment was created.

Error

code
string
The code associated with this error.
field
string
The specific field or aspect of the resource associated with this error.
resource
string
The type of resource associated with this error.

ExplorerResponse

segments
ExplorerSegment
The set of segments matching an explorer request

ExplorerSegment

id
long
The unique identifier of this segment
name
string
The name of this segment
climb_category
integer
The category of the climb [0, 5]. Higher is harder ie. 5 is Hors catégorie, 0 is uncategorized in climb_category. If climb_category = 5, climb_category_desc = HC. If climb_category = 2, climb_category_desc = 3.
climb_category_desc
string
The description for the category of the climb May take one of the following values: NC, 4, 3, 2, 1, HC
avg_grade
float
The segment's average grade, in percents
start_latlng
LatLng
An instance of LatLng.
end_latlng
LatLng
An instance of LatLng.
elev_difference
float
The segments's evelation difference, in meters
distance
float
The segment's distance, in meters
points
string
The polyline of the segment

Fault

Encapsulates the errors that may be returned from the API.

errors
Error
The set of specific errors associated with this fault, if any.
message
string
The message of the fault.

HeartRateZoneRanges

custom_zones
boolean
Whether the athlete has set their own custom heart rate zones
zones
ZoneRanges
An instance of ZoneRanges.

Lap

id
long
The unique identifier of this lap
activity
MetaActivity
An instance of MetaActivity.
athlete
MetaAthlete
An instance of MetaAthlete.
average_cadence
float
The lap's average cadence
average_speed
float
The lap's average speed
distance
float
The lap's distance, in meters
elapsed_time
integer
The lap's elapsed time, in seconds
start_index
integer
The start index of this effort in its activity's stream
end_index
integer
The end index of this effort in its activity's stream
lap_index
integer
The index of this lap in the activity it belongs to
max_speed
float
The maximum speed of this lat, in meters per second
moving_time
integer
The lap's moving time, in seconds
name
string
The name of the lap
pace_zone
integer
The athlete's pace zone during this lap
split
integer
An instance of integer.
start_date
DateTime
The time at which the lap was started.
start_date_local
DateTime
The time at which the lap was started in the local timezone.
total_elevation_gain
float
The elevation gain of this lap, in meters

LatLng

A collection of float objects. A pair of latitude/longitude coordinates, represented as an array of 2 floating point numbers.

MetaActivity

id
long
The unique identifier of the activity

MetaAthlete

id
long
The unique identifier of the athlete

MetaClub

id
long
The club's unique identifier.
resource_state
integer
Resource state, indicates level of detail. Possible values: 1 -> "meta", 2 -> "summary", 3 -> "detail"
name
string
The club's name.

PhotosSummary

count
integer
The number of photos
primary
PhotosSummary_primary
An instance of PhotosSummary_primary.

PhotosSummary_primary

id
long
An instance of long.
source
integer
An instance of integer.
unique_id
string
An instance of string.
urls
string
An instance of string.

PolylineMap

id
string
The identifier of the map
polyline
string
The polyline of the map, only returned on detailed representation of an object
summary_polyline
string
The summary polyline of the map

PowerZoneRanges

zones
ZoneRanges
An instance of ZoneRanges.

Route

athlete
SummaryAthlete
An instance of SummaryAthlete.
description
string
The description of the route
distance
float
The route's distance, in meters
elevation_gain
float
The route's elevation gain.
id
long
The unique identifier of this route
id_str
string
The unique identifier of the route in string format
map
PolylineMap
An instance of PolylineMap.
name
string
The name of this route
private
boolean
Whether this route is private
starred
boolean
Whether this route is starred by the logged-in athlete
timestamp
integer
An epoch timestamp of when the route was created
type
integer
This route's type (1 for ride, 2 for runs)
sub_type
integer
This route's sub-type (1 for road, 2 for mountain bike, 3 for cross, 4 for trail, 5 for mixed)
created_at
DateTime
The time at which the route was created
updated_at
DateTime
The time at which the route was last updated
estimated_moving_time
integer
Estimated time in seconds for the authenticated athlete to complete route
segments
SummarySegment
The segments traversed by this route
waypoints
Waypoint
The custom waypoints along this route

Split

average_speed
float
The average speed of this split, in meters per second
distance
float
The distance of this split, in meters
elapsed_time
integer
The elapsed time of this split, in seconds
elevation_difference
float
The elevation difference of this split, in meters
pace_zone
integer
The pacing zone of this split
moving_time
integer
The moving time of this split, in seconds
split
integer
N/A

SportType

An enumeration of the sport types an activity may have. Distinct from ActivityType in that it has new types (e.g. MountainBikeRide)

May be one of the following values: 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

StreamSet

time
TimeStream
An instance of TimeStream.
distance
DistanceStream
An instance of DistanceStream.
latlng
LatLngStream
An instance of LatLngStream.
altitude
AltitudeStream
An instance of AltitudeStream.
velocity_smooth
SmoothVelocityStream
An instance of SmoothVelocityStream.
heartrate
HeartrateStream
An instance of HeartrateStream.
cadence
CadenceStream
An instance of CadenceStream.
watts
PowerStream
An instance of PowerStream.
temp
TemperatureStream
An instance of TemperatureStream.
moving
MovingStream
An instance of MovingStream.
grade_smooth
SmoothGradeStream
An instance of SmoothGradeStream.

SummaryGear

id
string
The gear's unique identifier.
resource_state
integer
Resource state, indicates level of detail. Possible values: 2 -> "summary", 3 -> "detail"
primary
boolean
Whether this gear's is the owner's default one.
name
string
The gear's name.
distance
float
The distance logged with this gear.

SummaryPRSegmentEffort

pr_activity_id
long
The unique identifier of the activity related to the PR effort.
pr_elapsed_time
integer
The elapsed time ot the PR effort.
pr_date
DateTime
The time at which the PR effort was started.
effort_count
integer
Number of efforts by the authenticated athlete on this segment.

SummarySegment

id
long
The unique identifier of this segment
name
string
The name of this segment
activity_type
string
May take one of the following values: Ride, Run
distance
float
The segment's distance, in meters
average_grade
float
The segment's average grade, in percents
maximum_grade
float
The segments's maximum grade, in percents
elevation_high
float
The segments's highest elevation, in meters
elevation_low
float
The segments's lowest elevation, in meters
start_latlng
LatLng
An instance of LatLng.
end_latlng
LatLng
An instance of LatLng.
climb_category
integer
The category of the climb [0, 5]. Higher is harder ie. 5 is Hors catégorie, 0 is uncategorized in climb_category.
city
string
The segments's city.
state
string
The segments's state or geographical region.
country
string
The segment's country.
private
boolean
Whether this segment is private.
athlete_pr_effort
SummaryPRSegmentEffort
An instance of SummaryPRSegmentEffort.
athlete_segment_stats
SummarySegmentEffort
An instance of SummarySegmentEffort.

SummarySegmentEffort

id
long
The unique identifier of this effort
activity_id
long
The unique identifier of the activity related to this effort
elapsed_time
integer
The effort's elapsed time
start_date
DateTime
The time at which the effort was started.
start_date_local
DateTime
The time at which the effort was started in the local timezone.
distance
float
The effort's distance in meters
is_kom
boolean
Whether this effort is the current best on the leaderboard

TimedZoneDistribution

A collection of #/TimedZoneRange objects. Stores the exclusive ranges representing zones and the time spent in each.

UpdatableActivity

commute
boolean
Whether this activity is a commute
trainer
boolean
Whether this activity was recorded on a training machine
hide_from_home
boolean
Whether this activity is muted
description
string
The description of the activity
name
string
The name of the activity
type
ActivityType
Deprecated. Prefer to use sport_type. In a request where both type and sport_type are present, this field will be ignored
sport_type
SportType
An instance of SportType.
gear_id
string
Identifier for the gear associated with the activity. ‘none’ clears gear from activity

Upload

id
long
The unique identifier of the upload
id_str
string
The unique identifier of the upload in string format
external_id
string
The external identifier of the upload
error
string
The error associated with this upload
status
string
The status of this upload
activity_id
long
The identifier of the activity this upload resulted into

Waypoint

latlng
LatLng
The location along the route that the waypoint is closest to
target_latlng
LatLng
A location off of the route that the waypoint is (optional)
categories
string
Categories that the waypoint belongs to
title
string
A title for the waypoint
description
string
A description of the waypoint (optional)
distance_into_route
integer
The number meters along the route that the waypoint is located

ZoneRange

min
integer
The minimum value in the range.
max
integer
The maximum value in the range.

ZoneRanges

A collection of ZoneRange objects.

AltitudeStream

original_size
integer
The number of data points in this stream
resolution
string
The level of detail (sampling) in which this stream was returned May take one of the following values: low, medium, high
series_type
string
The base series used in the case the stream was downsampled May take one of the following values: distance, time
data
float
The sequence of altitude values for this stream, in meters

CadenceStream

original_size
integer
The number of data points in this stream
resolution
string
The level of detail (sampling) in which this stream was returned May take one of the following values: low, medium, high
series_type
string
The base series used in the case the stream was downsampled May take one of the following values: distance, time
data
integer
The sequence of cadence values for this stream, in rotations per minute

DetailedGear

id
string
The gear's unique identifier.
resource_state
integer
Resource state, indicates level of detail. Possible values: 2 -> "summary", 3 -> "detail"
primary
boolean
Whether this gear's is the owner's default one.
name
string
The gear's name.
distance
float
The distance logged with this gear.
brand_name
string
The gear's brand name.
model_name
string
The gear's model name.
frame_type
integer
The gear's frame type (bike only).
description
string
The gear's description.

DetailedSegment

id
long
The unique identifier of this segment
name
string
The name of this segment
activity_type
string
May take one of the following values: Ride, Run
distance
float
The segment's distance, in meters
average_grade
float
The segment's average grade, in percents
maximum_grade
float
The segments's maximum grade, in percents
elevation_high
float
The segments's highest elevation, in meters
elevation_low
float
The segments's lowest elevation, in meters
start_latlng
LatLng
An instance of LatLng.
end_latlng
LatLng
An instance of LatLng.
climb_category
integer
The category of the climb [0, 5]. Higher is harder ie. 5 is Hors catégorie, 0 is uncategorized in climb_category.
city
string
The segments's city.
state
string
The segments's state or geographical region.
country
string
The segment's country.
private
boolean
Whether this segment is private.
athlete_pr_effort
SummaryPRSegmentEffort
An instance of SummaryPRSegmentEffort.
athlete_segment_stats
SummarySegmentEffort
An instance of SummarySegmentEffort.
created_at
DateTime
The time at which the segment was created.
updated_at
DateTime
The time at which the segment was last updated.
total_elevation_gain
float
The segment's total elevation gain.
map
PolylineMap
An instance of PolylineMap.
effort_count
integer
The total number of efforts for this segment
athlete_count
integer
The number of unique athletes who have an effort for this segment
hazardous
boolean
Whether this segment is considered hazardous
star_count
integer
The number of stars for this segment

DetailedSegmentEffort

id
long
The unique identifier of this effort
activity_id
long
The unique identifier of the activity related to this effort
elapsed_time
integer
The effort's elapsed time
start_date
DateTime
The time at which the effort was started.
start_date_local
DateTime
The time at which the effort was started in the local timezone.
distance
float
The effort's distance in meters
is_kom
boolean
Whether this effort is the current best on the leaderboard
name
string
The name of the segment on which this effort was performed
activity
MetaActivity
An instance of MetaActivity.
athlete
MetaAthlete
An instance of MetaAthlete.
moving_time
integer
The effort's moving time
start_index
integer
The start index of this effort in its activity's stream
end_index
integer
The end index of this effort in its activity's stream
average_cadence
float
The effort's average cadence
average_watts
float
The average wattage of this effort
device_watts
boolean
For riding efforts, whether the wattage was reported by a dedicated recording device
average_heartrate
float
The heart heart rate of the athlete during this effort
max_heartrate
float
The maximum heart rate of the athlete during this effort
segment
SummarySegment
An instance of SummarySegment.
kom_rank
integer
The rank of the effort on the global leaderboard if it belongs in the top 10 at the time of upload
pr_rank
integer
The rank of the effort on the athlete's leaderboard if it belongs in the top 3 at the time of upload
hidden
boolean
Whether this effort should be hidden when viewed within an activity

DistanceStream

original_size
integer
The number of data points in this stream
resolution
string
The level of detail (sampling) in which this stream was returned May take one of the following values: low, medium, high
series_type
string
The base series used in the case the stream was downsampled May take one of the following values: distance, time
data
float
The sequence of distance values for this stream, in meters

HeartrateStream

original_size
integer
The number of data points in this stream
resolution
string
The level of detail (sampling) in which this stream was returned May take one of the following values: low, medium, high
series_type
string
The base series used in the case the stream was downsampled May take one of the following values: distance, time
data
integer
The sequence of heart rate values for this stream, in beats per minute

LatLngStream

original_size
integer
The number of data points in this stream
resolution
string
The level of detail (sampling) in which this stream was returned May take one of the following values: low, medium, high
series_type
string
The base series used in the case the stream was downsampled May take one of the following values: distance, time
data
LatLng
The sequence of lat/long values for this stream

MovingStream

original_size
integer
The number of data points in this stream
resolution
string
The level of detail (sampling) in which this stream was returned May take one of the following values: low, medium, high
series_type
string
The base series used in the case the stream was downsampled May take one of the following values: distance, time
data
boolean
The sequence of moving values for this stream, as boolean values

PowerStream

original_size
integer
The number of data points in this stream
resolution
string
The level of detail (sampling) in which this stream was returned May take one of the following values: low, medium, high
series_type
string
The base series used in the case the stream was downsampled May take one of the following values: distance, time
data
integer
The sequence of power values for this stream, in watts

SmoothGradeStream

original_size
integer
The number of data points in this stream
resolution
string
The level of detail (sampling) in which this stream was returned May take one of the following values: low, medium, high
series_type
string
The base series used in the case the stream was downsampled May take one of the following values: distance, time
data
float
The sequence of grade values for this stream, as percents of a grade

SmoothVelocityStream

original_size
integer
The number of data points in this stream
resolution
string
The level of detail (sampling) in which this stream was returned May take one of the following values: low, medium, high
series_type
string
The base series used in the case the stream was downsampled May take one of the following values: distance, time
data
float
The sequence of velocity values for this stream, in meters per second

SummaryActivity

id
long
The unique identifier of the activity
external_id
string
The identifier provided at upload time
upload_id
long
The identifier of the upload that resulted in this activity
athlete
MetaAthlete
An instance of MetaAthlete.
name
string
The name of the activity
distance
float
The activity's distance, in meters
moving_time
integer
The activity's moving time, in seconds
elapsed_time
integer
The activity's elapsed time, in seconds
total_elevation_gain
float
The activity's total elevation gain.
elev_high
float
The activity's highest elevation, in meters
elev_low
float
The activity's lowest elevation, in meters
type
ActivityType
Deprecated. Prefer to use sport_type
sport_type
SportType
An instance of SportType.
start_date
DateTime
The time at which the activity was started.
start_date_local
DateTime
The time at which the activity was started in the local timezone.
timezone
string
The timezone of the activity
start_latlng
LatLng
An instance of LatLng.
end_latlng
LatLng
An instance of LatLng.
achievement_count
integer
The number of achievements gained during this activity
kudos_count
integer
The number of kudos given for this activity
comment_count
integer
The number of comments for this activity
athlete_count
integer
The number of athletes for taking part in a group activity
photo_count
integer
The number of Instagram photos for this activity
total_photo_count
integer
The number of Instagram and Strava photos for this activity
map
PolylineMap
An instance of PolylineMap.
trainer
boolean
Whether this activity was recorded on a training machine
commute
boolean
Whether this activity is a commute
manual
boolean
Whether this activity was created manually
private
boolean
Whether this activity is private
flagged
boolean
Whether this activity is flagged
workout_type
integer
The activity's workout type
upload_id_str
string
The unique identifier of the upload in string format
average_speed
float
The activity's average speed, in meters per second
max_speed
float
The activity's max speed, in meters per second
has_kudoed
boolean
Whether the logged-in athlete has kudoed this activity
hide_from_home
boolean
Whether the activity is muted
gear_id
string
The id of the gear for the activity
kilojoules
float
The total work done in kilojoules during this activity. Rides only
average_watts
float
Average power output in watts during this activity. Rides only
device_watts
boolean
Whether the watts are from a power meter, false if estimated
max_watts
integer
Rides with power meter data only
weighted_average_watts
integer
Similar to Normalized Power. Rides with power meter data only

SummaryAthlete

id
long
The unique identifier of the athlete
resource_state
integer
Resource state, indicates level of detail. Possible values: 1 -> "meta", 2 -> "summary", 3 -> "detail"
firstname
string
The athlete's first name.
lastname
string
The athlete's last name.
profile_medium
string
URL to a 62x62 pixel profile picture.
profile
string
URL to a 124x124 pixel profile picture.
city
string
The athlete's city.
state
string
The athlete's state or geographical region.
country
string
The athlete's country.
sex
string
The athlete's sex. May take one of the following values: M, F
premium
boolean
Deprecated. Use summit field instead. Whether the athlete has any Summit subscription.
summit
boolean
Whether the athlete has any Summit subscription.
created_at
DateTime
The time at which the athlete was created.
updated_at
DateTime
The time at which the athlete was last updated.

SummaryClub

id
long
The club's unique identifier.
resource_state
integer
Resource state, indicates level of detail. Possible values: 1 -> "meta", 2 -> "summary", 3 -> "detail"
name
string
The club's name.
profile_medium
string
URL to a 60x60 pixel profile picture.
cover_photo
string
URL to a ~1185x580 pixel cover photo.
cover_photo_small
string
URL to a ~360x176 pixel cover photo.
sport_type
string
Deprecated. Prefer to use activity_types. May take one of the following values: cycling, running, triathlon, other
activity_types
ActivityType
The activity types that count for a club. This takes precedence over sport_type.
city
string
The club's city.
state
string
The club's state or geographical region.
country
string
The club's country.
private
boolean
Whether the club is private.
member_count
integer
The club's member count.
featured
boolean
Whether the club is featured or not.
verified
boolean
Whether the club is verified or not.
url
string
The club's vanity URL.

TemperatureStream

original_size
integer
The number of data points in this stream
resolution
string
The level of detail (sampling) in which this stream was returned May take one of the following values: low, medium, high
series_type
string
The base series used in the case the stream was downsampled May take one of the following values: distance, time
data
integer
The sequence of temperature values for this stream, in celsius degrees

TimeStream

original_size
integer
The number of data points in this stream
resolution
string
The level of detail (sampling) in which this stream was returned May take one of the following values: low, medium, high
series_type
string
The base series used in the case the stream was downsampled May take one of the following values: distance, time
data
integer
The sequence of time values for this stream, in seconds

TimedZoneRange

A union type representing the time spent in a given zone.

min
integer
The minimum value in the range.
max
integer
The maximum value in the range.
time
integer
The number of seconds spent in this zone

DetailedActivity

id
long
The unique identifier of the activity
external_id
string
The identifier provided at upload time
upload_id
long
The identifier of the upload that resulted in this activity
athlete
MetaAthlete
An instance of MetaAthlete.
name
string
The name of the activity
distance
float
The activity's distance, in meters
moving_time
integer
The activity's moving time, in seconds
elapsed_time
integer
The activity's elapsed time, in seconds
total_elevation_gain
float
The activity's total elevation gain.
elev_high
float
The activity's highest elevation, in meters
elev_low
float
The activity's lowest elevation, in meters
type
ActivityType
Deprecated. Prefer to use sport_type
sport_type
SportType
An instance of SportType.
start_date
DateTime
The time at which the activity was started.
start_date_local
DateTime
The time at which the activity was started in the local timezone.
timezone
string
The timezone of the activity
start_latlng
LatLng
An instance of LatLng.
end_latlng
LatLng
An instance of LatLng.
achievement_count
integer
The number of achievements gained during this activity
kudos_count
integer
The number of kudos given for this activity
comment_count
integer
The number of comments for this activity
athlete_count
integer
The number of athletes for taking part in a group activity
photo_count
integer
The number of Instagram photos for this activity
total_photo_count
integer
The number of Instagram and Strava photos for this activity
map
PolylineMap
An instance of PolylineMap.
trainer
boolean
Whether this activity was recorded on a training machine
commute
boolean
Whether this activity is a commute
manual
boolean
Whether this activity was created manually
private
boolean
Whether this activity is private
flagged
boolean
Whether this activity is flagged
workout_type
integer
The activity's workout type
upload_id_str
string
The unique identifier of the upload in string format
average_speed
float
The activity's average speed, in meters per second
max_speed
float
The activity's max speed, in meters per second
has_kudoed
boolean
Whether the logged-in athlete has kudoed this activity
hide_from_home
boolean
Whether the activity is muted
gear_id
string
The id of the gear for the activity
kilojoules
float
The total work done in kilojoules during this activity. Rides only
average_watts
float
Average power output in watts during this activity. Rides only
device_watts
boolean
Whether the watts are from a power meter, false if estimated
max_watts
integer
Rides with power meter data only
weighted_average_watts
integer
Similar to Normalized Power. Rides with power meter data only
description
string
The description of the activity
photos
PhotosSummary
An instance of PhotosSummary.
gear
SummaryGear
An instance of SummaryGear.
calories
float
The number of kilocalories consumed during this activity
segment_efforts
DetailedSegmentEffort
A collection of DetailedSegmentEffort objects.
device_name
string
The name of the device used to record the activity
embed_token
string
The token used to embed a Strava activity
splits_metric
Split
The splits of this activity in metric units (for runs)
splits_standard
Split
The splits of this activity in imperial units (for runs)
laps
Lap
A collection of Lap objects.
best_efforts
DetailedSegmentEffort
A collection of DetailedSegmentEffort objects.

DetailedAthlete

id
long
The unique identifier of the athlete
resource_state
integer
Resource state, indicates level of detail. Possible values: 1 -> "meta", 2 -> "summary", 3 -> "detail"
firstname
string
The athlete's first name.
lastname
string
The athlete's last name.
profile_medium
string
URL to a 62x62 pixel profile picture.
profile
string
URL to a 124x124 pixel profile picture.
city
string
The athlete's city.
state
string
The athlete's state or geographical region.
country
string
The athlete's country.
sex
string
The athlete's sex. May take one of the following values: M, F
premium
boolean
Deprecated. Use summit field instead. Whether the athlete has any Summit subscription.
summit
boolean
Whether the athlete has any Summit subscription.
created_at
DateTime
The time at which the athlete was created.
updated_at
DateTime
The time at which the athlete was last updated.
follower_count
integer
The athlete's follower count.
friend_count
integer
The athlete's friend count.
measurement_preference
string
The athlete's preferred unit system. May take one of the following values: feet, meters
ftp
integer
The athlete's FTP (Functional Threshold Power).
weight
float
The athlete's weight.
clubs
SummaryClub
The athlete's clubs.
bikes
SummaryGear
The athlete's bikes.
shoes
SummaryGear
The athlete's shoes.

DetailedClub

id
long
The club's unique identifier.
resource_state
integer
Resource state, indicates level of detail. Possible values: 1 -> "meta", 2 -> "summary", 3 -> "detail"
name
string
The club's name.
profile_medium
string
URL to a 60x60 pixel profile picture.
cover_photo
string
URL to a ~1185x580 pixel cover photo.
cover_photo_small
string
URL to a ~360x176 pixel cover photo.
sport_type
string
Deprecated. Prefer to use activity_types. May take one of the following values: cycling, running, triathlon, other
activity_types
ActivityType
The activity types that count for a club. This takes precedence over sport_type.
city
string
The club's city.
state
string
The club's state or geographical region.
country
string
The club's country.
private
boolean
Whether the club is private.
member_count
integer
The club's member count.
featured
boolean
Whether the club is featured or not.
verified
boolean
Whether the club is verified or not.
url
string
The club's vanity URL.
membership
string
The membership status of the logged-in athlete. May take one of the following values: member, pending
admin
boolean
Whether the currently logged-in athlete is an administrator of this club.
owner
boolean
Whether the currently logged-in athlete is the owner of this club.
following_count
integer
The number of athletes in the club that the logged-in athlete follows.
Generated 2024-04-02T21:52:43.329Z