After upgrading to 3.15 sending commands via the API stopped working. I can get the devices, positions,... but when sending a custom command Traccar API responds with "400 Bad Request".
This is the command (as curl, some parts obfuscated):
curl 'https://server-url/api/commands'
- H 'Accept-Encoding: gzip, deflate'
- H 'Accept-Language: de-DE,en-US;q=0.9'
- H 'Authorization: ***=='
- H 'Content-Type: application/json'
- H 'Accept: application/json, text/plain, */*'
- H 'Connection: keep-alive'--data - binary '{"deviceId":522,"type":"alarmArm"}'--compressed
Running the curl command I get this response:
Column 'description' cannot be null - MySQLIntegrityConstraintViolationException (... < QueryBuilder:477 < DataManager:451 < BaseObjectManager:87 < ...)%
Just to make sure I did not mess up the database through previous releases I reinstalled 3.15 on a fresh image, with a new empty traccar mysql database. Same result :-(
Commands API has changed in 3.15. Please read documentation and check official app to see how new API works.
Thanks, found it. The new URL is /api/commands/send
After upgrading to 3.15 sending commands via the API stopped working. I can get the devices, positions,... but when sending a custom command Traccar API responds with "400 Bad Request".
This is the command (as curl, some parts obfuscated):
Running the curl command I get this response:
Just to make sure I did not mess up the database through previous releases I reinstalled 3.15 on a fresh image, with a new empty traccar mysql database. Same result :-(