Strava API v3

Activities

Create an Activity (createActivity)

Creates a manual activity for an athlete. Requires write permissions, as requested during the authorization process.

post
/activities

Parameters

name
required String, in form
The name of the activity.
type
required String, in form
Type of activity. For example - Run, Ride etc.
start_date_local
required String, in form
ISO 8601 formatted date time.
elapsed_time
required Integer, in form
In seconds.
description
String, in form
Description of the activity.
distance
String, in form
In meters.
private
Integer, in form
set to 1 to mark the resulting activity as private, ‘view_private’ permissions will be necessary to view the activity. If not specified, set according to the athlete’s privacy setting (recommended).
trainer
Integer, in form
Set to 1 to mark as a trainer activity.
photo_ids
String, in form
List of native photo ids to attach to the 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' start_date_local='value' elapsed_time='value' description='value' distance='value' private='value' trainer='value' photo_ids='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 type = type_example; // String | Type of activity. For example - Run, Ride etc.
    String startDateLocal = startDateLocal_example; // String | ISO 8601 formatted date time.
    Integer elapsedTime = 56; // Integer | In seconds.
    String description = description_example; // String | Description of the activity.
    String distance = distance_example; // String | In meters.
    Integer private = 56; // Integer | set to 1 to mark the resulting activity as private, ‘view_private’ permissions will be necessary to view the activity. If not specified, set according to the athlete’s privacy setting (recommended).
    Integer trainer = 56; // Integer | Set to 1 to mark as a trainer activity.
    String photoIds = photoIds_example; // String | List of native photo ids to attach to the activity.
    Integer commute = 56; // Integer | Set to 1 to mark as commute.

    Observable<DetailedActivity> result = apiInstance.createActivity(name, type, startDateLocal, elapsedTime, description, distance, private, trainer, photoIds, 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 *type = type_example; // Type of activity. For example - Run, Ride etc.
String *startDateLocal = startDateLocal_example; // ISO 8601 formatted date time.
Integer *elapsedTime = 56; // In seconds.
String *description = description_example; // Description of the activity. (optional)
String *distance = distance_example; // In meters. (optional)
Integer *private = 56; // set to 1 to mark the resulting activity as private, ‘view_private’ permissions will be necessary to view the activity. If not specified, set according to the athlete’s privacy setting (recommended). (optional)
Integer *trainer = 56; // Set to 1 to mark as a trainer activity. (optional)
String *photoIds = photoIds_example; // List of native photo ids to attach to the activity. (optional)
Integer *commute = 56; // Set to 1 to mark as commute. (optional)

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

// Create an Activity
[apiInstance createActivityWith:name
    type:type
    startDateLocal:startDateLocal
    elapsedTime:elapsedTime
    description:description
    distance:distance
    private:private
    trainer:trainer
    photoIds:photoIds
    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 type = type_example; // {String} Type of activity. For example - Run, Ride etc.

var startDateLocal = startDateLocal_example; // {String} ISO 8601 formatted date time.

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

var opts = { 
  'description': description_example, // {String} Description of the activity.
  'distance': distance_example, // {String} In meters.
  'private': 56, // {Integer} set to 1 to mark the resulting activity as private, ‘view_private’ permissions will be necessary to view the activity. If not specified, set according to the athlete’s privacy setting (recommended).
  'trainer': 56, // {Integer} Set to 1 to mark as a trainer activity.
  'photoIds': photoIds_example, // {String} List of native photo ids to attach to the 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, type, 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 type = type_example;  // String | Type of activity. For example - Run, Ride etc.
            var startDateLocal = startDateLocal_example;  // String | ISO 8601 formatted date time.
            var elapsedTime = 56;  // Integer | In seconds.
            var description = description_example;  // String | Description of the activity. (optional) 
            var distance = distance_example;  // String | In meters. (optional) 
            var private = 56;  // Integer | set to 1 to mark the resulting activity as private, ‘view_private’ permissions will be necessary to view the activity. If not specified, set according to the athlete’s privacy setting (recommended). (optional) 
            var trainer = 56;  // Integer | Set to 1 to mark as a trainer activity. (optional) 
            var photoIds = photoIds_example;  // String | List of native photo ids to attach to the activity. (optional) 
            var commute = 56;  // Integer | Set to 1 to mark as commute. (optional) 

            try
            {
                // Create an Activity
                DetailedActivity result = apiInstance.createActivity(name, type, startDateLocal, elapsedTime, description, distance, private, trainer, photoIds, 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.
type = type_example # String | Type of activity. For example - Run, Ride etc.
startDateLocal = startDateLocal_example # String | ISO 8601 formatted date time.
elapsedTime = 56 # Integer | In seconds.
description = description_example # String | Description of the activity. (optional)
distance = distance_example # String | In meters. (optional)
private = 56 # Integer | set to 1 to mark the resulting activity as private, ‘view_private’ permissions will be necessary to view the activity. If not specified, set according to the athlete’s privacy setting (recommended). (optional)
trainer = 56 # Integer | Set to 1 to mark as a trainer activity. (optional)
photoIds = photoIds_example # String | List of native photo ids to attach to the activity. (optional)
commute = 56 # Integer | Set to 1 to mark as commute. (optional)

try: 
    # Create an Activity
    api_response = api_instance.createActivity(name, type, startDateLocal, elapsedTime, description=description, distance=distance, private=private, trainer=trainer, photoIds=photoIds, 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",
  "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,
  "start_latlng" : null,
  "end_latlng" : null,
  "location_city" : null,
  "location_state" : null,
  "location_country" : "",
  "start_latitude" : null,
  "start_longitude" : null,
  "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" : [ ],
  "partner_brand_tag" : null,
  "highlighted_kudosers" : [ ],
  "embed_token" : "e65c2a814xxxxxxxxxxxxxxxxx68",
  "segment_leaderboard_opt_out" : false,
  "leaderboard_opt_out" : false
}

Get Activity (getActivityById)

Returns the given activity that is owned by the authenticated athlete.

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",
  "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",
  "start_latitude" : 37.83,
  "start_longitude" : -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 ],
      "start_latitude" : 37.8346153,
      "start_longitude" : -122.2520872,
      "end_latitude" : 37.8476261,
      "end_longitude" : -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
  } ],
  "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.

get
/activities/{id}/comments

Parameters

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

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=" "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.
    Integer perPage = 56; // Integer | Number of items per page. Defaults to 30.

    Observable<List<Comment>> result = apiInstance.getCommentsByActivityId(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. (optional)
Integer *perPage = 56; // Number of items per page. Defaults to 30. (optional) (default to 30)

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

// List Activity Comments
[apiInstance getCommentsByActivityIdWith:id
    page:page
    perPage:perPage
              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} Page number.
  '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.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 | Page number. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Activity Comments
                array[Comment] result = apiInstance.getCommentsByActivityId(id, page, perPage);
                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 | Page number. (optional)
perPage = 56 # Integer | Number of items per page. Defaults to 30. (optional) (default to 30)

try: 
    # List Activity Comments
    api_response = api_instance.getCommentsByActivityId(id, page=page, perPage=perPage)
    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" : {
    "id" : 12345678987654321,
    "username" : "psagan",
    "resource_state" : 2,
    "firstname" : "Peter",
    "lastname" : "Sagan",
    "city" : "South Orange",
    "state" : "New Jersey",
    "country" : "United States",
    "sex" : "F",
    "premium" : true,
    "created_at" : "2011-12-20T14:21:57Z",
    "updated_at" : "2018-02-12T20:18:25Z",
    "badge_type_id" : 4,
    "profile_medium" : "https://dgalywyr863hv.cloudfront.net/pictures/athletes/123456789/123456789/2/medium.jpg",
    "profile" : "https://dgalywyr863hv.cloudfront.net/pictures/athletes/123456789/123456789/2/large.jpg",
    "friend" : "accepted",
    "follower" : "accepted"
  }
} ]

List Activity Kudoers (getKudoersByActivityId)

Returns the athletes who kudoed an activity identified by an identifier.

get
/activities/{id}/kudos

Parameters

id
required Integer, in path
The identifier of the activity.
page
Integer, in query
Page number.
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);

    Integer id = 56; // Integer | The identifier of the activity.
    Integer page = 56; // Integer | Page number.
    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"];

Integer *id = 56; // The identifier of the activity.
Integer *page = 56; // Page number. (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 = 56; // {Integer} The identifier of the activity.

var opts = { 
  'page': 56, // {Integer} Page number.
  '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 = 56;  // Integer | The identifier of the activity.
            var page = 56;  // Integer | Page number. (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 = 56 # Integer | The identifier of the activity.
page = 56 # Integer | Page number. (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

[ {
  "id" : 1234556678987654321,
  "username" : "psagan",
  "resource_state" : 2,
  "firstname" : "Peter",
  "lastname" : "Sagan",
  "city" : "Norwich",
  "state" : "Vermont",
  "country" : "United States",
  "sex" : "M",
  "premium" : true,
  "created_at" : "2008-01-01T17:44:00Z",
  "updated_at" : "2018-01-30T07:00:32Z",
  "badge_type_id" : 4,
  "profile_medium" : "https://dgalywyr863hv.cloudfront.net/pictures/athletes/123456789/123456789/1/medium.jpg",
  "profile" : "https://dgalywyr863hv.cloudfront.net/pictures/athletes/123456789/123456789/1/large.jpg",
  "friend" : "accepted",
  "follower" : "accepted"
} ]

List Activity Laps (getLapsByActivityId)

Returns the laps of an activity identified by an identifier.

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.

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.
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.
    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. (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.
  '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. (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. (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",
  "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",
  "start_latitude" : null,
  "start_longitude" : null,
  "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",
  "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",
  "start_latitude" : null,
  "start_longitude" : null,
  "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)

Premium Feature. Returns the zones of a given activity.

get
/activities/{id}/zones

Parameters

id
required Integer, 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);

    Integer id = 56; // Integer | 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"];

Integer *id = 56; // 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 = 56; // {Integer} 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 = 56;  // Integer | 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 = 56 # Integer | 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.

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",
  "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",
  "start_latitude" : 37.83,
  "start_longitude" : -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" : 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 ],
      "start_latitude" : 37.8346153,
      "start_longitude" : -122.2520872,
      "end_latitude" : 37.8476261,
      "end_longitude" : -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
  } ],
  "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.

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_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/123456789/123456789/2/medium.jpg",
  "profile" : "https://xxxxx.cloudfront.net/pictures/athletes/123456789/123456789/2/large.jpg",
  "friend" : null,
  "follower" : null,
  "email" : "mv@abc.com",
  "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.

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.

get
/athletes/{id}/stats

Parameters

id
required Integer, in path
The identifier of the athlete. Must match the authenticated athlete.
page
Integer, in query
Page number.
per_page
Integer, in query
Number of items per page. Defaults to 30.

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?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.AthletesApi;

import rx.Observable;

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

    Integer id = 56; // Integer | The identifier of the athlete. Must match the authenticated athlete.
    Integer page = 56; // Integer | Page number.
    Integer perPage = 56; // Integer | Number of items per page. Defaults to 30.

    Observable<ActivityStats> result = apiInstance.getStats(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"];

Integer *id = 56; // The identifier of the athlete. Must match the authenticated athlete.
Integer *page = 56; // Page number. (optional)
Integer *perPage = 56; // Number of items per page. Defaults to 30. (optional) (default to 30)

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

// Get Athlete Stats
[apiInstance getStatsWith:id
    page:page
    perPage:perPage
              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 = 56; // {Integer} The identifier of the athlete. Must match the authenticated athlete.

var opts = { 
  'page': 56, // {Integer} Page number.
  '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.getStats(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 getStatsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AthletesApi();
            var id = 56;  // Integer | The identifier of the athlete. Must match the authenticated athlete.
            var page = 56;  // Integer | Page number. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // Get Athlete Stats
                ActivityStats result = apiInstance.getStats(id, page, perPage);
                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 = 56 # Integer | The identifier of the athlete. Must match the authenticated athlete.
page = 56 # Integer | Page number. (optional)
perPage = 56 # Integer | Number of items per page. Defaults to 30. (optional) (default to 30)

try: 
    # Get Athlete Stats
    api_response = api_instance.getStats(id, page=page, perPage=perPage)
    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.

put
/athlete

Parameters

<Parameter Name>
required DetailedAthlete, in body
An instance of DetailedAthlete.

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);

    DetailedAthlete body = ; // DetailedAthlete | The athlete entity to update.

    Observable<DetailedAthlete> result = apiInstance.updateLoggedInAthlete(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"];

DetailedAthlete *body = ; // The athlete entity to update.

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

// Update Athlete
[apiInstance updateLoggedInAthleteWith:body
              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 body = ; // {DetailedAthlete} The athlete entity to update.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLoggedInAthlete(body, 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 body = new DetailedAthlete(); // DetailedAthlete | The athlete entity to update.

            try
            {
                // Update Athlete
                DetailedAthlete result = apiInstance.updateLoggedInAthlete(body);
                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()
body =  # DetailedAthlete | The athlete entity to update.

try: 
    # Update Athlete
    api_response = api_instance.updateLoggedInAthlete(body)
    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,
  "email" : "mv@abc.com",
  "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. Enhanced Privacy Mode is respected for all activities.

get
/clubs/{id}/activities

Parameters

id
required Integer, in path
The identifier of the club.
page
Integer, in query
Page number.
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/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);

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

    Observable<List<SummaryActivity>> 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"];

Integer *id = 56; // The identifier of the club.
Integer *page = 56; // Page number. (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<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.ClubsApi()

var id = 56; // {Integer} The identifier of the club.

var opts = { 
  'page': 56, // {Integer} Page number.
  '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 = 56;  // Integer | The identifier of the club.
            var page = 56;  // Integer | Page number. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Club Activities
                array[SummaryActivity] 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 = 56 # Integer | The identifier of the club.
page = 56 # Integer | Page number. (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",
  "workout_type" : null
} ]

List Club Administrators. (getClubAdminsById)

Returns a list of the administrators of a given club.

get
/clubs/{id}/admins

Parameters

id
required Integer, in path
The identifier of the club.
page
Integer, in query
Page number.
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);

    Integer id = 56; // Integer | The identifier of the club.
    Integer page = 56; // Integer | Page number.
    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"];

Integer *id = 56; // The identifier of the club.
Integer *page = 56; // Page number. (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 = 56; // {Integer} The identifier of the club.

var opts = { 
  'page': 56, // {Integer} Page number.
  '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 = 56;  // Integer | The identifier of the club.
            var page = 56;  // Integer | Page number. (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 = 56 # Integer | The identifier of the club.
page = 56 # Integer | Page number. (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 Integer, 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);

    Integer id = 56; // Integer | 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"];

Integer *id = 56; // 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 = 56; // {Integer} 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 = 56;  // Integer | 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 = 56 # Integer | 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",
  "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 Integer, in path
The identifier of the club.
page
Integer, in query
Page number.
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}/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);

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

    Observable<List<SummaryAthlete>> 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"];

Integer *id = 56; // The identifier of the club.
Integer *page = 56; // Page number. (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<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 = 56; // {Integer} The identifier of the club.

var opts = { 
  'page': 56, // {Integer} Page number.
  '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 = 56;  // Integer | The identifier of the club.
            var page = 56;  // Integer | Page number. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Club Members
                array[SummaryAthlete] 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 = 56 # Integer | The identifier of the club.
page = 56 # Integer | Page number. (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.
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.
    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. (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.
  '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. (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. (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 Integer, 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);

    Integer id = 56; // Integer | 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"];

Integer *id = 56; // 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 = 56; // {Integer} 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 = 56;  // Integer | 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 = 56 # Integer | 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

Get Route (getRouteById)

Returns a route using its identifier.

get
/routes/{id}

Parameters

id
required Integer, 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);

    Integer id = 56; // Integer | 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"];

Integer *id = 56; // 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 = 56; // {Integer} 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 = 56;  // Integer | 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 = 56 # Integer | 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",
  "elevation_gain" : 6.0274563,
  "type" : 5,
  "segments" : [ {
    "country" : "aeiou",
    "private" : true,
    "distance" : 9.301444,
    "average_grade" : 3.6160767,
    "maximum_grade" : 2.027123,
    "climb_category" : 0,
    "city" : "aeiou",
    "elevation_high" : 4.145608,
    "athlete_pr_effort" : {
      "distance" : 6.846853,
      "start_date_local" : "2000-01-23T04:56:07.000+00:00",
      "elapsed_time" : 1,
      "is_kom" : true,
      "id" : 1,
      "start_date" : "2000-01-23T04:56:07.000+00:00"
    },
    "start_latlng" : "",
    "elevation_low" : 7.386282,
    "end_latlng" : "",
    "activity_type" : "Ride",
    "name" : "aeiou",
    "id" : 7,
    "state" : "aeiou"
  } ],
  "starred" : true,
  "directions" : [ {
    "distance" : 7.4577446,
    "name" : "aeiou",
    "action" : 1
  } ],
  "sub_type" : 2,
  "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 using their athlete ID.

get
/athletes/{id}/routes

Parameters

id
required Integer, in path
The identifier of the athlete.
page
Integer, in query
Page number.
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 id = 56; // Integer | The identifier of the athlete.
    Integer page = 56; // Integer | Page number.
    Integer perPage = 56; // Integer | Number of items per page. Defaults to 30.

    Observable<List<Route>> result = apiInstance.getRoutesByAthleteId(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"];

Integer *id = 56; // The identifier of the athlete.
Integer *page = 56; // Page number. (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:id
    page: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 id = 56; // {Integer} The identifier of the athlete.

var opts = { 
  'page': 56, // {Integer} Page number.
  '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(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 getRoutesByAthleteIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new RoutesApi();
            var id = 56;  // Integer | The identifier of the athlete.
            var page = 56;  // Integer | Page number. (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(id, 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()
id = 56 # Integer | The identifier of the athlete.
page = 56 # Integer | Page number. (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(id, 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",
  "elevation_gain" : 6.0274563,
  "type" : 5,
  "segments" : [ {
    "country" : "aeiou",
    "private" : true,
    "distance" : 9.301444,
    "average_grade" : 3.6160767,
    "maximum_grade" : 2.027123,
    "climb_category" : 0,
    "city" : "aeiou",
    "elevation_high" : 4.145608,
    "athlete_pr_effort" : {
      "distance" : 6.846853,
      "start_date_local" : "2000-01-23T04:56:07.000+00:00",
      "elapsed_time" : 1,
      "is_kom" : true,
      "id" : 1,
      "start_date" : "2000-01-23T04:56:07.000+00:00"
    },
    "start_latlng" : "",
    "elevation_low" : 7.386282,
    "end_latlng" : "",
    "activity_type" : "Ride",
    "name" : "aeiou",
    "id" : 7,
    "state" : "aeiou"
  } ],
  "starred" : true,
  "directions" : [ {
    "distance" : 7.4577446,
    "name" : "aeiou",
    "action" : 1
  } ],
  "sub_type" : 2,
  "name" : "aeiou",
  "id" : 1,
  "map" : {
    "summary_polyline" : "aeiou",
    "id" : "aeiou",
    "polyline" : "aeiou"
  },
  "timestamp" : 5
} ]

RunningRaces

Get Running Race (getRunningRaceById)

Returns a running race for a given identifier.

get
/running_races/{id}

Parameters

id
required Integer, in path
The identifier of the running race.

Responses

HTTP code 200 Representation of a running race. An instance of RunningRace.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/running_races/{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.RunningRacesApi;

import rx.Observable;

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

    Integer id = 56; // Integer | The identifier of the running race.

    Observable<RunningRace> result = apiInstance.getRunningRaceById(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"];

Integer *id = 56; // The identifier of the running race.

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

// Get Running Race
[apiInstance getRunningRaceByIdWith:id
              completionHandler: ^(STRVRunningRace 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.RunningRacesApi()

var id = 56; // {Integer} The identifier of the running race.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRunningRaceById(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 getRunningRaceByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new RunningRacesApi();
            var id = 56;  // Integer | The identifier of the running race.

            try
            {
                // Get Running Race
                RunningRace result = apiInstance.getRunningRaceById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RunningRacesApi.getRunningRaceById: " + 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.RunningRacesApi()
id = 56 # Integer | The identifier of the running race.

try: 
    # Get Running Race
    api_response = api_instance.getRunningRaceById(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RunningRacesApi->getRunningRaceById: %s\n" % e)

Sample Response

{
  "country" : "aeiou",
  "route_ids" : [ 5 ],
  "running_race_type" : 6,
  "distance" : 1.4658129,
  "website_url" : "aeiou",
  "city" : "aeiou",
  "start_date_local" : "2000-01-23T04:56:07.000+00:00",
  "name" : "aeiou",
  "measurement_preference" : "feet",
  "id" : 0,
  "state" : "aeiou",
  "url" : "aeiou"
}

List Running Races (getRunningRaces)

Returns a list running races based on a set of search criteria.

get
/running_races

Parameters

year
Integer, in query
Filters the list by a given year.

Responses

HTTP code 200 An array of RunningRace objects.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/running_races?year=" "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.RunningRacesApi;

import rx.Observable;

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

    Integer year = 56; // Integer | Filters the list by a given year.

    Observable<List<RunningRace>> result = apiInstance.getRunningRaces(year);
    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 *year = 56; // Filters the list by a given year. (optional)

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

// List Running Races
[apiInstance getRunningRacesWith:year
              completionHandler: ^(NSArray<STRVRunningRace>* 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.RunningRacesApi()

var opts = { 
  'year': 56 // {Integer} Filters the list by a given year.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRunningRaces(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 getRunningRacesExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new RunningRacesApi();
            var year = 56;  // Integer | Filters the list by a given year. (optional) 

            try
            {
                // List Running Races
                array[RunningRace] result = apiInstance.getRunningRaces(year);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RunningRacesApi.getRunningRaces: " + 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.RunningRacesApi()
year = 56 # Integer | Filters the list by a given year. (optional)

try: 
    # List Running Races
    api_response = api_instance.getRunningRaces(year=year)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RunningRacesApi->getRunningRaces: %s\n" % e)

Sample Response

[ {
  "country" : "aeiou",
  "route_ids" : [ 5 ],
  "running_race_type" : 6,
  "distance" : 1.4658129,
  "website_url" : "aeiou",
  "city" : "aeiou",
  "start_date_local" : "2000-01-23T04:56:07.000+00:00",
  "name" : "aeiou",
  "measurement_preference" : "feet",
  "id" : 0,
  "state" : "aeiou",
  "url" : "aeiou"
} ]

SegmentEfforts

List Segment Efforts (getEffortsBySegmentId)

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

get
/segments/{id}/all_efforts

Parameters

id
required Integer, in path
The identifier of the segment.
page
Integer, in query
Page number.
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/segments/{id}/all_efforts?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.SegmentEffortsApi;

import rx.Observable;

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

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

    Observable<List<DetailedSegmentEffort>> result = apiInstance.getEffortsBySegmentId(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"];

Integer *id = 56; // The identifier of the segment.
Integer *page = 56; // Page number. (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:id
    page:page
    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 id = 56; // {Integer} The identifier of the segment.

var opts = { 
  'page': 56, // {Integer} Page number.
  '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(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 getEffortsBySegmentIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new SegmentEffortsApi();
            var id = 56;  // Integer | The identifier of the segment.
            var page = 56;  // Integer | Page number. (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(id, page, 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()
id = 56 # Integer | The identifier of the segment.
page = 56 # Integer | Page number. (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(id, page=page, 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 ],
    "start_latitude" : 82.9858888581467,
    "start_longitude" : -3.1869788881197367,
    "end_latitude" : 43.02204034338079,
    "end_longitude" : -13.203963999124573,
    "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.

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 ],
    "start_latitude" : 37.80840654682,
    "start_longitude" : -122.45682919323,
    "end_latitude" : 37.80829000979624,
    "end_longitude" : -122.42000324329673,
    "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
  } ]
}

Get Segment Leaderboard (getLeaderboardBySegmentId)

Returns the specified segment leaderboard.

get
/segments/{id}/leaderboard

Parameters

id
required Long, in path
The identifier of the segment leaderboard.
gender
String, in query
Filter by gender. May take one of the following values: M, F
age_group
String, in query
Premium Feature. Filter by age group. May take one of the following values: 0_19, 20_24, 25_34, 35_44, 45_54, 55_64, 65_69, 70_74, 75_plus
weight_class
String, in query
Premium Feature. Filter by weight class. May take one of the following values: 0_124, 125_149, 150_164, 165_179, 180_199, 200_224, 225_249, 250_plus, 0_54, 55_64, 65_74, 75_84, 85_94, 95_104, 105_114, 115_plus
following
Boolean, in query
Filter by friends of the authenticated athlete.
club_id
Long, in query
Filter by club.
date_range
String, in query
Filter by date range. May take one of the following values: this_year, this_month, this_week, today
context_entries
Integer, in query
page
Integer, in query
Page number.
per_page
Integer, in query
Number of items per page. Defaults to 30.

Responses

HTTP code 200 Representation of a segment leaderboard. An instance of SegmentLeaderboard.
HTTP code 4xx, 5xx A Fault describing the reason for the error.
$ http get "https://www.strava.com/api/v3/segments/{id}/leaderboard?gender=&age_group=&weight_class=&following=&club_id=&date_range=&context_entries=&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);

    Long id = 789; // Long | The identifier of the segment leaderboard.
    String gender = gender_example; // String | Filter by gender.
    String ageGroup = ageGroup_example; // String | Premium Feature. Filter by age group.
    String weightClass = weightClass_example; // String | Premium Feature. Filter by weight class.
    Boolean following = true; // Boolean | Filter by friends of the authenticated athlete.
    Long clubId = 789; // Long | Filter by club.
    String dateRange = dateRange_example; // String | Filter by date range.
    Integer contextEntries = 56; // Integer | 
    Integer page = 56; // Integer | Page number.
    Integer perPage = 56; // Integer | Number of items per page. Defaults to 30.

    Observable<SegmentLeaderboard> result = apiInstance.getLeaderboardBySegmentId(id, gender, ageGroup, weightClass, following, clubId, dateRange, contextEntries, 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 segment leaderboard.
String *gender = gender_example; // Filter by gender. (optional)
String *ageGroup = ageGroup_example; // Premium Feature. Filter by age group. (optional)
String *weightClass = weightClass_example; // Premium Feature. Filter by weight class. (optional)
Boolean *following = true; // Filter by friends of the authenticated athlete. (optional)
Long *clubId = 789; // Filter by club. (optional)
String *dateRange = dateRange_example; // Filter by date range. (optional)
Integer *contextEntries = 56; //  (optional)
Integer *page = 56; // Page number. (optional)
Integer *perPage = 56; // Number of items per page. Defaults to 30. (optional) (default to 30)

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

// Get Segment Leaderboard
[apiInstance getLeaderboardBySegmentIdWith:id
    gender:gender
    ageGroup:ageGroup
    weightClass:weightClass
    following:following
    clubId:clubId
    dateRange:dateRange
    contextEntries:contextEntries
    page:page
    perPage:perPage
              completionHandler: ^(STRVSegmentLeaderboard 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 leaderboard.

var opts = { 
  'gender': gender_example, // {String} Filter by gender.
  'ageGroup': ageGroup_example, // {String} Premium Feature. Filter by age group.
  'weightClass': weightClass_example, // {String} Premium Feature. Filter by weight class.
  'following': true, // {Boolean} Filter by friends of the authenticated athlete.
  'clubId': 789, // {Long} Filter by club.
  'dateRange': dateRange_example, // {String} Filter by date range.
  'contextEntries': 56, // {Integer} 
  'page': 56, // {Integer} Page number.
  '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.getLeaderboardBySegmentId(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 getLeaderboardBySegmentIdExample
    {
        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 leaderboard.
            var gender = gender_example;  // String | Filter by gender. (optional) 
            var ageGroup = ageGroup_example;  // String | Premium Feature. Filter by age group. (optional) 
            var weightClass = weightClass_example;  // String | Premium Feature. Filter by weight class. (optional) 
            var following = true;  // Boolean | Filter by friends of the authenticated athlete. (optional) 
            var clubId = 789;  // Long | Filter by club. (optional) 
            var dateRange = dateRange_example;  // String | Filter by date range. (optional) 
            var contextEntries = 56;  // Integer |  (optional) 
            var page = 56;  // Integer | Page number. (optional) 
            var perPage = 56;  // Integer | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // Get Segment Leaderboard
                SegmentLeaderboard result = apiInstance.getLeaderboardBySegmentId(id, gender, ageGroup, weightClass, following, clubId, dateRange, contextEntries, page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SegmentsApi.getLeaderboardBySegmentId: " + 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 leaderboard.
gender = gender_example # String | Filter by gender. (optional)
ageGroup = ageGroup_example # String | Premium Feature. Filter by age group. (optional)
weightClass = weightClass_example # String | Premium Feature. Filter by weight class. (optional)
following = true # Boolean | Filter by friends of the authenticated athlete. (optional)
clubId = 789 # Long | Filter by club. (optional)
dateRange = dateRange_example # String | Filter by date range. (optional)
contextEntries = 56 # Integer |  (optional)
page = 56 # Integer | Page number. (optional)
perPage = 56 # Integer | Number of items per page. Defaults to 30. (optional) (default to 30)

try: 
    # Get Segment Leaderboard
    api_response = api_instance.getLeaderboardBySegmentId(id, gender=gender, ageGroup=ageGroup, weightClass=weightClass, following=following, clubId=clubId, dateRange=dateRange, contextEntries=contextEntries, page=page, perPage=perPage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SegmentsApi->getLeaderboardBySegmentId: %s\n" % e)

Sample Response

{
  "effort_count" : 30756,
  "entry_count" : 30756,
  "kom_type" : "kom",
  "entries" : [ {
    "athlete_name" : "Peter S.",
    "elapsed_time" : 346,
    "moving_time" : 346,
    "start_date" : "1993-04-03T15:37:43Z",
    "start_date_local" : "1993-04-03T07:37:43Z",
    "rank" : 1
  } ]
}

List Starred Segments (getLoggedInAthleteStarredSegments)

List of the authenticated athlete's starred segments.

get
/segments/starred

Parameters

page
Integer, in query
Page number.
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.
    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. (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.
  '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. (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. (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 ],
  "start_latitude" : 37.8331119,
  "start_longitude" : -122.4834356,
  "end_latitude" : 37.8280722,
  "end_longitude" : -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.

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 ],
  "start_latitude" : 37.8331119,
  "start_longitude" : -122.4834356,
  "end_latitude" : 37.8280722,
  "end_longitude" : -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.

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 ],
  "start_latitude" : 37.8331119,
  "start_longitude" : -122.4834356,
  "end_latitude" : 37.8280722,
  "end_longitude" : -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.

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 segment effort streams (getSegmentEffortStreams)

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

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.

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.

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.
private
Integer, in form
Whether the resulting activity should be private.
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' private='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.
    Integer private = 56; // Integer | Whether the resulting activity should be private.
    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, private, 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)
Integer *private = 56; // Whether the resulting activity should be private. (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
    private:private
    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.
  'private': 56, // {Integer} Whether the resulting activity should be private.
  '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 private = 56;  // Integer | Whether the resulting activity should be private. (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, private, 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)
private = 56 # Integer | Whether the resulting activity should be private. (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, private=private, 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

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

Get Upload (getUploadById)

Returns an upload for a given identifier.

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

{
  "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.

>May take one of the following values: AlpineSki, BackcountrySki, Canoeing, Crossfit, EBikeRide, Elliptical, Hike, IceSkate, InlineSkate, Kayaking, Kitesurf, NordicSki, Ride, RockClimbing, RollerSki, Rowing, Run, Snowboard, Snowshoe, StairStepper, StandUpPaddling, Surfing, Swim, VirtualRide, VirtualRun, Walk, WeightTraining, 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

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
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
integer
The unique identifier of the athlete

MetaClub

id
integer
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
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
integer
The unique identifier of this route
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 instance of integer.
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)
segments
SummarySegment
The segments traversed by this route
directions
#/RouteDirection
The directions of this route

RouteDirection

distance
float
The distance in the route at which the action applies
action
integer
The action of this direction
name
string
An instance of string.

RunningRace

id
integer
The unique identifier of this race.
name
string
The name of this race.
running_race_type
integer
The type of this race.
distance
float
The race's distance, in meters.
start_date_local
DateTime
The time at which the race begins started in the local timezone.
city
string
The name of the city in which the race is taking place.
state
string
The name of the state or geographical region in which the race is taking place.
country
string
The name of the country in which the race is taking place.
route_ids
integer
The set of routes that cover this race's course.
measurement_preference
string
The unit system in which the race should be displayed. May take one of the following values: feet, meters
url
string
The vanity URL of this race on Strava.
website_url
string
The URL of this race's website.

SegmentLeaderboard

A

entry_count
integer
The total number of entries for this leaderboard
effort_count
integer
Deprecated, use entry_count
kom_type
string
May take one of the following values: kom, cr
entries
SegmentLeaderboardEntry
A collection of SegmentLeaderboardEntry objects.

SegmentLeaderboardEntry

A row in a segment leaderboard

athlete_name
string
The public name of the athlete
elapsed_time
integer
The elapsed of the segment effort associated with this entry
moving_time
integer
The moving of the segment effort associated with this entry
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.
rank
integer
The rank of this entry in the leaderboard

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

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.

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
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
SummarySegmentEffort
An instance of SummarySegmentEffort.

SummarySegmentEffort

id
long
The unique identifier of 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
description
string
The description of the activity
name
string
The name of the activity
type
ActivityType
An instance of ActivityType.
private
boolean
Whether this activity is private
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
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

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
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
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
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
An instance of ActivityType.
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
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
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
integer
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
friend
string
Whether the currently logged-in athlete follows this athlete. May take one of the following values: pending, accepted, blocked
follower
string
Whether this athlete follows the currently logged-in athlete. May take one of the following values: pending, accepted, blocked
premium
boolean
The athlete's premium status.
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
integer
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
May take one of the following values: cycling, running, triathlon, other
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
An instance of ActivityType.
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
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
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
integer
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
friend
string
Whether the currently logged-in athlete follows this athlete. May take one of the following values: pending, accepted, blocked
follower
string
Whether this athlete follows the currently logged-in athlete. May take one of the following values: pending, accepted, blocked
premium
boolean
The athlete's premium status.
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.
mutual_friend_count
integer
The number or athletes mutually followed by this athlete and the currently logged-in athlete.
measurement_preference
string
The athlete's preferred unit system. May take one of the following values: feet, meters
email
string
The athlete's email address.
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
integer
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
May take one of the following values: cycling, running, triathlon, other
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 2018-07-17T15:47:17.783Z