tesla_api 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/apiary.apib +0 -710
  3. data/docs/SUMMARY.md +9 -5
  4. data/docs/api-basics/vehicles.md +2 -0
  5. data/docs/miscellaneous/README.md +9 -0
  6. data/docs/miscellaneous/endpoints.md +407 -0
  7. data/docs/vehicle/commands/README.md +45 -4
  8. data/docs/vehicle/commands/alerts.md +24 -0
  9. data/docs/vehicle/commands/charging.md +97 -0
  10. data/docs/vehicle/commands/climate.md +46 -0
  11. data/docs/vehicle/commands/doors.md +24 -0
  12. data/docs/vehicle/commands/media.md +92 -0
  13. data/docs/vehicle/commands/navigation.md +33 -0
  14. data/docs/vehicle/commands/remotestart.md +17 -0
  15. data/docs/vehicle/commands/softwareupdate.md +30 -0
  16. data/docs/vehicle/commands/speedlimit.md +74 -0
  17. data/docs/vehicle/commands/sunroof.md +19 -0
  18. data/docs/vehicle/commands/trunk.md +17 -0
  19. data/docs/vehicle/commands/valet.md +35 -0
  20. data/docs/vehicle/commands/wake.md +26 -0
  21. data/docs/vehicle/optioncodes.md +4 -0
  22. data/docs/vehicle/state/README.md +5 -1
  23. data/docs/vehicle/state/chargestate.md +35 -36
  24. data/docs/vehicle/state/climatestate.md +19 -20
  25. data/docs/vehicle/state/data.md +122 -108
  26. data/docs/vehicle/state/drivestate.md +7 -8
  27. data/docs/vehicle/state/guisettings.md +4 -5
  28. data/docs/vehicle/state/nearbychargingsites.md +12 -0
  29. data/docs/vehicle/state/vehiclestate.md +10 -7
  30. data/lib/tesla_api/vehicle.rb +25 -0
  31. data/lib/tesla_api/version.rb +1 -1
  32. data/spec/cassettes/vehicle-cancel_software_update.yml +100 -0
  33. data/spec/cassettes/vehicle-charge_port_door_close.yml +100 -0
  34. data/spec/cassettes/vehicle-data.yml +103 -0
  35. data/spec/cassettes/vehicle-navigation_request.yml +100 -0
  36. data/spec/cassettes/vehicle-nearby_charging_sites.yml +95 -0
  37. data/spec/cassettes/vehicle-schedule_software_update.yml +100 -0
  38. data/spec/lib/tesla_api/vehicle_spec.rb +47 -22
  39. metadata +18 -13
  40. data/spec/cassettes/vehicle-sun_roof_control-comfort.yml +0 -130
  41. data/spec/cassettes/vehicle-sun_roof_control-open.yml +0 -130
  42. data/spec/cassettes/vehicle-sun_roof_move-0.yml +0 -130
  43. data/spec/cassettes/vehicle-sun_roof_move-100.yml +0 -130
  44. data/spec/cassettes/vehicle-sun_roof_move-50.yml +0 -130
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 402e885d5f181024647338d54848e77f71a7fce7b2a3d4d308708366bb809d6a
4
- data.tar.gz: 859d52863c8e0c58ee761edab3c418df031e96bec3fa1ce9d095bd2304bdf555
3
+ metadata.gz: 9b31e0c77b2bb1e672152be73a92a86c32ad21ed1c00ac90d4c1710d2b631b9c
4
+ data.tar.gz: d7cd8c5bbbfa5594c36449055f04ca915c2608a8974f2b9945a241d7a3603240
5
5
  SHA512:
6
- metadata.gz: a64a3a8e93bdd1aecfb9274020a322482f96a83e1154a57db5f60cd415c79164f934c896e520fa2c234d145d12e42bcdfce3d48d2f6298e649db82cad1e190a8
7
- data.tar.gz: 0b1e192d37378e004415108e44387aec166106d7616fa0b576c15d9475c83438b1445b164a88980331a5e7cfa30936ce7964775086b093b6f5a9979969e66e59
6
+ metadata.gz: 1d0bff41652367d606b9e6e2d16865a4636a6f313ce5f50f9efb65e46edc72ecca2f7c1adc210f4af6ab716e25706db1e14af65c057de4358c2aec1da07b2493
7
+ data.tar.gz: d0d9450777a37d1800d4d30238c89eb2b7075dd49a22760204c341146cb287cfcda9401a68c8f27b749c5c5496c263b7bc5c7b48721c88d7d042c2bfc337ee4f
@@ -6,713 +6,3 @@ HOST: https://owner-api.teslamotors.com
6
6
  # ⚠️ ⚠️ ⚠️ ⚠️
7
7
  # This site has moved! [https://tesla-api.timdorr.com/](https://tesla-api.timdorr.com/)
8
8
  # ⚠️ ⚠️ ⚠️ ⚠️
9
-
10
- This is unofficial documentation of the Tesla Model S JSON API used by the iOS and Android apps. It features functionality to monitor and control the Model S remotely.
11
-
12
- # Group Authentication
13
-
14
- ## Tokens [/oauth/token]
15
-
16
- ### Get an Access Token [POST]
17
- Performs the login. Takes in an plain text email and password, matching the owner's login information for [https://my.teslamotors.com/user/login](https://my.teslamotors.com/user/login).
18
-
19
- Returns a `access_token` which is passed along as a header with all future requests to authenticate the user.
20
-
21
- You must provide the `Authorization: Bearer {access_token}` header in all other requests.
22
-
23
- The current client ID and secret are [available here](http://pastebin.com/YiLPDggh)
24
-
25
- + Attributes
26
- + grant_type: `password` (string) - The type of oAuth grant. Always "password"
27
- + client_id: `abc` (string) - The oAuth client ID
28
- + client_secret: `123` (string) - The oAuth client secret
29
- + email: `elon@teslamotors.com` (string) - The email for my.teslamotors.com
30
- + password: `edisonsux` (string) - The password for my.teslamotors.com
31
-
32
- + Response 200 (application/json)
33
- + Body
34
-
35
- {
36
- "access_token": "abc123",
37
- "token_type": "bearer",
38
- "expires_in": 7776000,
39
- "created_at": 1457385291,
40
- "refresh_token" : "cba321"
41
- }
42
-
43
- # Group Vehicles
44
- A logged in user can have multiple vehicles under their account. This resource is primarily responsible for listing the vehicles and the basic details about them.
45
-
46
- ## Vehicle Collection [/api/1/vehicles]
47
-
48
- ### List all Vehicles [GET]
49
- Retrieve a list of your owned vehicles (includes vehicles not yet shipped!)
50
-
51
- + Request
52
- + Headers
53
-
54
- Authorization: Bearer {access_token}
55
-
56
- + Response 200 (application/json)
57
-
58
- + Body
59
-
60
- {
61
- "response": [{
62
- "color": null,
63
- "display_name": null,
64
- "id": 321,
65
- "option_codes": "MS01,RENA,TM00,DRLH,PF00,BT85,PBCW,RFPO,WT19,IBMB,IDPB,TR00,SU01,SC01,TP01,AU01,CH00,HP00,PA00,PS00,AD02,X020,X025,X001,X003,X007,X011,X013",
66
- "user_id": 123,
67
- "vehicle_id": 1234567890,
68
- "vin": "5YJSA1CN5CFP01657",
69
- "tokens": ["x", "x"],
70
- "state": "online"
71
- }],
72
- "count":1
73
- }
74
-
75
-
76
- ## State and Settings [/api/1/vehicles/{vehicle_id}]
77
- These resources are read-only and determine the state of the vehicle's various sub-systems.
78
-
79
- + Parameters
80
-
81
- + vehicle_id: `1` (number) - The id of the Vehicle.
82
-
83
- ## Mobile Access [GET /api/1/vehicles/{vehicle_id}/mobile_enabled]
84
- Determines if mobile access to the vehicle is enabled.
85
-
86
- + Request
87
- + Headers
88
-
89
- Authorization: Bearer {access_token}
90
-
91
- + Parameters
92
-
93
- + vehicle_id: `1` (number) - The id of the Vehicle.
94
-
95
- + Response 200 (application/json)
96
-
97
- + Body
98
-
99
- {
100
- "response": true
101
- }
102
-
103
- ## Charge State [GET /api/1/vehicles/{vehicle_id}/data_request/charge_state]
104
- Returns the state of charge in the battery.
105
-
106
- + Request
107
- + Headers
108
-
109
- Authorization: Bearer {access_token}
110
-
111
- + Parameters
112
-
113
- + vehicle_id: `1` (number) - The id of the Vehicle.
114
-
115
- + Response 200 (application/json)
116
-
117
- + Body
118
-
119
- {
120
- "response": {
121
- "charging_state": "Complete", // "Charging", ??
122
- "charge_to_max_range": false, // current std/max-range setting
123
- "max_range_charge_counter": 0,
124
- "fast_charger_present": false, // connected to Supercharger?
125
- "battery_range": 239.02, // rated miles
126
- "est_battery_range": 155.79, // range estimated from recent driving
127
- "ideal_battery_range": 275.09, // ideal miles
128
- "battery_level": 91, // integer charge percentage
129
- "battery_current": -0.6, // current flowing into battery
130
- "charge_starting_range": null,
131
- "charge_starting_soc": null,
132
- "charger_voltage": 0, // only has value while charging
133
- "charger_pilot_current": 40, // max current allowed by charger & adapter
134
- "charger_actual_current": 0, // current actually being drawn
135
- "charger_power": 0, // kW (rounded down) of charger
136
- "time_to_full_charge": null, // valid only while charging
137
- "charge_rate": -1.0, // float mi/hr charging or -1 if not charging
138
- "charge_port_door_open": true
139
- }
140
- }
141
-
142
- ## Climate Settings [GET /api/1/vehicles/{vehicle_id}/data_request/climate_state]
143
- Returns the current temperature and climate control state.
144
-
145
- + Request
146
- + Headers
147
-
148
- Authorization: Bearer {access_token}
149
-
150
- + Parameters
151
-
152
- + vehicle_id: `1` (number) - The id of the Vehicle.
153
-
154
- + Response 200 (application/json)
155
-
156
- + Body
157
-
158
- {
159
- "response": {
160
- "inside_temp": 17.0, // degC inside car
161
- "outside_temp": 9.5, // degC outside car or null
162
- "driver_temp_setting": 22.6, // degC of driver temperature setpoint
163
- "passenger_temp_setting": 22.6, // degC of passenger temperature setpoint
164
- "is_auto_conditioning_on": false, // apparently even if on
165
- "is_front_defroster_on": null, // null or boolean as integer?
166
- "is_rear_defroster_on": false,
167
- "fan_status": 0 // fan speed 0-6 or null
168
- }
169
- }
170
-
171
- ## Driving and Position [GET /api/1/vehicles/{vehicle_id}/data_request/drive_state]
172
- Returns the driving and position state of the vehicle.
173
-
174
- + Request
175
- + Headers
176
-
177
- Authorization: Bearer {access_token}
178
-
179
- + Parameters
180
-
181
- + vehicle_id: `1` (number) - The id of the Vehicle.
182
-
183
- + Response 200 (application/json)
184
-
185
- + Body
186
-
187
- {
188
- "response": {
189
- "shift_state": null, //
190
- "speed": null, //
191
- "latitude": 33.794839, // degrees N of equator
192
- "longitude": -84.401593, // degrees W of the prime meridian
193
- "heading": 4, // integer compass heading, 0-359
194
- "gps_as_of": 1359863204 // Unix timestamp of GPS fix
195
- }
196
- }
197
-
198
- ## GUI Settings [GET /api/1/vehicles/{vehicle_id}/data_request/gui_settings]
199
- Returns various information about the GUI settings of the car, such as unit format and range display.
200
-
201
- + Request
202
- + Headers
203
-
204
- Authorization: Bearer {access_token}
205
-
206
- + Parameters
207
-
208
- + vehicle_id: `1` (number) - The id of the Vehicle.
209
-
210
- + Response 200 (application/json)
211
-
212
- + Body
213
-
214
- {
215
- "response": {
216
- "gui_distance_units": "mi/hr",
217
- "gui_temperature_units": "F",
218
- "gui_charge_rate_units": "mi/hr",
219
- "gui_24_hour_time": false,
220
- "gui_range_display": "Rated"
221
- }
222
- }
223
-
224
- ## Vehicle State [GET /api/1/vehicles/{vehicle_id}/data_request/vehicle_state]
225
- Returns the vehicle's physical state, such as which doors are open.
226
-
227
- + Request
228
- + Headers
229
-
230
- Authorization: Bearer {access_token}
231
-
232
- + Parameters
233
-
234
- + vehicle_id: `1` (number) - The id of the Vehicle.
235
-
236
- + Response 200 (application/json)
237
-
238
- + Body
239
-
240
- {
241
- "response": {
242
- "df": false, // driver's side front door open
243
- "dr": false, // driver's side rear door open
244
- "pf": false, // passenger's side front door open
245
- "pr": false, // passenger's side rear door open
246
- "ft": false, // front trunk is open
247
- "rt": false, // rear trunk is open
248
- "car_verson": "1.19.42", // car firmware version
249
- "locked": true, // car is locked
250
- "sun_roof_installed": false, // panoramic roof is installed
251
- "sun_roof_state": "unknown",
252
- "sun_roof_percent_open": 0, // null if not installed
253
- "dark_rims": false, // gray rims installed
254
- "wheel_type": "Base19", // wheel type installed
255
- "has_spoiler": false, // spoiler is installed
256
- "roof_color": "Colored", // "None" for panoramic roof
257
- "perf_config": "Base"
258
- }
259
- }
260
-
261
- # Group Vehicle Commands
262
- These commands alter the vehicles state, and return result (true/false) to indicate success, and if failure reason contains the cause of failure.
263
-
264
- ## Wake Up Car [POST /api/1/vehicles/{vehicle_id}/wake_up]
265
- Wakes up the car from the sleep state. Necessary to get some data from the car.
266
-
267
- + Request
268
- + Headers
269
-
270
- Authorization: Bearer {access_token}
271
-
272
- + Parameters
273
-
274
- + vehicle_id: `1` (number) - The id of the Vehicle.
275
-
276
- + Response 200 (application/json)
277
-
278
- + Body
279
-
280
- {
281
- "response": {
282
- "result": true,
283
- "reason": ""
284
- }
285
- }
286
-
287
- ## Set Valet Mode [POST /api/1/vehicles/{vehicle_id}/command/set_valet_mode]
288
- Sets valet mode on or off with a PIN to disable it from within the car. Reuses last PIN from previous valet session.
289
- Valet Mode limits the car's top speed to 70MPH and 80kW of acceleration power. It also disables Homelink, Bluetooth and
290
- Wifi settings, and the ability to disable mobile access to the car. It also hides your favorites, home, and work
291
- locations in navigation.
292
-
293
- + Request
294
- + Headers
295
-
296
- Authorization: Bearer {access_token}
297
-
298
- + Parameters
299
-
300
- + vehicle_id: `1` (number) - The id of the Vehicle.
301
- + on: true (boolean) - Whether to enable or disable valet mode.
302
- + password: 1234 (number) - (optional) A 4 digit PIN code to unlock the car.
303
-
304
- + Response 200 (application/json)
305
-
306
- + Body
307
-
308
- {
309
- "response": {
310
- "result": true,
311
- "reason": ""
312
- }
313
- }
314
-
315
- ## Reset Valet PIN [POST /api/1/vehicles/{vehicle_id}/command/reset_valet_pin]
316
- Resets the PIN set for valet mode, if set.
317
-
318
- + Request
319
- + Headers
320
-
321
- Authorization: Bearer {access_token}
322
-
323
- + Parameters
324
-
325
- + vehicle_id: `1` (number) - The id of the Vehicle.
326
-
327
- + Response 200 (application/json)
328
-
329
- + Body
330
-
331
- {
332
- "response": {
333
- "result": true,
334
- "reason": ""
335
- }
336
- }
337
-
338
- ## Open Charge Port [POST /api/1/vehicles/{vehicle_id}/command/charge_port_door_open]
339
- Opens the charge port. Does not close the charge port (for now...). This endpoint also unlocks the charge port if it's locked.
340
-
341
- + Request
342
- + Headers
343
-
344
- Authorization: Bearer {access_token}
345
-
346
- + Parameters
347
-
348
- + vehicle_id: `1` (number) - The id of the Vehicle.
349
-
350
- + Response 200 (application/json)
351
-
352
- + Body
353
-
354
- {
355
- "response": {
356
- "result": true,
357
- "reason": ""
358
- }
359
- }
360
-
361
- ## Set Charge Limit to Standard [POST /api/1/vehicles/{vehicle_id}/command/charge_standard]
362
- Set the charge mode to standard (90% under the new percentage system introduced in 4.5).
363
-
364
- + Request
365
- + Headers
366
-
367
- Authorization: Bearer {access_token}
368
-
369
- + Parameters
370
-
371
- + vehicle_id: `1` (number) - The id of the Vehicle.
372
-
373
- + Response 200 (application/json)
374
-
375
- + Body
376
-
377
- {
378
- "response": {
379
- "result": false,
380
- "reason": "already_standard"
381
- }
382
- }
383
-
384
- ## Set Charge Limit to Max Range [POST /api/1/vehicles/{vehicle_id}/command/charge_max_range]
385
- Set the charge mode to max range (100% under the new percentage system introduced in 4.5). Use sparingly!
386
-
387
- + Request
388
- + Headers
389
-
390
- Authorization: Bearer {access_token}
391
-
392
- + Parameters
393
-
394
- + vehicle_id: `1` (number) - The id of the Vehicle.
395
-
396
- + Response 200 (application/json)
397
-
398
- + Body
399
-
400
- {
401
- "response": {
402
- "result": false,
403
- "reason": "already_max_range"
404
- }
405
- }
406
-
407
- ## Set Charge Limit [POST /api/1/vehicles/{vehicle_id}/command/set_charge_limit?percent={limit_value}]
408
- Set the charge limit to a custom percentage.
409
-
410
- + Request
411
- + Headers
412
-
413
- Authorization: Bearer {access_token}
414
-
415
- + Parameters
416
-
417
- + vehicle_id: `1` (number) - The id of the Vehicle.
418
- + limit_value: `75` (number) - The percentage value
419
-
420
- + Response 200 (application/json)
421
-
422
- + Body
423
-
424
- {
425
- "response": {
426
- "result": true,
427
- "reason": ""
428
- }
429
- }
430
-
431
- ## Start Charging [POST /api/1/vehicles/{vehicle_id}/command/charge_start]
432
- Start charging. Must be plugged in, have power available, and not have reached your charge limit.
433
-
434
- + Request
435
- + Headers
436
-
437
- Authorization: Bearer {access_token}
438
-
439
- + Parameters
440
-
441
- + vehicle_id: `1` (number) - The id of the Vehicle.
442
-
443
- + Response 200 (application/json)
444
-
445
- + Body
446
-
447
- {
448
- "response": {
449
- "result": true,
450
- "reason": "" // "already_started" if a charge is in progress
451
- }
452
- }
453
-
454
- ## Stop Charging [POST /api/1/vehicles/{vehicle_id}/command/charge_stop]
455
- Stop charging. Must already be charging.
456
-
457
- + Request
458
- + Headers
459
-
460
- Authorization: Bearer {access_token}
461
-
462
- + Parameters
463
-
464
- + vehicle_id: `1` (number) - The id of the Vehicle.
465
-
466
- + Response 200 (application/json)
467
-
468
- + Body
469
-
470
- {
471
- "response": {
472
- "result": true,
473
- "reason": "" // "not_charging" if a charge was not in progress
474
- }
475
- }
476
-
477
- ## Flash Lights [POST /api/1/vehicles/{vehicle_id}/command/flash_lights]
478
- Flash the lights once.
479
-
480
- + Request
481
- + Headers
482
-
483
- Authorization: Bearer {access_token}
484
-
485
- + Parameters
486
-
487
- + vehicle_id: `1` (number) - The id of the Vehicle.
488
-
489
- + Response 200 (application/json)
490
-
491
- + Body
492
-
493
- {
494
- "response": {
495
- "result": true,
496
- "reason": ""
497
- }
498
- }
499
-
500
- ## Honk Horn [POST /api/1/vehicles/{vehicle_id}/command/honk_horn]
501
- Honk the horn once.
502
-
503
- + Request
504
- + Headers
505
-
506
- Authorization: Bearer {access_token}
507
-
508
- + Parameters
509
-
510
- + vehicle_id: `1` (number) - The id of the Vehicle.
511
-
512
- + Response 200 (application/json)
513
-
514
- + Body
515
-
516
- {
517
- "response": {
518
- "result": true,
519
- "reason": ""
520
- }
521
- }
522
-
523
- ## Unlock Doors [POST /api/1/vehicles/{vehicle_id}/command/door_unlock]
524
- Unlock the car's doors.
525
-
526
- + Request
527
- + Headers
528
-
529
- Authorization: Bearer {access_token}
530
-
531
- + Parameters
532
-
533
- + vehicle_id: `1` (number) - The id of the Vehicle.
534
-
535
- + Response 200 (application/json)
536
-
537
- + Body
538
-
539
- {
540
- "response": {
541
- "result": true,
542
- "reason": ""
543
- }
544
- }
545
-
546
- ## Lock Doors [POST /api/1/vehicles/{vehicle_id}/command/door_lock]
547
- Lock the car's doors.
548
-
549
- + Request
550
- + Headers
551
-
552
- Authorization: Bearer {access_token}
553
-
554
- + Parameters
555
-
556
- + vehicle_id: `1` (number) - The id of the Vehicle.
557
-
558
- + Response 200 (application/json)
559
-
560
- + Body
561
-
562
- {
563
- "response": {
564
- "result": true,
565
- "reason": ""
566
- }
567
- }
568
-
569
- ## Set Temperature [POST /api/1/vehicles/{vehicle_id}/command/set_temps?driver_temp={driver_temp}&passenger_temp={passenger_temp}]
570
- Set the temperature target for the HVAC system.
571
-
572
- + Request
573
- + Headers
574
-
575
- Authorization: Bearer {access_token}
576
-
577
- + Parameters
578
-
579
- + vehicle_id: `1` (number) - The id of the Vehicle.
580
- + driver_temp: `23.7` (number) - The desired temperature on the driver's side in celcius.
581
- + passenger_temp: `18.1` (number) - The desired temperature on the passenger's side in celcius.
582
-
583
- + Response 200 (application/json)
584
-
585
- + Body
586
-
587
- {
588
- "response": {
589
- "result": true,
590
- "reason": ""
591
- }
592
- }
593
-
594
- ## Start HVAC System [POST /api/1/vehicles/{vehicle_id}/command/auto_conditioning_start]
595
- Start the climate control system. Will cool or heat automatically, depending on set temperature.
596
-
597
- + Request
598
- + Headers
599
-
600
- Authorization: Bearer {access_token}
601
-
602
- + Parameters
603
-
604
- + vehicle_id: `1` (number) - The id of the Vehicle.
605
-
606
- + Response 200 (application/json)
607
-
608
- + Body
609
-
610
- {
611
- "response": {
612
- "result": true,
613
- "reason": ""
614
- }
615
- }
616
-
617
- ## Stop HVAC System [POST /api/1/vehicles/{vehicle_id}/command/auto_conditioning_stop]
618
- Stop the climate control system.
619
-
620
- + Request
621
- + Headers
622
-
623
- Authorization: Bearer {access_token}
624
-
625
- + Parameters
626
-
627
- + vehicle_id: `1` (number) - The id of the Vehicle.
628
-
629
- + Response 200 (application/json)
630
-
631
- + Body
632
-
633
- {
634
- "response": {
635
- "result": true,
636
- "reason": ""
637
- }
638
- }
639
-
640
- ## Move Pano Roof [POST /api/1/vehicles/{vehicle_id}/command/sun_roof_control?state={state}&percent={percent}]
641
- Controls the car's panoramic roof, if installed.
642
-
643
- + Request
644
- + Headers
645
-
646
- Authorization: Bearer {access_token}
647
-
648
- + Parameters
649
-
650
- + vehicle_id: `1` (number) - The id of the Vehicle.
651
- + state: `open` (enum[string])
652
- The desired state of the panoramic roof. The approximate percent open values for each state are `open` = 100%, `close` = 0%, `comfort` = 80%, and `vent` = ~15%
653
- + Members
654
- + `open` - Open the roof fully
655
- + `close` - Close the roof completely
656
- + `comfort` - Open to the comfort (80%) setting
657
- + `vent` - Open the roof to the vent (~15%) setting
658
- + `move` - Indicates you will provide a percentage to move the roof.
659
- + percent: `50` (number, optional) - The percentage to move the roof to.
660
-
661
- + Response 200 (application/json)
662
-
663
- + Body
664
-
665
- {
666
- "response": {
667
- "result": true,
668
- "reason": ""
669
- }
670
- }
671
-
672
- ## Remote Start [POST /api/1/vehicles/{vehicle_id}/command/remote_start_drive?password={password}]
673
- Start the car for keyless driving. Must start driving within 2 minutes of issuing this request.
674
-
675
- + Request
676
- + Headers
677
-
678
- Authorization: Bearer {access_token}
679
-
680
- + Parameters
681
-
682
- + vehicle_id: `1` (number) - The id of the Vehicle.
683
- + password: `edisonsux` (string) - The password to the authenticated my.teslamotors.com account.
684
-
685
- + Response 200 (application/json)
686
-
687
- + Body
688
-
689
- {
690
- "response": {
691
- "result": true,
692
- "reason": ""
693
- }
694
- }
695
-
696
- ## Open Trunk/Frunk [POST /api/1/vehicles/{vehicle_id}/command/trunk_open]
697
- Open the trunk or frunk. Call the endpoint again to close (this only works on rear powered trunks)
698
-
699
- + Request
700
- + Headers
701
-
702
- Authorization: Bearer {access_token}
703
-
704
- + Parameters
705
-
706
- + vehicle_id: `1` (number) - The id of the Vehicle.
707
- + which_trunk: `rear` (string) - The trunk to open. `rear` and `front` are the only options
708
-
709
- + Response 200 (application/json)
710
-
711
- + Body
712
-
713
- {
714
- "response": {
715
- "result": true,
716
- "reason": ""
717
- }
718
- }