-
Notifications
You must be signed in to change notification settings - Fork 20
/
openapi.yaml
2404 lines (2396 loc) · 71.7 KB
/
openapi.yaml
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.1.0
info:
title: comma API
version: 3.1.0
termsOfService: https://comma.ai/terms
license:
name: MIT
url: https://opensource.org/licenses/MIT
x-logo:
url: https://api.comma.ai/images/logo-806c3186.png
altText: comma logo
servers:
- url: 'https://api.comma.ai'
description: Production server
tags:
- name: definitions
description: |
### Dongle ID
A dongle ID is a 16-character alphanumeric identifier. Each comma device has a unique dongle ID. Authenticated
users also have a dongle ID associated with their profile. For example, `1a2b3c4d5e6f7a8b`.
### Segment
A segment is one minute of driving. openpilot rotates log and camera files at this interval. Segments are
numbered in a 0-indexed fashion.
Segment names are of the form `dongle_id|YYYY-MM-DD--HH-MM-SS--N`, where `N` is the segment number. For example,
`1a2b3c4d5e6f7a8b|2019-01-01--00-00-00--0`.
### Route
A route is a sequence of segments recorded while the device is "onroad" (between car ignition and off). Route
names are of the form `dongle_id|YYYY-MM-DD--HH-MM-SS`. For example, `1a2b3c4d5e6f7a8b|2019-01-01--00-00-00`.
- name: authentication
description: |
### Public access
Some endpoints do not require authentication, or provide access to resources which may be marked as public. These
are listed with the `AuthPublic` security scheme.
### User auth
Authenticated resources require a header comprised of a JWT and are listed with the `AuthUser` security scheme. A
token can be generated at https://jwt.comma.ai. Include a header formatted like the following in your requests:
```
curl -H 'Authorization: JWT {{token}}' https://api.comma.ai/v1/me
```
### Device auth
Some resources are only accessible to openpilot devices. These endpoints are listed with the `AuthDevice` security
scheme. A device running openpilot may authenticate using the `/v2/pilotauth` endpoint.
- name: account
description: Get information about your account, including the devices you have access to.
- name: devices
description: Manage your devices.
- name: user management
description: Grant and revoke permissions for other users to access your devices.
- name: routes
description: List drives uploaded from your coma device.
- name: logs
description: |
Retrieve files uploaded from your devices.
### Log types
For each segment of an openpilot drive, the following files are created:
| Type | Description |
| ---- | ----------- |
| `qcamera.ts` | Compressed road camera |
| `fcamera.hevc` | Road camera uncompressed |
| `dcamera.hevc` | Driver camera uncompressed |
| `ecamera.hevc` | Wide road camera uncompressed |
| `rlog.bz2` | Full openpilot logs - all messages published by every service |
| `qlog.bz2` | Decimated openpilot logs |
`dcamera.hevc` is not logged unless the "Record and upload driver camera" toggle is enabled. `qcamera.ts` and
`qlog.bz2` files are uploaded automatically when the device is connected to the internet. Other files must be
manually requested from the device - this is managed by the athena service.
- name: athena
description: Communicate with your device in real time.
- name: navigation
description: Send navigation routes to your device. Requires [comma prime](https://comma.ai/prime).
- name: clips
description: Create shareable video clips from your uploaded log files. Requires [comma prime](https://comma.ai/prime).
- name: openpilot auth
description: Endpoints used to pair or authenticate a device running openpilot.
- name: superuser
description: These endpoints are only accessible to [superusers](https://comma.ai/jobs).
paths:
/v1/me:
get:
operationId: getProfile
summary: User profile
description: Returns information about the authenticated user
tags:
- account
security:
- AuthUser: []
responses:
'200':
description: JSON object containing the user's profile information
content:
application/json:
schema:
$ref: '#/components/schemas/Profile'
/v1/me/devices:
get:
operationId: getDevices
summary: Device list
description: List devices owned or readable by authenticated user
tags:
- account
security:
- AuthUser: []
responses:
'200':
description: JSON array of device objects
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Device'
/v1/{dongleId}/devices:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getUserDevices
summary: List devices (superuser)
description: List devices owned or readable by specified user
tags:
- superuser
security:
- AuthUser: []
responses:
'200':
description: JSON array of device objects
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Device'
/v1.1/devices/{dongleId}:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getDevice
summary: Device details
description: Returns information about the specified device
tags:
- devices
security:
- AuthUser: []
responses:
'200':
description: JSON object containing the device's information
content:
application/json:
schema:
$ref: '#/components/schemas/Device'
/v1/devices/{dongleId}:
parameters:
- $ref: '#/components/parameters/dongleId'
patch:
operationId: updateDevice
summary: Update device alias
tags:
- devices
security:
- AuthUser: []
requestBody:
content:
application/json:
schema:
type: object
properties:
alias:
type: string
required:
- alias
responses:
'200':
description: JSON object containing the updated device's information
content:
application/json:
schema:
$ref: '#/components/schemas/Device'
/v1/devices/{dongleId}/location:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getDeviceLocation
summary: Device location
tags:
- devices
security:
- AuthUser: []
responses:
'200':
description: JSON object containing device location, or an error message if the location is not known.
content:
application/json:
schema:
oneOf:
- allOf:
- $ref: '#/components/schemas/DeviceLocation'
- type: object
properties:
dongle_id:
$ref: '#/components/schemas/DongleID'
required:
- dongle_id
- type: object
properties:
error:
type: string
enum:
- "Location unavailable"
required:
- error
/v1/devices/{dongleId}/pair:
parameters:
- $ref: '#/components/parameters/dongleId'
post:
operationId: pairDeviceToUser
summary: Pair device
description: Pair a device to a user's account.
tags:
- devices
security:
- AuthUser: []
requestBody:
content:
application/json:
schema:
type: object
properties:
user_id:
$ref: '#/components/schemas/DongleID'
required:
- user_id
responses:
'200':
$ref: '#/components/responses/SuccessInteger'
/v1/devices/{dongleId}/unpair:
parameters:
- $ref: '#/components/parameters/dongleId'
post:
operationId: unpairDevice
summary: Unpair device
description: Unpair device from authenticated user's account. Any comma prime subscription linked to the device will be cancelled.
tags:
- devices
security:
- AuthUser: []
responses:
'200':
$ref: '#/components/responses/SuccessInteger'
/v1/devices/{dongleId}/owner:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getDeviceOwner
summary: Device owner
description: Returns the owner of a device.
tags:
- devices
security:
- AuthUser: []
responses:
'200':
description: JSON object containing information about the device owner
content:
application/json:
schema:
type: object
properties:
user_id:
type: string
description: OAuth2 user ID
points:
type: integer
description: comma points
username:
type: string
deprecated: true
nullable: true
email:
type: string
/v1/devices/{dongleId}/users:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getDeviceUsers
summary: Device users
description: List users with access to a device
tags:
- user management
security:
- AuthUser: []
responses:
'200':
description: JSON array of device user objects
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DeviceUser'
/v1/devices/{dongleId}/add_user:
parameters:
- $ref: '#/components/parameters/dongleId'
post:
operationId: addDeviceUser
summary: Grant device access
description: Grant read permissions to a user by email. Authed user must be device owner to perform. If multiple users are attached to an email address, device access is granted to all users.
tags:
- user management
security:
- AuthUser: []
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: Email of user to add
email_userid:
type: string
description: OAuth2 user ID of user to add
responses:
'200':
$ref: '#/components/responses/SuccessInteger'
/v1/devices/{dongleId}/del_user:
parameters:
- $ref: '#/components/parameters/dongleId'
post:
operationId: revokeDeviceUser
summary: Revoke device access
description: Revoke read permissions from a user by email. Authed user must be device owner to perform. If multiple users are attached to an email address, device access is removed from all users.
tags:
- user management
security:
- AuthUser: []
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
type: string
required:
- email
responses:
'200':
$ref: '#/components/responses/SuccessInteger'
/v1.1/devices/{dongleId}/stats:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getDeviceStatistics
summary: Device driving statistics
description: Returns aggregate driving statistics for a device over the past 7 days and all time.
tags:
- devices
security:
- AuthUser: []
- AuthDevice: []
responses:
'200':
description: JSON object containing driving statistics
content:
application/json:
schema:
type: object
properties:
all:
$ref: '#/components/schemas/DrivingStatistics'
week:
$ref: '#/components/schemas/DrivingStatistics'
required:
- all
- week
/v1/devices/{dongleId}/bootlogs:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getDeviceBootLogs
summary: Device boot logs
description: Retrieve boot logs uploaded from a device.
tags:
- logs
security:
- AuthUser: []
responses:
'200':
description: JSON array of URLs to boot log files. Files are available at each URL for one hour from the time of the request.
content:
application/json:
schema:
type: array
items:
type: string
/v1/devices/{dongleId}/crashlogs:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getDeviceCrashLogs
summary: Device crash logs
description: Retrieve crash logs uploaded from a device.
tags:
- logs
security:
- AuthUser: []
responses:
'200':
description: JSON array of URLs to crash log files. Files are available at each URL for one hour from the time of the request.
content:
application/json:
schema:
type: array
items:
type: string
/v1/devices/{dongleId}/routes:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getDeviceRoutes
summary: Device routes
description: Returns a list of routes uploaded from a device.
tags:
- routes
security:
- AuthUser: []
parameters:
- name: limit
in: query
description: Maximum number of routes to return
schema:
type: integer
default: 20
- name: created_after
in: query
description: Return routes created after this timestamp
schema:
type: integer
responses:
'200':
description: JSON array of route objects
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Route'
/v1/devices/{dongleId}/routes/preserved:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getDevicePreservedRoutes
summary: Device preserved routes
description: Returns a list of preserved routes uploaded from a device.
tags:
- routes
security:
- AuthUser: []
responses:
'200':
description: JSON array of route objects
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Route'
/v1/devices/{dongleId}/routes_segments:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getDeviceRoutesSegments
summary: Device routes segments
description: Returns a list of route segments uploaded from a device between a start and end timestamp.
tags:
- routes
security:
- AuthUser: []
- AuthPublic: []
parameters:
- name: start
in: query
description: Start timestamp in milliseconds
required: true
schema:
type: integer
- name: end
in: query
description: End timestamp in milliseconds
required: true
schema:
type: integer
responses:
'200':
description: JSON array of route segment objects
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/RouteSegment'
/v1/devices/{dongleId}/segments:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getDeviceSegments
summary: Device segments
description: Returns time-sorted list of segments, each of which includes basic metadata derived from openpilot logs.
tags:
- routes
security:
- AuthUser: []
- AuthPublic: []
parameters:
- name: from
description: Start timestamp in milliseconds
in: query
required: true
schema:
type: number
- name: to
description: End timestamp in milliseconds. If omitted, the current time is used.
in: query
schema:
type: number
responses:
'200':
description: JSON array of segments
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Segment'
/{dongleId}:
servers:
- url: https://athena.comma.ai
parameters:
- $ref: '#/components/parameters/dongleId'
post:
operationId: submitAthenaPayload
summary: Submit Athena payload
description: |
Send JSON-RPC requests to the active websocket connection for a given device, identified by its dongle ID.
Some method types support offline queueing of messages until the device comes online (see `expiry`). The
response will indicate whether the message was queued or not.
tags:
- athena
security:
- AuthUser: []
requestBody:
description: JSON-RPC payload containing athena method name and parameters
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AthenaPayload'
responses:
'200':
description: JSON-RPC response containing the result of the method call
content:
application/json:
schema:
$ref: '#/components/schemas/AthenaResponse'
/v1/devices/{dongleId}/athena_offline_queue:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getDeviceAthenaOfflineQueue
summary: Athena offline queue
description: Return a list of queued payloads for delivery to device when it is online.
tags:
- athena
security:
- AuthUser: []
responses:
'200':
description: JSON array of queued payloads
content:
application/json:
schema:
type: array
items:
oneOf:
- $ref: '#/components/schemas/UploadFilesToUrlsMethod'
/v1.4/{dongleId}/upload_url:
parameters:
- $ref: '#/components/parameters/dongleId'
get:
operationId: getUploadUrl
summary: Log file upload
description: Request a URL to which an openpilot file an be uploaded via HTTP PUT. This endpoint only accepts tokens signed with a device private key.
tags:
- logs
security:
- AuthUser: []
- AuthDevice: []
parameters:
- name: path
in: query
description: File to upload from openpilot data directory.
required: true
schema:
type: string
example: "2019-06-06--11-30-31--9/fcamera.hevc"
- name: expiry_days
in: query
description: Number of days the url should be valid.
schema:
type: integer
minimum: 1
maximum: 30
default: 1
example: 1
responses:
'200':
description: JSON object containing upload URL
content:
application/json:
schema:
type: object
properties:
url:
type: string
description: URL to which a PUT request can be sent with file contents
required:
- url
example:
url: "https://commaincoming.blob.core.windows.net/commaincoming/239e82a1d3c855f2/2019-06-06--11-30-31/9/fcamera.hevc?sr=b&sp=c&sig=cMCrZt5fje7SDXlKcOIjHgA0wEVAol71FL6ac08Q2Iw%3D&sv=2018-03-28&se=2019-06-13T18%3A43%3A01Z"
/v1/{dongleId}/upload_urls:
parameters:
- $ref: '#/components/parameters/dongleId'
post:
operationId: getUploadUrls
summary: Batch log file upload
description: Request URLs to which openpilot files can be uploaded via HTTP PUT. This endpoint only accepts tokens signed with a device private key.
tags:
- logs
security:
- AuthUser: []
- AuthDevice: []
requestBody:
content:
application/json:
schema:
type: object
properties:
paths:
type: array
items:
type: string
description: Files to upload from openpilot data directory.
expiry_days:
type: integer
minimum: 1
maximum: 30
default: 1
description: number of days the url should be valid
required:
- paths
example:
paths:
- "2019-06-06--11-30-31--9/fcamera.hevc"
- "2019-06-06--11-30-31--9/ecamera.hevc"
expiry_days: 1
responses:
'200':
description: JSON array containing upload URLs
content:
application/json:
schema:
type: array
items:
type: object
properties:
url:
type: string
description: URL to which a PUT request can be sent with file contents
required:
- url
example:
- url: "https://commaincoming.blob.core.windows.net/commaincoming/239e82a1d3c855f2/2019-06-06--11-30-31/9/fcamera.hevc?sr=b&sp=c&sig=cMCrZt5fje7SDXlKcOIjHgA0wEVAol71FL6ac08Q2Iw%3D&sv=2018-03-28&se=2019-06-13T18%3A43%3A01Z"
- url: "https://commaincoming.blob.core.windows.net/commaincoming/239e82a1d3c855f2/2019-06-06--11-30-31/9/ecamera.hevc?sr=b&sp=c&sig=cMCrZt5fje7SDXlKcOIjHgA0wEVAol71FL6ac08Q2Iw%3D&sv=2018-03-28&se=2019-06-13T18%3A43%3A01Z"
/v2/pilotpair:
post:
operationId: pilotPair
summary: Pair device
description: Pair a device to the authenticated user's account.
tags:
- openpilot auth
security:
- AuthUser: []
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
pair_token:
type: string
description: "JWT signed by your device private key. Payload contains `{\"identity\": <dongle-id>, \"pair\": true}`"
required:
- pair_token
responses:
'200':
description: JSON object containing pairing result
content:
application/json:
schema:
type: object
properties:
first_pair:
type: boolean
description: True if the device was unpaired prior to this call. False if the device was previously paired by an authenticated user.
required:
- first_pair
/v2/pilotauth:
post:
operationId: pilotAuth
summary: Authenticate device (openpilot)
tags:
- openpilot auth
security:
- AuthPublic: []
requestBody:
content:
application/json:
schema:
type: object
properties:
imei:
type: string
description: Device IMEI
imei2:
type: string
description: Device IMEI, second slot
serial:
type: string
description: Device serial number
public_key:
type: string
description: 2048-bit RSA public key
register_token:
type: string
description: "JWT signed by private key. Payload must contain `{\"register\": true}`."
required:
- imei
- serial
- public_key
- register_token
responses:
'200':
description: JSON object containing authenticated dongle ID and token
content:
application/json:
schema:
type: object
properties:
dongle_id:
$ref: '#/components/schemas/DongleID'
access_token:
type: string
description: JWT
required:
- dongle_id
- access_token
/v1/route/{routeName}:
parameters:
- $ref: '#/components/parameters/routeName'
get:
operationId: getRoute
summary: Route details
description: Returns information about the specified route. Authenticated user must have ownership of, or read access to, the device from which the route was uploaded.
tags:
- routes
security:
- AuthUser: []
- AuthPublic: []
responses:
'200':
description: JSON object containing route information
content:
application/json:
schema:
$ref: '#/components/schemas/Route'
patch:
operationId: updateRoute
summary: Update route
description: Update route metadata. Authenticated user must have ownership of the device from which the route was uploaded.
tags:
- routes
security:
- AuthUser: []
requestBody:
content:
application/json:
schema:
type: object
properties:
rating:
type: integer
minimum: 1
maximum: 5
description: Route rating
deprecated: true
example: 4
is_public:
type: boolean
description: Whether the route is publicly accessible
example: true
responses:
'200':
description: JSON object containing updated route information
content:
application/json:
schema:
$ref: '#/components/schemas/Route'
/v1/route/{routeName}/segments:
parameters:
- $ref: '#/components/parameters/routeName'
get:
operationId: getRouteSegments
summary: Route segments
description: Returns list of segments comprising a route. Authenticated user must have ownership of, or read access to, the device from which the route was uploaded.
tags:
- routes
security:
- AuthUser: []
responses:
'200':
description: JSON array of segments
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Segment'
/v1/route/{routeName}/files:
parameters:
- $ref: '#/components/parameters/routeName'
get:
operationId: getRouteFiles
summary: Raw log files
description: Retrieve uploaded files for a route. Calls to this API are rate limited to 5 per minute.
tags:
- routes
- logs
security:
- AuthUser: []
- AuthPublic: []
responses:
'200':
description: JSON object containing signed URLs to various log files. URLs are valid for 1 hour. All arrays are sorted by segment number ascending.
content:
application/json:
schema:
type: object
properties:
qlogs:
type: array
description: Array of signed URLs to qlog.bz2 files
items:
type: string
qcameras:
type: array
description: Array of signed URLs to qcamera.ts files
items:
type: string
logs:
type: array
description: Array of signed URLs to rlog.bz2 files
items:
type: string
cameras:
type: array
description: Array of signed URLs to fcamera.hevc files
items:
type: string
dcameras:
type: array
description: Array of signed URLs to dcamera.hevc files
items:
type: string
ecameras:
type: array
description: Array of signed URLs to ecamera.hevc files
items:
type: string
required:
- qlogs
- qcameras
- logs
- cameras
- dcameras
- ecameras
/v1/route/{routeName}/qcamera.m3u8:
parameters:
- $ref: '#/components/parameters/routeName'
get:
operationId: getRouteStream
summary: Route HLS stream
description: Returns rear camera HLS stream index of MPEG-TS fragments.
tags:
- routes
security:
- AuthUser: []
- AuthPublic: []
responses:
'200':
description: m3u8 playlist
content:
application/x-mpegURL:
schema:
type: string
example: |
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:3.049958,
8_61.ts?v=2
#EXTINF:3.049955,
69_61.ts?v=2
#EXTINF:3.049955,
130_61.ts?v=2
#EXTINF:3.049958,
191_61.ts?v=2
#EXTINF:3.049970,
252_61.ts?v=2
#EXTINF:3.049955,
313_61.ts?v=2
#EXTINF:3.050007,
374_61.ts?v=2
#EXTINF:3.049913,
435_61.ts?v=2
#EXTINF:3.049942,
496_61.ts?v=2
#EXTINF:3.049964,
557_61.ts?v=2
#EXTINF:3.049955,
618_61.ts?v=2
/v1/route/{routeName}/share_signature:
parameters:
- $ref: '#/components/parameters/routeName'
get:
operationId: getRouteShareSignature
summary: Route sharing signature
description: Return route share URL signature. Expires in 365 days.
tags:
- routes
security:
- AuthUser: []
responses:
'200':
description: JSON object containing route share signature
content:
application/json:
schema:
type: object
properties:
exp:
type: string
description: Unix timestamp of expiration
sig:
type: string
description: Signature
required:
- exp
- sig
/v1/route/{routeName}/preserve:
parameters:
- $ref: '#/components/parameters/routeName'
post:
operationId: preserveRoute
summary: Preserve route
description: Preserve route from deletion. Authenticated user must have ownership of the device from which the route was uploaded.
tags:
- routes
security:
- AuthUser: []
responses:
'200':
$ref: '#/components/responses/SuccessInteger'
delete:
operationId: unpreserveRoute
summary: Unpreserve route
description: Unpreserve route from deletion. Authenticated user must have ownership of the device from which the route was uploaded.
tags:
- routes
security:
- AuthUser: []