-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yml
2229 lines (2229 loc) · 78.9 KB
/
swagger.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
swagger: '2.0'
info:
title: Strava API v3
description: >-
The [Swagger Playground](https://developers.strava.com/playground) is the
easiest way to familiarize yourself with the Strava API by submitting HTTP
requests and observing the responses before you write any client code. It
will show what a response will look like with different endpoints depending
on the authorization scope you receive from your athletes. To use the
Playground, go to https://www.strava.com/settings/api and change your
“Authorization Callback Domain” to developers.strava.com. Please note, we
only support Swagger 2.0. There is a known issue where you can only select
one scope at a time. For more information, please check the section “client
code” at https://developers.strava.com/docs.
version: 3.0.0
host: www.strava.com
schemes:
- https
basePath: /api/v3
produces:
- application/json
securityDefinitions:
strava_oauth:
type: oauth2
flow: accessCode
authorizationUrl: https://www.strava.com/api/v3/oauth/authorize
tokenUrl: https://www.strava.com/api/v3/oauth/token
scopes:
read: >-
Read public segments, public routes, public profile data, public posts,
public events, club feeds, and leaderboards
read_all: Read private routes, private segments, and private events for the user
profile:read_all: >-
Read all profile information even if the user has set their profile
visibility to Followers or Only You
profile:write: >-
Update the user's weight and Functional Threshold Power (FTP), and
access to star or unstar segments on their behalf
activity:read: >-
Read the user's activity data for activities that are visible to
Everyone and Followers, excluding privacy zone data
activity:read_all: >-
The same access as activity:read, plus privacy zone data and access to
read the user's activities with visibility set to Only You
activity:write: >-
Access to create manual activities and uploads, and access to edit any
activities that are visible to the app, based on activity read access
level
security:
- strava_oauth:
- public
parameters:
page:
name: page
in: query
description: Page number. Defaults to 1.
type: integer
perPage:
name: per_page
in: query
description: Number of items per page. Defaults to 30.
type: integer
default: 30
paths:
/athletes/{id}/stats:
get:
operationId: getStats
summary: Get Athlete Stats
description: >-
Returns the activity stats of an athlete. Only includes data from
activities set to Everyone visibilty.
parameters:
- name: id
in: path
description: The identifier of the athlete. Must match the authenticated athlete.
required: true
type: integer
format: int64
tags:
- Athletes
responses:
'200':
description: Activity stats of the athlete.
schema:
$ref: >-
https://developers.strava.com/swagger/activity_stats.json#/ActivityStats
default:
description: Unexpected error.
schema:
$ref: https://developers.strava.com/swagger/fault.json#/Fault
/athlete:
get:
operationId: getLoggedInAthlete
summary: Get Authenticated Athlete
description: >-
Returns the currently authenticated athlete. Tokens with
profile:read_all scope will receive a detailed athlete representation;
all others will receive a summary representation.
tags:
- Athletes
responses:
'200':
description: Profile information for the authenticated athlete.
schema:
$ref: >-
https://developers.strava.com/swagger/athlete.json#/DetailedAthlete
examples:
application/json:
id: 1234567890987654400
username: marianne_t
resource_state: 3
firstname: Marianne
lastname: Teutenberg
city: San Francisco
state: CA
country: US
sex: F
premium: true
created_at: '2017-11-14T02:30:05Z'
updated_at: '2018-02-06T19:32:20Z'
badge_type_id: 4
profile_medium: >-
https://xxxxxx.cloudfront.net/pictures/athletes/123456789/123456789/2/medium.jpg
profile: >-
https://xxxxx.cloudfront.net/pictures/athletes/123456789/123456789/2/large.jpg
friend: null
follower: null
follower_count: 5
friend_count: 5
mutual_friend_count: 0
athlete_type: 1
date_preference: '%m/%d/%Y'
measurement_preference: feet
clubs: []
ftp: null
weight: 0
bikes:
- id: b12345678987655
primary: true
name: EMC
resource_state: 2
distance: 0
shoes:
- id: g12345678987655
primary: true
name: adidas
resource_state: 2
distance: 4904
default:
description: Unexpected error.
schema:
$ref: https://developers.strava.com/swagger/fault.json#/Fault
put:
operationId: updateLoggedInAthlete
summary: Update Athlete
description: >-
Update the currently authenticated athlete. Requires profile:write
scope.
consumes:
- multipart/form-data
tags:
- Athletes
parameters:
- name: weight
in: path
description: The weight of the athlete in kilograms.
required: true
type: number
format: float
responses:
'200':
description: Profile information for the authenticated athlete.
schema:
$ref: >-
https://developers.strava.com/swagger/athlete.json#/DetailedAthlete
examples:
application/json:
id: 1.2345678987655098e+22
username: marianne_v
resource_state: 3
firstname: Marianne
lastname: V.
city: San Francisco
state: CA
country: US
sex: F
premium: true
created_at: '2017-11-14T02:30:05Z'
updated_at: '2018-02-06T19:32:20Z'
badge_type_id: 4
profile_medium: >-
https://xxxxxx.cloudfront.net/pictures/athletes/1234567898765509876/1234567898765509876/2/medium.jpg
profile: >-
https://xxxxx.cloudfront.net/pictures/athletes/1234567898765509876/1234567898765509876/2/large.jpg
friend: null
follower: null
follower_count: 5
friend_count: 5
mutual_friend_count: 0
athlete_type: 1
date_preference: '%m/%d/%Y'
measurement_preference: feet
clubs: []
ftp: null
weight: 0
bikes:
- id: b1234567898765509876
primary: true
name: EMC
resource_state: 2
distance: 0
shoes:
- id: g1234567898765509876
primary: true
name: adidas
resource_state: 2
distance: 4904
default:
description: Unexpected error.
schema:
$ref: https://developers.strava.com/swagger/fault.json#/Fault
/athlete/zones:
get:
operationId: getLoggedInAthleteZones
summary: Get Zones
description: >-
Returns the the authenticated athlete's heart rate and power zones.
Requires profile:read_all.
tags:
- Athletes
responses:
'200':
description: Heart rate and power zones.
schema:
$ref: https://developers.strava.com/swagger/zones.json#/Zones
examples:
application/json:
- distribution_buckets:
- max: 0
min: 0
time: 1498
- max: 50
min: 0
time: 62
- max: 100
min: 50
time: 169
- max: 150
min: 100
time: 536
- max: 200
min: 150
time: 672
- max: 250
min: 200
time: 821
- max: 300
min: 250
time: 529
- max: 350
min: 300
time: 251
- max: 400
min: 350
time: 80
- max: 450
min: 400
time: 81
- max: -1
min: 450
time: 343
type: power
resource_state: 3
sensor_based: true
default:
description: Unexpected error.
schema:
$ref: https://developers.strava.com/swagger/fault.json#/Fault
/segments/{id}:
get:
operationId: getSegmentById
summary: Get Segment
description: >-
Returns the specified segment. read_all scope required in order to
retrieve athlete-specific segment information, or to retrieve private
segments.
parameters:
- name: id
in: path
description: The identifier of the segment.
required: true
type: integer
format: int64
tags:
- Segments
responses:
'200':
description: Representation of a segment.
schema:
$ref: >-
https://developers.strava.com/swagger/segment.json#/DetailedSegment
examples:
application/json:
id: 229781
resource_state: 3
name: Hawk Hill
activity_type: Ride
distance: 2684.82
average_grade: 5.7
maximum_grade: 14.2
elevation_high: 245.3
elevation_low: 92.4
start_latlng:
- 37.8331119
- -122.4834356
end_latlng:
- 37.8280722
- -122.4981393
climb_category: 1
city: San Francisco
state: CA
country: United States
private: false
hazardous: false
starred: false
created_at: '2009-09-21T20:29:41Z'
updated_at: '2018-02-15T09:04:18Z'
total_elevation_gain: 155.733
map:
id: s229781
polyline: >-
}g|eFnpqjVl@En@Md@HbAd@d@^h@Xx@VbARjBDh@OPQf@w@d@k@XKXDFPH\EbGT`AV`@v@|@NTNb@?XOb@cAxAWLuE@eAFMBoAv@eBt@q@b@}@tAeAt@i@dAC`AFZj@dB?~@[h@MbAVn@b@b@\d@Eh@Qb@_@d@eB|@c@h@WfBK|AMpA?VF\\t@f@t@h@j@|@b@hCb@b@XTd@Bl@GtA?jAL`ALp@Tr@RXd@Rx@Pn@^Zh@Tx@Zf@`@FTCzDy@f@Yx@m@n@Op@VJr@
resource_state: 3
effort_count: 309974
athlete_count: 30623
star_count: 2428
athlete_segment_stats:
pr_elapsed_time: 553
pr_date: '1993-04-03'
effort_count: 2
default:
description: Unexpected error.
schema:
$ref: https://developers.strava.com/swagger/fault.json#/Fault
/segments/starred:
get:
operationId: getLoggedInAthleteStarredSegments
summary: List Starred Segments
description: >-
List of the authenticated athlete's starred segments. Private segments
are filtered out unless requested by a token with read_all scope.
parameters:
- $ref: '#/parameters/page'
- $ref: '#/parameters/perPage'
tags:
- Segments
responses:
'200':
description: List of the authenticated athlete's starred segments.
schema:
type: array
items:
$ref: >-
https://developers.strava.com/swagger/segment.json#/SummarySegment
examples:
application/json:
id: 229781
resource_state: 3
name: Hawk Hill
activity_type: Ride
distance: 2684.82
average_grade: 5.7
maximum_grade: 14.2
elevation_high: 245.3
elevation_low: 92.4
start_latlng:
- 37.8331119
- -122.4834356
end_latlng:
- 37.8280722
- -122.4981393
climb_category: 1
city: San Francisco
state: CA
country: United States
private: false
hazardous: false
starred: false
created_at: '2009-09-21T20:29:41Z'
updated_at: '2018-02-15T09:04:18Z'
total_elevation_gain: 155.733
map:
id: s229781
polyline: >-
}g|eFnpqjVl@En@Md@HbAd@d@^h@Xx@VbARjBDh@OPQf@w@d@k@XKXDFPH\EbGT`AV`@v@|@NTNb@?XOb@cAxAWLuE@eAFMBoAv@eBt@q@b@}@tAeAt@i@dAC`AFZj@dB?~@[h@MbAVn@b@b@\d@Eh@Qb@_@d@eB|@c@h@WfBK|AMpA?VF\\t@f@t@h@j@|@b@hCb@b@XTd@Bl@GtA?jAL`ALp@Tr@RXd@Rx@Pn@^Zh@Tx@Zf@`@FTCzDy@f@Yx@m@n@Op@VJr@
resource_state: 3
effort_count: 309974
athlete_count: 30623
star_count: 2428
athlete_segment_stats:
pr_elapsed_time: 553
pr_date: '1993-04-03'
effort_count: 2
default:
description: Unexpected error.
schema:
$ref: https://developers.strava.com/swagger/fault.json#/Fault
/segments/{id}/starred:
put:
operationId: starSegment
summary: Star Segment
description: >-
Stars/Unstars the given segment for the authenticated athlete. Requires
profile:write scope.
parameters:
- name: id
in: path
description: The identifier of the segment to star.
required: true
type: integer
format: int64
- name: starred
in: formData
description: If true, star the segment; if false, unstar the segment.
type: boolean
required: true
default: false
tags:
- Segments
responses:
'200':
description: Representation of a segment.
schema:
$ref: >-
https://developers.strava.com/swagger/segment.json#/DetailedSegment
examples:
application/json:
id: 229781
resource_state: 3
name: Hawk Hill
activity_type: Ride
distance: 2684.82
average_grade: 5.7
maximum_grade: 14.2
elevation_high: 245.3
elevation_low: 92.4
start_latlng:
- 37.8331119
- -122.4834356
end_latlng:
- 37.8280722
- -122.4981393
climb_category: 1
city: San Francisco
state: CA
country: United States
private: false
hazardous: false
starred: false
created_at: '2009-09-21T20:29:41Z'
updated_at: '2018-02-15T09:04:18Z'
total_elevation_gain: 155.733
map:
id: s229781
polyline: >-
}g|eFnpqjVl@En@Md@HbAd@d@^h@Xx@VbARjBDh@OPQf@w@d@k@XKXDFPH\EbGT`AV`@v@|@NTNb@?XOb@cAxAWLuE@eAFMBoAv@eBt@q@b@}@tAeAt@i@dAC`AFZj@dB?~@[h@MbAVn@b@b@\d@Eh@Qb@_@d@eB|@c@h@WfBK|AMpA?VF\\t@f@t@h@j@|@b@hCb@b@XTd@Bl@GtA?jAL`ALp@Tr@RXd@Rx@Pn@^Zh@Tx@Zf@`@FTCzDy@f@Yx@m@n@Op@VJr@
resource_state: 3
effort_count: 309974
athlete_count: 30623
star_count: 2428
athlete_segment_stats:
pr_elapsed_time: 553
pr_date: '1993-04-03'
effort_count: 2
default:
description: Unexpected error.
schema:
$ref: https://developers.strava.com/swagger/fault.json#/Fault
/segment_efforts:
get:
operationId: getEffortsBySegmentId
summary: List Segment Efforts
description: >-
Returns a set of the authenticated athlete's segment efforts for a given
segment. Requires subscription.
parameters:
- name: segment_id
in: query
description: The identifier of the segment.
required: true
type: integer
- name: start_date_local
in: query
description: ISO 8601 formatted date time.
type: string
format: date-time
- name: end_date_local
in: query
description: ISO 8601 formatted date time.
type: string
format: date-time
- $ref: '#/parameters/perPage'
in: query
tags:
- SegmentEfforts
responses:
'200':
description: List of segment efforts.
schema:
type: array
items:
$ref: >-
https://developers.strava.com/swagger/segment_effort.json#/DetailedSegmentEffort
examples:
application/json:
- id: 123456789
resource_state: 2
name: Alpe d'Huez
activity:
id: 1234567890
resource_state: 1
athlete:
id: 123445678689
resource_state: 1
elapsed_time: 1657
moving_time: 1642
start_date: '2007-09-15T08:15:29Z'
start_date_local: '2007-09-15T09:15:29Z'
distance: 6148.92
start_index: 1102
end_index: 1366
device_watts: false
average_watts: 220.2
segment:
id: 788127
resource_state: 2
name: Alpe d'Huez
activity_type: Ride
distance: 6297.46
average_grade: 4.8
maximum_grade: 16.3
elevation_high: 416
elevation_low: 104.6
start_latlng:
- 52.98501000581467
- -3.1869720001197366
end_latlng:
- 53.02204074375785
- -3.2039630001245736
climb_category: 2
city: Le Bourg D'Oisans
state: RA
country: France
private: false
hazardous: false
starred: false
kom_rank: null
pr_rank: null
achievements: []
default:
description: Unexpected error.
schema:
$ref: https://developers.strava.com/swagger/fault.json#/Fault
/segments/explore:
get:
operationId: exploreSegments
summary: Explore segments
description: Returns the top 10 segments matching a specified query.
parameters:
- name: bounds
in: query
description: >-
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]
required: true
type: array
items:
type: number
format: float
collectionFormat: csv
minItems: 4
maxItems: 4
- name: activity_type
in: query
description: Desired activity type.
type: string
enum:
- running
- riding
- name: min_cat
in: query
description: The minimum climbing category.
type: integer
minimum: 0
maximum: 5
- name: max_cat
in: query
description: The maximum climbing category.
type: integer
minimum: 0
maximum: 5
tags:
- Segments
responses:
'200':
description: List of matching segments.
schema:
$ref: >-
https://developers.strava.com/swagger/segment.json#/ExplorerResponse
examples:
application/json:
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
default:
description: Unexpected error.
schema:
$ref: https://developers.strava.com/swagger/fault.json#/Fault
/segment_efforts/{id}:
get:
operationId: getSegmentEffortById
summary: Get Segment Effort
description: >-
Returns a segment effort from an activity that is owned by the
authenticated athlete. Requires subscription.
parameters:
- name: id
in: path
description: The identifier of the segment effort.
required: true
type: integer
format: int64
tags:
- SegmentEfforts
responses:
'200':
description: Representation of a segment effort.
schema:
$ref: >-
https://developers.strava.com/swagger/segment_effort.json#/DetailedSegmentEffort
examples:
application/json:
id: 1234556789
resource_state: 3
name: Alpe d'Huez
activity:
id: 3454504
resource_state: 1
athlete:
id: 54321
resource_state: 1
elapsed_time: 381
moving_time: 340
start_date: '2018-02-12T16:12:41Z'
start_date_local: '2018-02-12T08:12:41Z'
distance: 83
start_index: 65
end_index: 83
segment:
id: 63450
resource_state: 2
name: Alpe d'Huez
activity_type: Run
distance: 780.35
average_grade: -0.5
maximum_grade: 0
elevation_high: 21
elevation_low: 17.2
start_latlng:
- 37.808407654682
- -122.426682919323
end_latlng:
- 37.808297909724
- -122.421324329674
climb_category: 0
city: San Francisco
state: CA
country: United States
private: false
hazardous: false
starred: false
kom_rank: null
pr_rank: null
achievements: []
athlete_segment_stats:
pr_elapsed_time: 212
pr_date: '2015-02-12'
effort_count: 149
default:
description: Unexpected error.
schema:
$ref: https://developers.strava.com/swagger/fault.json#/Fault
/activities:
post:
operationId: createActivity
summary: Create an Activity
description: Creates a manual activity for an athlete, requires activity:write scope.
parameters:
- name: name
in: formData
description: The name of the activity.
required: true
type: string
- name: type
in: formData
description: Type of activity. For example - Run, Ride etc.
type: string
required: true
- name: start_date_local
in: formData
description: ISO 8601 formatted date time.
type: string
format: date-time
required: true
- name: elapsed_time
in: formData
description: In seconds.
type: integer
required: true
- name: description
in: formData
description: Description of the activity.
type: string
required: false
- name: distance
in: formData
description: In meters.
type: number
format: float
required: false
- name: trainer
in: formData
description: Set to 1 to mark as a trainer activity.
type: integer
required: false
- name: commute
in: formData
description: Set to 1 to mark as commute.
type: integer
required: false
- name: hide_from_home
in: formData
description: Set to true to mute activity.
type: boolean
required: false
default: false
tags:
- Activities
responses:
'201':
description: The activity's detailed representation.
schema:
$ref: >-
https://developers.strava.com/swagger/activity.json#/DetailedActivity
examples:
application/json:
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
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: []
default:
description: Unexpected error.
schema:
$ref: https://developers.strava.com/swagger/fault.json#/Fault
/activities/{id}:
get:
operationId: getActivityById
summary: Get Activity
description: >-
Returns the given activity that is owned by the authenticated athlete.
Requires activity:read for Everyone and Followers activities. Requires
activity:read_all for Only Me activities.
parameters:
- name: id
in: path
description: The identifier of the activity.
required: true
type: integer
format: int64
- name: include_all_efforts
in: query
description: To include all segments efforts.
type: boolean
tags:
- Activities
responses:
'200':
description: The activity's detailed representation.
schema:
$ref: >-
https://developers.strava.com/swagger/activity.json#/DetailedActivity
examples:
application/json:
id: 12345678987654320
resource_state: 3
external_id: garmin_push_12345678987654321
upload_id: 98765432123456780
athlete:
id: 134815
resource_state: 1
name: Happy Friday
distance: 28099
moving_time: 4207
elapsed_time: 4410
total_elevation_gain: 516
type: Ride
start_date: '2018-02-16T14:52:54Z'
start_date_local: '2018-02-16T06:52:54Z'
timezone: (GMT-08:00) America/Los_Angeles
utc_offset: -28800
start_latlng:
- 37.83
- -122.26
end_latlng:
- 37.83
- -122.26
achievement_count: 0
kudos_count: 19
comment_count: 0
athlete_count: 1
photo_count: 0
map:
id: a1410355832
polyline: >-
ki{eFvqfiVqAWQIGEEKAYJgBVqDJ{BHa@jAkNJw@Pw@V{APs@^aABQAOEQGKoJ_FuJkFqAo@{A}@sH{DiAs@Q]?WVy@`@oBt@_CB]KYMMkB{AQEI@WT{BlE{@zAQPI@ICsCqA_BcAeCmAaFmCqIoEcLeG}KcG}A}@cDaBiDsByAkAuBqBi@y@_@o@o@kB}BgIoA_EUkAMcACa@BeBBq@LaAJe@b@uA`@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@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: 12345678987654320
resource_state: 2
name: Tunnel Rd.
activity:
id: 12345678987654320
resource_state: 1
athlete:
id: 134815
resource_state: 1
elapsed_time: 2038
moving_time: 2038
start_date: '2018-02-16T14:56:25Z'
start_date_local: '2018-02-16T06:56:25Z'
distance: 9434.8
start_index: 211
end_index: 2246
average_cadence: 78.6
device_watts: true
average_watts: 237.6
segment:
id: 673683
resource_state: 2
name: Tunnel Rd.
activity_type: Ride
distance: 9220.7
average_grade: 4.2
maximum_grade: 25.8
elevation_high: 426.5
elevation_low: 43.4
start_latlng:
- 37.8346153
- -122.2520872
end_latlng:
- 37.8476261
- -122.2008944
climb_category: 3
city: Oakland
state: CA
country: United States
private: false
hazardous: false
starred: false
kom_rank: null
pr_rank: null
achievements: []
hidden: false
splits_metric:
- distance: 1001.5
elapsed_time: 141
elevation_difference: 4.4
moving_time: 141
split: 1
average_speed: 7.1
pace_zone: 0
laps:
- id: 4479306946
resource_state: 2
name: Lap 1
activity:
id: 1410355832
resource_state: 1
athlete:
id: 134815
resource_state: 1
elapsed_time: 1573
moving_time: 1569
start_date: '2018-02-16T14:52:54Z'
start_date_local: '2018-02-16T06:52:54Z'
distance: 8046.72
start_index: 0
end_index: 1570
total_elevation_gain: 276
average_speed: 5.12
max_speed: 9.5
average_cadence: 78.6
device_watts: true
average_watts: 233.1
lap_index: 1
split: 1
gear:
id: b12345678987654321
primary: true
name: Tarmac
resource_state: 2
distance: 32547610
partner_brand_tag: null
photos:
primary: