apiary.apib in tesla_api-1.2.0 vs apiary.apib in tesla_api-1.3.0

- old
+ new

@@ -1,9 +1,14 @@ FORMAT: 1A HOST: https://owner-api.teslamotors.com # Tesla Model S JSON API + +# ⚠️ ⚠️ ⚠️ ⚠️ +# This site has moved! [https://tesla-api.timdorr.com/](https://tesla-api.timdorr.com/) +# ⚠️ ⚠️ ⚠️ ⚠️ + 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. # Group Authentication ## Tokens [/oauth/token] @@ -13,13 +18,13 @@ Returns a `access_token` which is passed along as a header with all future requests to authenticate the user. You must provide the `Authorization: Bearer {access_token}` header in all other requests. -The current client ID and secret are [available here](http://pastebin.com/fX6ejAHd) +The current client ID and secret are [available here](http://pastebin.com/YiLPDggh) -+ Parameters ++ Attributes + grant_type: `password` (string) - The type of oAuth grant. Always "password" + client_id: `abc` (string) - The oAuth client ID + client_secret: `123` (string) - The oAuth client secret + email: `elon@teslamotors.com` (string) - The email for my.teslamotors.com + password: `edisonsux` (string) - The password for my.teslamotors.com @@ -28,11 +33,13 @@ + Body { "access_token": "abc123", "token_type": "bearer", - "expires_in": 7776000 + "expires_in": 7776000, + "created_at": 1457385291, + "refresh_token" : "cba321" } # Group Vehicles 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. @@ -327,11 +334,11 @@ "reason": "" } } ## Open Charge Port [POST /api/1/vehicles/{vehicle_id}/command/charge_port_door_open] -Opens the charge port. Does not close the charge port (for now...) +Opens the charge port. Does not close the charge port (for now...). This endpoint also unlocks the charge port if it's locked. + Request + Headers Authorization: Bearer {access_token} @@ -557,23 +564,23 @@ "result": true, "reason": "" } } -## Set Temperature [POST /api/1/vehicles/{vehicle_id}/command/set_temps?driver_temp={driver_degC}&passenger_temp={pass_degC}] +## Set Temperature [POST /api/1/vehicles/{vehicle_id}/command/set_temps?driver_temp={driver_temp}&passenger_temp={passenger_temp}] Set the temperature target for the HVAC system. + Request + Headers Authorization: Bearer {access_token} + Parameters + vehicle_id: `1` (number) - The id of the Vehicle. - + driver_degC: `23.7` (number) - The desired temperature on the driver's side in celcius. - + pass_degC: `18.1` (number) - The desired temperature on the passenger's side in celcius. + + driver_temp: `23.7` (number) - The desired temperature on the driver's side in celcius. + + passenger_temp: `18.1` (number) - The desired temperature on the passenger's side in celcius. + Response 200 (application/json) + Body @@ -582,12 +589,12 @@ "result": true, "reason": "" } } -## Start Air Condition [POST /api/1/vehicles/{vehicle_id}/command/auto_conditioning_start] -Start the HVAC system. Will cool or heat automatically, depending on set temperature. +## Start HVAC System [POST /api/1/vehicles/{vehicle_id}/command/auto_conditioning_start] +Start the climate control system. Will cool or heat automatically, depending on set temperature. + Request + Headers Authorization: Bearer {access_token} @@ -605,12 +612,12 @@ "result": true, "reason": "" } } -## Stop Air Condition [POST /api/1/vehicles/{vehicle_id}/command/auto_conditioning_stop] -Stop the HVAC system. +## Stop HVAC System [POST /api/1/vehicles/{vehicle_id}/command/auto_conditioning_stop] +Stop the climate control system. + Request + Headers Authorization: Bearer {access_token} @@ -685,27 +692,27 @@ "reason": "" } } ## Open Trunk/Frunk [POST /api/1/vehicles/{vehicle_id}/command/trunk_open] -Open the trunk or frunk. Currently inoperable. +Open the trunk or frunk. Call the endpoint again to close (this only works on rear powered trunks) + Request + Headers Authorization: Bearer {access_token} + Parameters + vehicle_id: `1` (number) - The id of the Vehicle. - + which_trunk: `rear` (string) - The trunk to open. `rear` is the only one known currently. + + which_trunk: `rear` (string) - The trunk to open. `rear` and `front` are the only options + Response 200 (application/json) + Body { "response": { "result": true, "reason": "" } - } + } \ No newline at end of file