![traccar local server address for api traccar local server address for api](https://d585tldpucybw.cloudfront.net/sfimages/default-source/blogs/2020/2020-12/tcpip.png)
< Content-Type: application/json charset =UTF-8 > Accept: */ * > Cookie: JSESSIONID =xxxxxxxx > * upload completely sent off: 81 out of 81 bytes
![traccar local server address for api traccar local server address for api](http://files.smashingmagazine.com/wallpapers/june-15/strawberry-fields/nocal/june-15-strawberry-fields-nocal-1280x1024.jpg)
> * upload completely sent off: 109 out of 109 bytes By default application is configured to use free Traccar service (address -, port - 5055). It reports location to your own or hosted server with selected time intervals. For POST requests body should contain method arguments. Traccar Manager is an app that allows you to use your mobile device as a GPS tracker. 3) Both POST and GET methods are supported. 2) API exposes all methods from DataService interface Each method is available by URL, for example login method is available at /traccar/rest/login URL. > Accept: */ * > Cookie: JSESSIONID =xxxxxxx 1) Prefix for all method calls is in /traccar/rest. POST /traccar/rest/getPositions HTTP/1.1 > Accept: */ * > Cookie: JSESSIONID =xxxxxxxxxx > * upload completely sent off: 25 out of 25 bytes > Content-Type: application/x-www-form-urlencoded
![traccar local server address for api traccar local server address for api](https://usermanual.wiki/Document/SQLWorkbenchManual.155696416-User-Guide-Page-1.png)
Below are examples of logging in an fetching data with curl (with demo site at ). Examples with cURLĪuthentication info is held in HTTP session, so you should have corresponding cookie in every request after logging in. For POST requests body should contain method arguments serialised in JSON array.
#Traccar local server address for api code
Please refer to mobile web UI javascript code as an example of working with current RESTful API 1) Prefix for all method calls is in /traccar/rest 2) API exposes all methods from DataService interface Each method is available by URL, for example login method is available at /traccar/rest/login URL 3) Both POST and GET methods are supported. For now authentication data is stored in HTTP session, so prior to any method call the login method must be invoked. Status code 200 means that request completed successfully, any different code means that it failed.ĥ) Method call results are serialised in JSON.Ħ) Most of method calls require authentication. For example: /traccar/rest/login?payload=Ĥ) Errors are returned as HTTP status codes. For GET requests JSON array must be provided as payload parameter.