Traccar reports API on windows error, weird characters as a response, is this a bug?

clone2 months ago

Hi, I installed a Traccar on window server. Everything seems to work fine. But when i tried to check the api/reports/route (inluding the other reports api), instead of json response i got this weird looking characters, i use postman by the way to test the api. Can you help me with this? or is this a bug? Thanks

Screenshot 2024-09-15 231419.png

Anton Tananaev2 months ago

Not a bug. You just forgot to include an appropriate Accept header in your request.

clone2 months ago

Thank you. It's returning the correct data now. By the way, I've noticed that if I don't specify the device/group ID, the result displays no data. I assumed that it should return all the data if there is no device/group ID specified. I got it working using this.

/api/reports/route?from=2024-09-15T01:00:00Z&to=2024-09-15T20:00:00Z&deviceId=1&deviceId=2&deviceId=3
Anton Tananaev2 months ago

You have to specify devices and/or groups explicitly.