Thank you for your reply.
Yes, I realized about my mistake and the code was working with the edit I mentioned.
Also, is it possible to retrieve data from the new API portal directly?
From the screenshot you posted in the beginning of this post, it seems like the website has changed.
FYI - the currently deployed version of our API documentation does not work properly.
It uses an incorrect url, which means that you can use the documentation, but sending requests interactively from the api documentation does not work.
EDIT: It has been fixed
@iipr So yes, you can request data directly from the documentation
Yes the website has changed, we will update the getting started guide shortly
Yes, the API was changed, however there have been some complications with that change, so it will be reverted back. The endpoint path will likely* be the same as before (https://api.autopi.io/logbook/most_recent_position) and there will still be the one that fetches all devices’ recent positions.
* You can always refer to the latest API documentation here as it is autogenerated and you can be sure the paths are up to date.
Most of the API examples I have found are for historical data (between dates XXX and YYYY), but what im interested in is getting current/latest data. Is this possible? I know that /logbook/most_recent_positions/ can do that for latest position, but is is it possible with battery voltage and obd data?
I’ve created a Postman collection containing all the endpoints along with step by step install instructions on how to get a token and apply it to Postman. Should save a lot of head scratching for newies.