Hi
I have problems with removing historic data. Once historical data is removed, the API /api/positions no longer works after reboot.
From the forum, I learnt that I can use the conf parameter database.historyDays to define the number of days of historic data to keep.
After I setup the configuration file and restart traccar, everything works well and old data is removed from the database until I reboot my Linux box.
After reboot, web interface works perfectly fine but the API /api/positions no longer works. Whenever the page is accessed, a INVALID RESPONSE error (error 400) is returned. Other APIs such as api/devices are working just fine, only the positions API is not running.
I have to restore a backup of the traccar database before any data is removed in order to recover the API.
Manually removing data from the positions table in the database using sql command (I am using mysql) also results in similar failure.
My version of traccar is 3.16 and mysql 5.7.25.
Any help is highly appreciated.
Thank you.
Kenneth
The error has nothing to do with removing data. You should send Accept header with your API call.
I already read that forum thread before posting mine.
I tried calling the API using my browser and it can return positions data without any problem. Once the data is removed and the server rebooted, the same API on the same browser just don't work. After restoring the data, it works again.
It doesn't look like to be the problem with the Accept header. If it is, the API should not work on my browser at the first place.
I know for a fact that it is.
Hi
I have problems with removing historic data. Once historical data is removed, the API /api/positions no longer works after reboot.
From the forum, I learnt that I can use the conf parameter database.historyDays to define the number of days of historic data to keep.
After I setup the configuration file and restart traccar, everything works well and old data is removed from the database until I reboot my Linux box.
After reboot, web interface works perfectly fine but the API /api/positions no longer works. Whenever the page is accessed, a INVALID RESPONSE error (error 400) is returned. Other APIs such as api/devices are working just fine, only the positions API is not running.
I have to restore a backup of the traccar database before any data is removed in order to recover the API.
Manually removing data from the positions table in the database using sql command (I am using mysql) also results in similar failure.
My version of traccar is 3.16 and mysql 5.7.25.
Any help is highly appreciated.
Thank you.
Kenneth