3.15 Command API stopped working

maxw3ll 8 years ago

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 :-(

Anton Tananaev 8 years ago

Commands API has changed in 3.15. Please read documentation and check official app to see how new API works.

maxw3ll 8 years ago

Thanks, found it. The new URL is /api/commands/send