Session endpoint.
Thank you Anton
Hmm
Execute(sync)[http://demo.traccar.org/api/session]: The remote server returned an error: (404) Not Found.
That means you are not logged in.
It works in browser, but via API returns 404. But other calls work (server, devices, geofences, etc)
And even in browser Attributes are empty:
{"id":1520,"attributes":{},"name":"alexbk66",
Empty means default.
I did set units, but in browser was getting empty. But after setting other user Preferences (i.e. Map Layer) - the units now appear in Attributes:
{"id":1520,"attributes":{"distanceUnit":"km","speedUnit":"kmh","volumeUnit":"ltr"}
But via API I still get 404 for session
Do I actually need to create a new session in API first?
Yeah, I create a session and it returns attributes.
Thank you Anton.
PS. Probably there's a bug - if you create a new user and set user attributes - the attributes are not reported via API - unless you set any other user Preferences
Feel free to create a ticket on GitHub for the bug.
Anton,
So I'm reading the units in the user attributes (i.e. km) - but it looks like all distance values from API are in "m"?
So how do I know what are the actual units in API for Distance, TotalDistance, Altitude, Accuracy, Speed?
I get that the measurement units are reported in User Attributes, but I can't find how to get the current User?