timdorr / tesla-api

🚘 A Ruby gem and unofficial documentation of Tesla's JSON API for the Model S, 3, X, and Y.
https://tesla-api.timdorr.com/
MIT License
1.99k stars 532 forks source link

"data_request" endpoints appear to have been removed by Tesla #711

Closed jonahwh closed 1 year ago

jonahwh commented 1 year ago

It appears that all the "data_request" endpoints (data_request/charge_state, data_request/climate_state, etc.) have been removed and are returning 404s.

These endpoints are no longer in the owner_endpoints.json file bundled with the app either.

It appears the only way to fetch vehicle state anymore is to use /api/1/vehicles/{id}/vehicle_data

epologee commented 1 year ago

I'm guessing it has been half a year since these endpoints were marked as deprecated, so they were removed, or maybe it's a phased rollout.

In addition to the /data_request/*-paths, the /latest_vehicle_data (caching the last vehicle_data server side) also got removed. These docs can be updated:

https://github.com/timdorr/tesla-api/blob/779fefb675e2684d1b7884430ab2c4de5c030854/docs/vehicle/state/data.md?plain=1#L216

The response from /vehicle_data also no longer contains the "legacy"-section.

If anyone knows where the /latest_vehicle_data went (maybe as a parameter on /vehicle_data ?), please do share.

SylvainGa commented 1 year ago

Which sucks since /vehicle_data returns way more data what the state API did. On devices with weak CPU (ie, watches), this makes a big differences in performance :-(

osheroff commented 1 year ago

@epologee hmmm where did you see the deprecation?

epologee commented 1 year ago

@epologee hmmm where did you see the deprecation?

I'm guessing/assuming Tesla added something of a deprecation flag internally, around the time when the API disappeared from the app's endpoints.json. For example the latest_vehicle_data disappearing was noticed mid-October '22, quite close to six months before it started giving 404s a few weeks ago: https://github.com/timdorr/tesla-api/pull/632/files#diff-9d20cb3bd494f28c6e31c35a37c65cb163d7bd7ec135bbb9319809ab8ad5b1f1L32

core-hacked commented 1 year ago

Adressed in PR #717 (Updated Documentation, Ruby implementation needs to reflect these changes)