-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yml
executable file
·3642 lines (3642 loc) · 120 KB
/
openapi.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
openapi: 3.0.1
info:
title: Strava API v3
description: Strava-API
version: 3.0.0
servers:
- url: https://www.strava.com/api/v3
security:
- strava_oauth:
- public
paths:
/oauth/token:
post:
requestBody:
content:
application/x-www-form-urlencoded:
schema:
required:
- client_id
- client_secret
- code
properties:
client_id:
type: string
description: Client ID,
client_secret:
type: string
description: Client secret
code:
type: string
description: OAuth code
responses:
200:
description: A successful auth response from Strava.
content:
application/json:
schema:
$ref: '#/components/schemas/AuthResponse'
example:
athlete:
id: 12343545645788
access_token: a12dfg42qw
refresh_token: ndks2smss
/athletes/{id}/stats:
get:
tags:
- Athletes
summary: Get Athlete Stats
description: Returns the activity stats of an athlete. Only includes data from
activities set to Everyone visibilty.
operationId: getStats
parameters:
- name: id
in: path
description: The identifier of the athlete. Must match the authenticated athlete.
required: true
schema:
type: integer
format: int64
responses:
200:
description: Activity stats of the athlete.
content:
application/json:
schema:
$ref: '#/components/schemas/ActivityStats'
default:
description: Unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
/athlete:
get:
tags:
- Athletes
summary: Get Authenticated Athlete
description: Returns the currently authenticated athlete. Tokens with profile:read_all
scope will receive a detailed athlete representation; all others will receive
a summary representation.
operationId: getLoggedInAthlete
responses:
200:
description: Profile information for the authenticated athlete.
content:
application/json:
schema:
$ref: '#/components/schemas/DetailedAthlete'
example:
id: 12343545645788
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
follower_count: 5
friend_count: 5
mutual_friend_count: 0
athlete_type: 1
date_preference: '%m/%d/%Y'
measurement_preference: feet
clubs: []
weight: 0
bikes:
- id: b12345678987655
primary: true
name: EMC
resource_state: 2
distance: 0
shoes:
- id: g12345678987655
primary: true
name: adidas
resource_state: 2
distance: 4904
default:
description: Unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
/athlete/zones:
get:
tags:
- Athletes
summary: Get Zones
description: Returns the the authenticated athlete's heart rate and power zones.
Requires profile:read_all.
operationId: getLoggedInAthleteZones
responses:
200:
description: Heart rate and power zones.
content:
application/json:
schema:
$ref: '#/components/schemas/Zones'
example:
- distribution_buckets:
- max: 0
min: 0
time: 1498
- max: 50
min: 0
time: 62
- max: 100
min: 50
time: 169
- max: 150
min: 100
time: 536
- max: 200
min: 150
time: 672
- max: 250
min: 200
time: 821
- max: 300
min: 250
time: 529
- max: 350
min: 300
time: 251
- max: 400
min: 350
time: 80
- max: 450
min: 400
time: 81
- max: -1
min: 450
time: 343
type: power
resource_state: 3
sensor_based: true
default:
description: Unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
/segments/{id}:
get:
tags:
- Segments
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.
operationId: getSegmentById
parameters:
- name: id
in: path
description: The identifier of the segment.
required: true
schema:
type: integer
format: int64
responses:
200:
description: Representation of a segment.
content:
application/json:
schema:
$ref: '#/components/schemas/DetailedSegment'
example:
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.
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
/segments/starred:
get:
tags:
- Segments
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.
operationId: getLoggedInAthleteStarredSegments
parameters:
- name: page
in: query
description: Page number. Defaults to 1.
schema:
type: integer
- name: per_page
in: query
description: Number of items per page. Defaults to 30.
schema:
type: integer
default: 30
responses:
200:
description: List of the authenticated athlete's starred segments.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SummarySegment'
example:
- 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.
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
/segments/{id}/starred:
put:
tags:
- Segments
summary: Star Segment
description: Stars/Unstars the given segment for the authenticated athlete.
Requires profile:write scope.
operationId: starSegment
parameters:
- name: id
in: path
description: The identifier of the segment to star.
required: true
schema:
type: integer
format: int64
requestBody:
content:
multipart/form-data:
schema:
required:
- starred
properties:
starred:
type: boolean
description: If true, star the segment; if false, unstar the segment.
default: false
required: true
responses:
200:
description: Representation of a segment.
content:
application/json:
schema:
$ref: '#/components/schemas/DetailedSegment'
example:
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.
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
/segment_efforts:
get:
tags:
- SegmentEfforts
summary: List Segment Efforts
description: Returns a set of the authenticated athlete's segment efforts for
a given segment. Requires subscription.
operationId: getEffortsBySegmentId
parameters:
- name: segment_id
in: query
description: The identifier of the segment.
required: true
schema:
type: integer
- name: start_date_local
in: query
description: ISO 8601 formatted date time.
schema:
type: string
format: date-time
- name: end_date_local
in: query
description: ISO 8601 formatted date time.
schema:
type: string
format: date-time
- name: per_page
in: query
description: Number of items per page. Defaults to 30.
schema:
type: integer
default: 30
responses:
200:
description: List of segment efforts.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DetailedSegmentEffort'
example:
- 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
achievements: []
default:
description: Unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
/segments/explore:
get:
tags:
- Segments
summary: Explore segments
description: Returns the top 10 segments matching a specified query.
operationId: exploreSegments
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
style: form
explode: false
schema:
maxItems: 4
minItems: 4
type: array
items:
type: number
format: float
- name: activity_type
in: query
description: Desired activity type.
schema:
type: string
enum:
- running
- riding
- name: min_cat
in: query
description: The minimum climbing category.
schema:
maximum: 5
minimum: 0
type: integer
- name: max_cat
in: query
description: The maximum climbing category.
schema:
maximum: 5
minimum: 0
type: integer
responses:
200:
description: List of matching segments.
content:
application/json:
schema:
$ref: '#/components/schemas/ExplorerResponse'
example:
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.
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
/segment_efforts/{id}:
get:
tags:
- SegmentEfforts
summary: Get Segment Effort
description: Returns a segment effort from an activity that is owned by the
authenticated athlete. Requires subscription.
operationId: getSegmentEffortById
parameters:
- name: id
in: path
description: The identifier of the segment effort.
required: true
schema:
type: integer
format: int64
responses:
200:
description: Representation of a segment effort.
content:
application/json:
schema:
$ref: '#/components/schemas/DetailedSegmentEffort'
example:
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
achievements: []
athlete_segment_stats:
pr_elapsed_time: 212
pr_date: 2015-02-12
effort_count: 149
default:
description: Unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
/activities:
post:
tags:
- Activities
summary: Create an Activity
description: Creates a manual activity for an athlete, requires activity:write
scope.
operationId: createActivity
requestBody:
content:
multipart/form-data:
schema:
required:
- elapsed_time
- name
- sport_type
- start_date_local
properties:
name:
type: string
description: The name of the activity.
type:
type: string
description: Type of activity. For example - Run, Ride etc.
sport_type:
type: string
description: Sport type of activity. For example - Run, MountainBikeRide,
Ride, etc.
start_date_local:
type: string
description: ISO 8601 formatted date time.
format: date-time
elapsed_time:
type: integer
description: In seconds.
format: int32
description:
type: string
description: Description of the activity.
distance:
type: number
description: In meters.
format: float
trainer:
type: integer
description: Set to 1 to mark as a trainer activity.
format: int32
commute:
type: integer
description: Set to 1 to mark as commute.
format: int32
required: true
responses:
201:
description: The activity's detailed representation.
content:
application/json:
schema:
$ref: '#/components/schemas/DetailedActivity'
example:
id: 123456778928065
resource_state: 3
athlete:
id: 12343545645788
resource_state: 1
name: Chill Day
distance: 0
moving_time: 18373
elapsed_time: 18373
total_elevation_gain: 0
type: Ride
sport_type: MountainBikeRide
start_date: 2018-02-20T18:02: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
resource_state: 3
trainer: false
commute: false
manual: true
private: false
flagged: false
gear_id: b453542543
average_speed: 0
max_speed: 0
device_watts: false
has_heartrate: false
pr_count: 0
total_photo_count: 0
has_kudoed: false
calories: 0
segment_efforts: []
default:
description: Unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
/activities/{id}:
get:
tags:
- Activities
summary: Get Activity
description: Returns the given activity that is owned by the authenticated athlete.
Requires activity:read for Everyone and Followers activities. Requires activity:read_all
for Only Me activities.
operationId: getActivityById
parameters:
- name: id
in: path
description: The identifier of the activity.
required: true
schema:
type: integer
format: int64
- name: include_all_efforts
in: query
description: To include all segments efforts.
schema:
type: boolean
responses:
200:
description: The activity's detailed representation.
content:
application/json:
schema:
$ref: '#/components/schemas/DetailedActivity'
example:
id: 12345678987654320
resource_state: 3
external_id: garmin_push_12345678987654321
upload_id: 98765432123456780
athlete:
id: 134815
resource_state: 1
name: Happy Friday
distance: 28099
moving_time: 4207
elapsed_time: 4410
total_elevation_gain: 516
type: Ride
sport_type: MountainBikeRide
start_date: 2018-02-16T14:52:54Z
start_date_local: 2018-02-16T06:52:54Z
timezone: (GMT-08:00) America/Los_Angeles
utc_offset: -28800
start_latlng:
- 37.83
- -122.26
end_latlng:
- 37.83
- -122.26
achievement_count: 0
kudos_count: 19
comment_count: 0
athlete_count: 1
photo_count: 0
map:
id: a1410355832
polyline: ki{eFvqfiVqAWQIGEEKAYJgBVqDJ{BHa@jAkNJw@Pw@V{APs@^aABQAOEQGKoJ_FuJkFqAo@{A}@sH{DiAs@Q]?WVy@`@oBt@_CB]KYMMkB{AQEI@WT{BlE{@zAQPI@ICsCqA_BcAeCmAaFmCqIoEcLeG}KcG}A}@cDaBiDsByAkAuBqBi@y@_@o@o@kB}BgIoA_EUkAMcACa@BeBBq@LaAJe@b@uA`@_AdBcD`@iAPq@RgALqAB{@EqAyAoOCy@AmCBmANqBLqAZkB\iCPiBJwCCsASiCq@iD]eA]y@[i@w@mAa@i@k@g@kAw@i@Ya@Q]EWFMLa@~BYpAFNpA`Aj@n@X`@V`AHh@JfB@xAMvAGZGHIDIAWOEQNcC@sACYK[MSOMe@QKKKYOs@UYQISCQ?Q@WNo@r@OHGAGCKOQ_BU}@MQGG]Io@@c@FYNg@d@s@d@ODQAMOMaASs@_@a@SESAQDqBn@a@RO?KK?UBU\kA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hNJJDPARGP_@t@Qh@]pAUtAoA`Ny@jJApBBNFLJFJBv@Hb@HBF?\
resource_state: 3
summary_polyline: ki{eFvqfiVsBmA`Feh@qg@iX`B}JeCcCqGjIq~@kf@cM{KeHeX`@_GdGkSeBiXtB}YuEkPwFyDeAzAe@pC~DfGc@bIOsGmCcEiD~@oBuEkFhBcBmDiEfAVuDiAuD}NnDaNiIlCyDD_CtJKv@wGhD]YyEzBo@g@uKxGmHpCGtEtI~AuLrHkAcAaIvEgH_EaDR_FpBuBg@sNxHqEtHgLoTpIiCzKNr[sB|Es\`JyObYeMbGsMnPsAfDxAnD}DBu@bCx@{BbEEyAoD`AmChNoQzMoGhOwX|[yIzBeFKg[zAkIdU_LiHxK}HzEh@vM_BtBg@xGzDbCcF~GhArHaIfByAhLsDiJuC?_HbHd@nL_Cz@ZnEkDDy@hHwJLiCbIrNrIvN_EfAjDWlEnEiAfBxDlFkBfBtEfDaAzBvDKdFx@|@XgJmDsHhAgD`GfElEzOwBnYdBxXgGlSc@bGdHpW|HdJztBnhAgFxc@HnCvBdA
trainer: false
commute: false
manual: false
private: false
flagged: false
gear_id: b12345678987654321
from_accepted_tag: false
average_speed: 6.679
max_speed: 18.5
average_cadence: 78.5
average_temp: 4
average_watts: 185.5
weighted_average_watts: 230
kilojoules: 780.5
device_watts: true
has_heartrate: false
max_watts: 743
elev_high: 446.6
elev_low: 17.2
pr_count: 0
total_photo_count: 2
has_kudoed: false
workout_type: 10
description: ""
calories: 870.2
segment_efforts:
- id: 12345678987654320
resource_state: 2
name: Tunnel Rd.
activity:
id: 12345678987654320
resource_state: 1
athlete:
id: 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
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
photos:
primary:
unique_id: 3FDGKL3-204E-4867-9E8D-89FC79EAAE17
urls:
100: https://dgtzuqphqg23d.cloudfront.net/Bv93zv5t_mr57v0wXFbY_JyvtucgmU5Ym6N9z_bKeUI-128x96.jpg
600: https://dgtzuqphqg23d.cloudfront.net/Bv93zv5t_mr57v0wXFbY_JyvtucgmU5Ym6N9z_bKeUI-768x576.jpg
source: 1
use_primary_photo: true
count: 2
highlighted_kudosers:
- destination_url: strava://athletes/12345678987654321
display_name: Marianne V.
avatar_url: https://dgalywyr863hv.cloudfront.net/pictures/athletes/12345678987654321/12345678987654321/3/medium.jpg
show_name: true
hide_from_home: false
device_name: Garmin Edge 1030
embed_token: 18e4615989b47dd4ff3dc711b0aa4502e4b311a9
segment_leaderboard_opt_out: false
leaderboard_opt_out: false
default:
description: Unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
put:
tags:
- Activities
summary: Update Activity
description: Updates the given activity that is owned by the authenticated athlete.
Requires activity:write. Also requires activity:read_all in order to update
Only Me activities
operationId: updateActivityById
parameters:
- name: id
in: path
description: The identifier of the activity.
required: true
schema:
type: integer
format: int64
requestBody:
content:
'*/*':
schema:
$ref: '#/components/schemas/UpdatableActivity'
required: false
responses:
200:
description: The activity's detailed representation.
content:
application/json:
schema:
$ref: '#/components/schemas/DetailedActivity'
example:
id: 12345678987654320
resource_state: 3
external_id: garmin_push_12345678987654321
upload_id: 98765432123456780
athlete:
id: 134815
resource_state: 1
name: Happy Friday
distance: 28099
moving_time: 4207
elapsed_time: 4410
total_elevation_gain: 516
type: Ride
sport_type: MountainBikeRide
start_date: 2018-02-16T14:52: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