My Traccar Server returning empty api response

Jacky2 years ago

Hello All
I have an odoo system that runs scheduled chron jobs to fetch device locations using the '/reports/route' api.
When test connected this to my account on the one of the Traccar Demo servers, everything works fine and get the responses with route data into my odoo system.
But when I connect this to my self-hosted Traccar server I get no data back in the responses at all. Seems like its an issue from the way i set it up, but the past few days of troubleshooting, researching and trying things out I still can't figure it out and resolve this.
Tested on Postman, though both the Traccar demo server and my traccar server look to return empty json responses.

I installed my Traccar server following the the Linux installation Digital Ocean guide linked in the Documentations section, and also tried the PostgreSQL guide so my traccar.xml file would be same as listed there.
Would anybody be able to share from their experiences and help me to understand what i may be doing wrong ?
Thanks in advance.

Anton Tananaev2 years ago

Do you see the result in the web app? Because it uses the same API. You can compare the requests.

Jacky2 years ago

Hi Anton
Results are there in web app for both the Demo server and my own server. But the chron job only requests successfully from the Demo server and not my own. I cant work out why

Anton Tananaev2 years ago

If request is exactly the same, the issue is likely permissions. If a user doesn't have access to a device, it will return an empty list.

Jacky2 years ago

yes, though in this case the chron job is using the credentials of the correct user that has access to devices

Anton Tananaev2 years ago

Then we're at square one and you have to compare requests. The web app is using exactly the same API, so there won't be any difference.