Hi,
I have tested the api but don't get expected resulted.
Here is how I tested via chrome extension called RESTlet Client,
url => https://webAddress/api/devices/214565766/{'deviceId':1168, 'totalDistance': 0, 'hours': 0}
As I don't know what does {id} mean (I don't see description about it), I guess it might be the 'id' from tc_positions or 'deviceId' and tested both.
As for accumulators, the documentation says it an object of 3 properties('deviceId', 'totalDistance', 'hours').
I provided admin account for authentication and application/json as Content-Type.
The response is HTTP 404 Not Found - NotFoundException (...)
and no data is updated.
Thanks.
Sorry I forgot to mention that I used 'PUT' method.
Your URL doesn't make any sense to me. Why is JSON embedded in the URL?
Hi Anton,
The api url is /devices/{id}/accumulators
. If I want to update total distance, how do I set the url?
Check what official web app sends, if documentation is not enough.
Hi,
I have tested the api but don't get expected resulted.
Here is how I tested via chrome extension called RESTlet Client,
url =>
https://webAddress/api/devices/214565766/{'deviceId':1168, 'totalDistance': 0, 'hours': 0}
As I don't know what does {id} mean (I don't see description about it), I guess it might be the 'id' from tc_positions or 'deviceId' and tested both.
As for accumulators, the documentation says it an object of 3 properties('deviceId', 'totalDistance', 'hours').
I provided admin account for authentication and application/json as Content-Type.
The response is
HTTP 404 Not Found - NotFoundException (...)
and no data is updated.Thanks.