Traccar website uses the same API, so it can't be different. You must be using different parameters in the request.
I'm positive that Im using the correct parameters,
For the API I'm using (/api/reports/route?) and the parameters I'm using are (sessionId, deviceId, from, to) and this is the result I'm getting, Result
Data from database query,
and this is the data I'm getting from the Traccar website,
None of the data in the SS above, are shown through the APIs
You haven't provided any screenshot of the parameters you are using. Please provide screenshots for both options.
Screenshot of the API result,
php request code,
header('Content-Type: application/json');
include('traccarApi.php');
$a = gps::login("SmartConnect", "Abc@1234");
$traccarCookie = gps::$cookie;
$b = gps::reportRoute($traccarCookie, "72", '2021-11-15T10:00:01Z', '2021-11-15T12:40:59Z');
$response = $b->response;
$decoded = json_decode($response);
print_r($decoded);
php function,
public static function reportRoute($sessionId,$deviceId,$from,$to){
$data='deviceId='.$deviceId.'&from='.$from.'&to='.$to;
return self::curl('/api/reports/route?'.$data,'GET',$sessionId,'',array());
}
Data through web
And you are in UTC timezone? What does the actual request look like? URLs.
I think this is what you are asking for right?http://52.203.222.155:8082/api/reports/route?deviceId=72&from=2021-11-15T10:00:01Z&to=2021-11-15T12:40:59Z
That looks like what you send from PHP. What about the browser? Please provide a screenshot.
Yes it's PHP, I'm using chrome, do you need a screenshot of the browser?
I need a screenshot of the API request from the browser. You should be able to find it in the network console (developer tools).
Directly requesting the URL
Requesting the URL through CURL PHP
Also this is an SS of the database
This APIs shows exactly what is in the database but the traccar web application show more data than that. Also I know for a fact that the vehicle was running till at least 05:00 pm. Really a mystery!
And where's the one I keep asking for - screenshot from Traccar?
Sorry, screenshot from traccar,
Is this a joke? I give up.
I'm sorry but I didn't understand what you are asking for. I'm not a very experienced technical person. Can you please just explain me what you need in order to help me. I'd be so much grateful for your help.
Dear Users,
Please see if you can answer my question. I recently wanted to get some data through the APIs and found out that the data sent through the APIs contained much less data then the report I was able to generate with TRACCAR (this was data from the previous date). Then I went in and queried the database which showed the same amount of data as the API provided me. This was a Route report I tried to generate. My question is, how come TRACCAR Website shows more position data then what is currently in the database.