-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathapi-b2c.yaml
More file actions
5544 lines (5185 loc) · 215 KB
/
api-b2c.yaml
File metadata and controls
5544 lines (5185 loc) · 215 KB
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.0
servers:
- url: 'https://api.mpsa.com/api/connectedcar/v2'
info:
version: '4.17.2'
title: Groupe PSA Connected Car B2C API
license:
name: Groupe PSA Licence
url: 'https://www.psa-peugeot-citroen.com/'
description: >
# Introduction:
This is the description of the *Groupe PSA Connected Car B2C API*.
This specification is written in **OpenAPI Specification version 3** and can
be displayed using [ReDoc](https://github.com/Rebilly/ReDoc) or
[Swagger](http://swagger.io).
This REST API allows applications to fetch data from the connected Vehicles data platform.
---
# Authentication:
PSA Connected Car APIs uses the [OAuth 2.0](https://tools.ietf.org/html/rfc6749) protocol for authentication and
authorization. Any applications require a valid [Access Token](https://tools.ietf.org/html/rfc6749#section-1.4) to access to user data.
The Implicit Grant Type is used to get the access token.
---
# Scopes:
## Filtering Scopes
- When the API caller requests a set of scopes. The owner may not grant access to all of the requested scopes, so the application will have to adapt to the restricted access or request for a larger set of scopes again.
- API backend will deliver the data related to the granted scopes only.
- If no scope has been granted with the caller token then an unauthorized error will be returned.
_If for example the API caller requests for "aggregated telemetry" or "trip" without having the "location" scope, then the resource data returned will not have the vehicle's position but only other data that will satisfy the scopes present in the token._
## Use of Scopes
- Scopes are specified in each individual API.
- Depending on the API, scope can be :
- Mandatory (designed with comment "#Required"): if this scope is not used during the request an error will be returned. An API can have multiple mandatory scopes.
- Optional scopes will return an optional part of the API.
## Hierarchical Scopes
Since API resources are hierarchical, scope follow also this strategy.
**Scopes used to request access to resources for OAuth2 security scheme fall into four categories:**
#### _1. <u>IoT data scopes:</u>_
|<b>Scope</b> |<b>Description</b> |
|---|---|
|data:telemetry| Read full telemetry data|
|data:position| Read vehicle Location (position) data|
|data:trip| Read trip related data|
|data:alert| Read alert related data|
|data:collision| Read collision related data|
|data:vehicle:devices:pnc| Read vehicle Plug and Charge related data|
#### _2. <u>Vehicle remotes scopes:</u>_
|<b>Scope</b> |<b>Description</b> |
|---|---|
|remote:door:write| Read & send door remote (pending & history)|
|remote:preconditioning:write| Read & send door Lock remote (pending & history)|
|remote:horn:write| Read & send horn remote (pending & history)|
|remote:charging:write| Read & send charging remote (pending & history)|
|remote:lights:write| Read & send lights remote (pending & history)|
|remote:wakeup:write| Read & send weackup remote (pending & history)|
|remote:navigation:write| Read & send navigation remote (pending & history)|
---
# Paging:
To make this necessary feature easy to use when retrieving a collection of results, this API uses a token (computed and interpreted by the backend only) as a context that contains all necessary information allowing the navigation through pages.
Token acts as an ```HTTP COOKIE``` on the client-side, so the server does not keep any cache or session settings to continue paging and keep all request stateless.
---
# Errors:
Error codes returned by all APIs comply with the standard. Nevertheless, PSA Services (callers) need to have more detailed data structures (even when the answer is not Http-OK) to better categorize the type of error by providing application code, message and debugging code (for investigation purposes). The HTTP code of the response is managed by the protocol itself (in the header).
### These APIS are likely to report the following HTTP code:
| <b>Code</b> | <b>Description</b> | <b>Case</b> |
|---|---|---|
| 200 |<i>The request has succeeded and the resource data has been sent.</i>|GET APIs. |
| 202 |<i>The request has been accepted for processing, but not yet acted upon. An id of processing is returned.</i>|POST/PUT requests:<br>-Create monitor<br>-Create a callbak.|
| 204 |<i>The request has been accepted and there is no additional content</i>|DELTE APIs:<br>-Delete monitor.<br>-Delete a callback.|
|400|<i>Request cannot be processed due to invalid query parameter value of body content (for POST/PUT verbs)</i>|ALL APIs.|
|401|<i>Unauthorized request due to lack of valid authentication credentials.</i>|All APIs.|
|403|<i>Unauthorized request due to insufficient credentials to grant access.</i>|All APIs.|
|404|<i>Target resource not found.|All APIs. Even POST, PUT or DELETE if the resource id is uncknown.</i>|
|500|<i>Unexpected condition that prevented from fulfilling the reques.</i>|All APIs.|
**Errors are returned as a generic error response:** see ```ErrorCodeDefaultResponse``` model.
---
# API Usage:
## Data output format
**All APIs return data in JSON format. The application who uses them must take into account the evolving character of them and more precisely regarding the schemas of the exposed data. Indeed:**
* The missing of known data fields should not cause an error.
* It should (correctly) deal with JSON content with unknown properties also. Indeed, data schema extensions should be supported without errors even if they are not used.
**For example:**
Assuming a given exposed resource with this data schema:
data:
type: object
description: Data model
properties:
field1:
type: string
field2:
type: number
The application should be able to deal with those possible valid JSON contents:
> All fields:
```{
"field1":"value1",
"field2": 1
}```
> Missing field2:
```{
"field1":"value1"
}```
> Unknow field3:
```{
"field1":"value1",
"field3": 2.5
}```
## Callback, Monitor & Remote management:
- Creation on monitor, remote & subscribe (callback) will be associated to a client ID, user (and vehicle depending on the API requested), therefore:
- Read operation will only return information previously created by this client ID, user and vehicle association
- Update, delete operation will only be possible for ressource previously created by this client ID, user and vehicle association
- A maximum of 5 monitors can be associated to a vehicle, client ID, user.
---
tags:
- name: User
- name: Vehicles
description: Access to Vehicles details.
- name: Trips
description: Describe Trips of a a User or Vehicle
- name: Subscribe
description: Describe User subscription (callback) to use with remote and/or monitor feature.
- name: Monitors
description: Describe the vehicle monitor features.
- name: Remote
description: Describe the vehicle monitor features.
paths:
'/user':
get:
tags:
- User
summary: User's information
description: Returns the User's information.
operationId: getUser
parameters:
- $ref: '#/components/parameters/country'
responses:
'200':
description: OK
content:
application/hal+json:
schema:
$ref: '#/components/schemas/User'
default:
description: User not found
$ref: '#/x-fragment/general_error_fragment'
'/user/vehicles':
get:
tags:
- Vehicles
summary: List of vehicles
description: |
Returns the Vehicles associated with the User.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:vehicle:devices:pnc|Optional|
operationId: getVehiclesByDevice
parameters:
- $ref: '#/components/parameters/indexRange'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/locale'
- $ref: '#/components/parameters/pageToken'
- $ref: '#/components/parameters/vehicleExtension'
- $ref: '#/components/parameters/vinPrefix'
- $ref: '#/components/parameters/country'
security:
- api_oauth:
- data:vehicle:devices:pnc
responses:
'200':
description: OK
content:
'application/hal+json ':
schema:
$ref: '#/components/schemas/Vehicles'
default:
description: Vehicle not found
$ref: '#/x-fragment/general_error_fragment'
'/user/vehicles/{id}':
get:
tags:
- Vehicles
summary: Details of a vehicle
description: |
Returns detailed information about a Vehicle.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:vehicle:devices:pnc|Optional|
operationId: getVehicleByid
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/locale'
- $ref: '#/components/parameters/vehicleExtension'
- $ref: '#/components/parameters/country'
security:
- api_oauth:
- data:vehicle:devices:pnc
responses:
'200':
description: OK
content:
'application/hal+json ':
schema:
$ref: '#/components/schemas/Vehicle'
default:
description: Vehicle not found
$ref: '#/x-fragment/general_error_fragment'
'/user/vehicles/{id}/telemetry':
get:
summary: Vehicle telemetries.
tags:
- Vehicles
description: |
Returns the latest Telemetry messages that occurred during a selective timestamp-ranges and bounded by an index range.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
operationId: getTelemetry
deprecated : true
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/timestamps'
- $ref: '#/components/parameters/telemetryType'
- $ref: '#/components/parameters/indexRange'
- $ref: '#/components/parameters/pageSizeHighFrequency'
- $ref: '#/components/parameters/pageToken'
- $ref: '#/components/parameters/telemetryExtension'
security:
- api_oauth:
- data:telemetry
- data:position
responses:
'200':
$ref: '#/components/responses/TelemetrySuccessResponse'
default:
$ref: '#/components/responses/TelemetryFailedResponse'
'/user/vehicles/{id}/lastPosition':
get:
tags:
- Vehicles
summary: Last position identified
description: |
Returns the latest GPS Position of the Vehicle.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:position|Required|
operationId: getCarLastPosition
deprecated: true
parameters:
- $ref: '#/components/parameters/vehicleId'
security:
- api_oauth:
- data:position #Required
responses:
'200':
description: Position response
content:
application/vnd.geo+json:
schema:
$ref: '#/components/schemas/Position'
default:
description: Vehicle not found
$ref: '#/x-fragment/general_error_fragment'
'/user/vehicles/{id}/collisions':
get:
summary: Collistions occured on the vehicle.
tags:
- Vehicles
description: |
Returns the list of Collisions that occurred for a given vehicle (id) during the timestamp ranges and bounded by an index range
|Scope Name |Mandatory State|
|--------|:---------:|
|data:collision|Required|
operationId: getVehicleCollision
deprecated: true
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/timestamps'
- $ref: '#/components/parameters/indexRange'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/pageToken'
security:
- api_oauth:
- data:collision #Required
responses:
'200':
$ref: '#/components/responses/CollisionsSuccessResponse'
default:
$ref: '#/components/responses/CollisionFailedResponse'
'/user/vehicles/{id}/collisions/{cid}':
get:
summary: A collistion occured on the vehicle.
tags:
- Vehicles
description: |
Returns the Collision that matches the vehicle id and the Collision cid.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:collision|Required|
operationId: getVehicleCollisionById
deprecated: true
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/collisionId'
security:
- api_oauth:
- data:collision #Required
responses:
'200':
$ref: '#/components/responses/CollisionsuccessResponse'
default:
$ref: '#/components/responses/CollisionFailedResponse'
'/user/vehicles/{id}/maintenance':
get:
tags:
- Vehicles
description: |
Returns the latest Maintenance information for a Vehicle.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Required|
operationId: getVehicleMaintenance
parameters:
- $ref: '#/components/parameters/vehicleId'
security:
- api_oauth:
- data:telemetry #Required
responses:
'200':
description: Maintenant response
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Maintenance'
default:
$ref: '#/x-fragment/general_error_fragment'
'/user/vehicles/{id}/status':
get:
tags:
- Vehicles
description: |
Returns the latest vehicle status.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
summary: Vehicle status.
operationId: getVehicleStatus
parameters:
- $ref: '#/components/parameters/vehicleId'
security:
- api_oauth:
- data:telemetry
- data:position
responses:
'200':
description: Status response
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Status'
default:
$ref: '#/x-fragment/general_error_fragment'
'/user/vehicles/{id}/alerts':
get:
tags:
- Vehicles
description: |
Returns the latest alert messages for a Vehicle.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:alert|Required|
|data:position|Optional|
summary: Alerts related to a vehicle.
operationId: getVehicleAlerts
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/timestamps'
- $ref: '#/components/parameters/indexRange'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/pageToken'
security:
- api_oauth:
- data:alert #Required
- data:position
responses:
'200':
$ref: '#/components/responses/AlertsuccessResponses'
default:
$ref: '#/components/responses/AlertFailedResponse'
'/user/vehicles/{id}/alerts/{aid}':
get:
tags:
- Vehicles
summary : An alert related to a vehicle.
description: |
Returns information about a specific alert messages for a Vehicle.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:alert|Required|
|data:position|Optional|
operationId: getVehicleAlertsById
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/alertId'
security:
- api_oauth:
- data:alert #Required
- data:position
responses:
'200':
$ref: '#/components/responses/AlertsucessResponse'
default:
$ref: '#/components/responses/AlertFailedResponse'
'/user/vehicles/{id}/alarms':
get:
tags:
- Vehicles
description: |
Returns a (filtered) list of alarm for a Vehicle.
*Note:* Timestamp filtering concerns the creation date for status or trigger.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Required|
summary: Vehicle's Alarms
operationId: getVehicleAlarms
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/alarmType'
- $ref: '#/components/parameters/timestamps'
- $ref: '#/components/parameters/indexRange'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/pageToken'
security:
- api_oauth:
- data:telemetry #Required
responses:
'200':
$ref: '#/components/responses/AlarmSuccessResponses'
default:
$ref: '#/components/responses/AlarmFailedResponse'
'/user/vehicles/{id}/alarms/{aid}':
get:
tags:
- Vehicles
description: |
Returns information about a specific alarm for a Vehicle.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Required|
summary: Vehicle's Alarm
operationId: getVehicleAlarmsById
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/alarmId'
security:
- api_oauth:
- data:telemetry #Required
responses:
'200':
$ref: '#/components/responses/AlarmSucessResponse'
default:
$ref: '#/components/responses/AlarmFailedResponse'
'/user/vehicles/{id}/trips':
$ref: '#/x-fragment/Vehicle_id_Trips'
'/user/vehicles/{id}/trips/{tid}':
$ref: '#/x-fragment/Vehicle_id_Trip_id'
'/user/vehicles/{id}/trips/{tid}/alerts':
$ref: '#/x-fragment/Vehicle_id_Trip_id_Alerts_getter'
'/user/vehicles/{id}/trips/{tid}/alerts/{aid}':
$ref: '#/x-fragment/Vehicle_id_Trip_id_Alerts_id_getter'
'/user/vehicles/{id}/trips/{tid}/collisions':
$ref: '#/x-fragment/Vehicle_id_Trip_id_Collisions_getter'
'/user/vehicles/{id}/trips/{tid}/collisions/{cid}':
$ref: '#/x-fragment/Vehicle_id_Trip_id_Collisions_id_getter'
'/user/vehicles/{id}/trips/{tid}/wayPoints':
$ref: '#/x-fragment/Vehicle_id_Trip_id_wayPoints_getter'
'/user/vehicles/{id}/trips/{tid}/telemetry':
$ref: '#/x-fragment/Vehicle_id_Trip_id_Telemetry_getter'
'/user/vehicles/{id}/callbacks/{cbid}/monitors':
get:
tags:
- Monitors
summary: Get all monitors of the vehicle.
description: |
Returns the list of subscribed Monitors of the vehicle.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
|data:trip|Optional|
|data:alert|Optional|
|data:collision|Optional|
operationId: getVehicleMonitors
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/callbackId'
- $ref: '#/components/parameters/indexRange'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/pageToken'
security:
- api_oauth:
- data:telemetry
- data:position
- data:trip
- data:alert
- data:collision
responses:
200:
$ref: '#/components/responses/MonitorsuccessResponses'
default:
$ref: '#/components/responses/MonitorFailedResponse'
post:
tags:
- Monitors
summary: Create a new Monitor.
description: |
Create a monitor dedicated to a vehicle. It will generates an event following the transition state of one of the (monitored) data of the vehicles. As for example the fuel level, the moving out of a defined geographical area.
When the trigger occurs, the built event expressed as a JSON object will be sent over the subscribed callback.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
|data:trip|Optional|
|data:alert|Optional|
|data:collision|Optional|
operationId: createVehicleVehicleMonitor
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/callbackId'
security:
- api_oauth:
- data:telemetry
- data:position
- data:trip
- data:alert
- data:collision
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MonitorParameter'
#DataMonitorParm
responses:
202:
$ref: '#/components/responses/MonitorsuccessPostResponse'
default:
$ref: '#/components/responses/MonitorFailedResponse'
'/user/vehicles/{id}/callbacks/{cbid}/monitors/{mid}':
put:
tags:
- Monitors
summary: Update an existing Monitor.
description: |
Update an existing ```Monitor``` that has been posted (and accepted previously) for this vehicle. The monitor object (body) provided should be complete (the aggregation is not supported for the update of the ```monitor```).
You can first retrieve this object using the ```GET /monitor/{mid}``` API, then modify it and finally publish it (via this ```PUT API```).
|Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
|data:trip|Optional|
|data:alert|Optional|
|data:collision|Optional|
operationId: updateVehicleVehicleMonitor
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/callbackId'
- $ref: '#/components/parameters/monitorId'
security:
- api_oauth:
- data:telemetry
- data:position
- data:trip
- data:alert
- data:collision
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MonitorParameter'
responses:
202:
$ref: '#/components/responses/MonitorsuccessPostResponse'
default:
$ref: '#/components/responses/MonitorFailedResponse'
get:
tags:
- Monitors
description: |
Returns information about a specific Monitor for a given vehicle.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
|data:trip|Optional|
|data:alert|Optional|
|data:collision|Optional|
summary: Get the monitor by monitor Id.
operationId: getVehicleMonitorsStatusById
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/callbackId'
- $ref: '#/components/parameters/monitorId'
security:
- api_oauth:
- data:telemetry
- data:position
- data:trip
- data:alert
- data:collision
responses:
200:
$ref: '#/components/responses/MonitorsuccessResponse'
default:
$ref: '#/components/responses/MonitorFailedResponse'
delete:
tags:
- Monitors
summary: Delete an existing Monitor.
description: |
Stop (disable) an existing Monitor.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
|data:trip|Optional|
|data:alert|Optional|
|data:collision|Optional|
operationId: deleteVehicleMonitor
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/callbackId'
- $ref: '#/components/parameters/monitorId'
security:
- api_oauth:
- data:telemetry
- data:position
- data:trip
- data:alert
- data:collision
responses:
204:
description: Monitor deleted (the response does not include an entity).
'400':
description: Invalid ID supplied
'404':
description: Monitor not found
'/user/vehicles/{id}/callbacks/{cbid}/monitors/{mid}/status':
put:
tags:
- Monitors
summary: Set a new monitor status.
description: |
Set monitor status.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
|data:trip|Optional|
|data:alert|Optional|
|data:collision|Optional|
operationId: setVehicleVehicleMonitorStatus
parameters:
- $ref: '#/components/parameters/vehicleId'
- $ref: '#/components/parameters/callbackId'
- $ref: '#/components/parameters/monitorId'
security:
- api_oauth:
- data:telemetry
- data:position
- data:trip
- data:alert
- data:collision
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MonitorStatusSetter'
responses: #MonitorId
202:
$ref: '#/components/responses/MonitorsuccessPostResponse'
default:
$ref: '#/components/responses/MonitorFailedResponse'
'/user/callbacks':
get:
tags:
- Subscribe
summary: Get all callbacks of the user.
description: |
Returns the list of subscribed callback of the user.
|Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
|data:trip|Optional|
|data:alert|Optional|
|data:collision|Optional|
|remote:door:write|Optional|
|remote:preconditioning:write|Optional|
|remote:horn:write|Optional|
|remote:charging:write|Optional|
|remote:lights:write|Optional|
|remote:wakeup:write|Optional|
|remote:navigation:write|Optional|
operationId: getUsertRemotes
parameters:
- $ref: '#/components/parameters/callbackType'
- $ref: '#/components/parameters/indexRange'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/pageToken'
security:
- api_oauth:
- data:telemetry
- data:position
- data:trip
- data:alert
- data:collision
- remote:door:write
- remote:preconditioning:write
- remote:horn:write
- remote:charging:write
- remote:lights:write
- remote:wakeup:write
- remote:navigation:write
responses:
200:
$ref: '#/components/responses/CallbackSuccessResponses'
default:
$ref: '#/components/responses/CallbackFailedResponse'
#callbackId
post:
tags:
- Subscribe
summary: Register a new reusable callback.
description: |
Create a new reusable callback.
Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
|data:trip|Optional|
|data:alert|Optional|
|data:collision|Optional|
|remote:door:write|Optional|
|remote:preconditioning:write|Optional|
|remote:horn:write|Optional|
|remote:charging:write|Optional|
|remote:lights:write|Optional|
|remote:wakeup:write|Optional|
|remote:navigation:write|Optional|
operationId: setUsertVehicleRemote
security:
- api_oauth:
- data:telemetry
- data:position
- data:trip
- data:alert
- data:collision
- remote:door:write
- remote:preconditioning:write
- remote:horn:write
- remote:charging:write
- remote:lights:write
- remote:wakeup:write
- remote:navigation:write
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CallbackSubscribe'
responses: #MonitorId
200:
$ref: '#/components/responses/CallbackSuccessPostResponse'
default:
$ref: '#/components/responses/CallbackFailedResponse'
'/user/callbacks/{cbid}':
put:
tags:
- Subscribe
summary: Update an existing callback.
description: |
Update an existing ```Callback``` that has been posted (and accepted previously) for the user. The callback object (body) provided should be complete (aggregation is not supported for the update). This object can be retrieved using the ```GET /user/remote/callbacks/{cbid}``` API then modify it and finally publish it (via this ```PUT API```)
Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
|data:trip|Optional|
|data:alert|Optional|
|data:collision|Optional|
|remote:door:write|Optional|
|remote:preconditioning:write|Optional|
|remote:horn:write|Optional|
|remote:charging:write|Optional|
|remote:lights:write|Optional|
|remote:wakeup:write|Optional|
|remote:navigation:write|Optional|
operationId: setUsertVehicleRemoteById
parameters:
- $ref: '#/components/parameters/callbackId'
security:
- api_oauth:
- data:telemetry
- data:position
- data:trip
- data:alert
- data:collision
- remote:door:write
- remote:preconditioning:write
- remote:horn:write
- remote:charging:write
- remote:lights:write
- remote:wakeup:write
- remote:navigation:write
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CallbackSubscribe'
responses: #MonitorId
202:
$ref: '#/components/responses/CallbackSuccessPostResponse'
default:
$ref: '#/components/responses/CallbackFailedResponse'
get:
tags:
- Subscribe
summary: Get a user callback.
description: |
Returns a subscribed callback of the user by subscribe ID.
Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
|data:trip|Optional|
|data:alert|Optional|
|data:collision|Optional|
|remote:door:write|Optional|
|remote:preconditioning:write|Optional|
|remote:horn:write|Optional|
|remote:charging:write|Optional|
|remote:lights:write|Optional|
|remote:wakeup:write|Optional|
|remote:navigation:write|Optional|
operationId: getUsertRemotebyId
parameters:
- $ref: '#/components/parameters/callbackId'
security:
- api_oauth:
- data:telemetry
- data:position
- data:trip
- data:alert
- data:collision
- remote:door:write
- remote:preconditioning:write
- remote:horn:write
- remote:charging:write
- remote:lights:write
- remote:wakeup:write
- remote:navigation:write
responses:
200:
$ref: '#/components/responses/CallbackSuccessResponse'
default:
$ref: '#/components/responses/CallbackFailedResponse'
delete:
tags:
- Subscribe
summary: Delete an existing callback.
description: |
Delete an existing callback.
* Notes:
* If there was an ongoing Remote-Operation then its status will never be delivered.
* Deleting the callback will also delete all of its associated monitors.
Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
|data:trip|Optional|
|data:alert|Optional|
|data:collision|Optional|
|remote:door:write|Optional|
|remote:preconditioning:write|Optional|
|remote:horn:write|Optional|
|remote:charging:write|Optional|
|remote:lights:write|Optional|
|remote:wakeup:write|Optional|
|remote:navigation:write|Optional|
operationId: deleteUsertRemote
parameters:
- $ref: '#/components/parameters/callbackId'
security:
- api_oauth:
- data:telemetry
- data:position
- data:trip
- data:alert
- data:collision
- remote:door:write
- remote:preconditioning:write
- remote:horn:write
- remote:charging:write
- remote:lights:write
- remote:wakeup:write
- remote:navigation:write
responses:
204:
description: Callback deleted (the response does not include an entity)
'400':
description: Invalid ID supplied
'404':
description: Callback not found
'/user/callbacks/{cbid}/status':
put:
tags:
- Subscribe
summary: Set an existing callback new status.
description: |
Set the user callback status.```Paused``` means that the callback will not post any event.
Scope Name |Mandatory State|
|--------|:---------:|
|data:telemetry|Optional|
|data:position|Optional|
|data:trip|Optional|
|data:alert|Optional|
|data:collision|Optional|
|remote:door:write|Optional|
|remote:preconditioning:write|Optional|
|remote:horn:write|Optional|
|remote:charging:write|Optional|
|remote:lights:write|Optional|
|remote:wakeup:write|Optional|
|remote:navigation:write|Optional|
operationId: setUserCallbackStatus