I don’t know if it’s possible but I’m trying to forward my cat’s location (using Tractive integration) to the Traccar server using the rest_command.
I won’t pretend that I understand the API but it’s here. Specifically this part.
This is what I have at the moment, I’m not using any templates as I’m just trying to send the information to the traccar server.
url: http://trigkey.local:8080/api/devices/3
method: POST
headers:
username: traccar login email
password: traccar login password
accept: "application/json, text/html"
user-agent: "Mozilla/5.0 {{ useragent }}"
verify_ssl: false
payload: '{"id": 3,"name": "Alice","uniqueId": "729160","status": "online","disabled": false,"lastUpdate": "2019-08-24T14:15:22Z","positionId": 0,"groupId": 0, "phone": "string","model": "string","contact": "string","category": "string","attributes": {}}'
content_type: "application/json; text/html"
and here is the result I get from Services.
servlet: org.glassfish.jersey.servlet.ServletContainer-41f582ee
message: Bad Request
url: /api/devices
status: "400"
status: 400
If I go to this location
http://trigkey.local:8080/api/devices/3
I get a page with this
{"id":3,"attributes":{},"groupId":0,"calendarId":0,"name":"Jim","uniqueId":"729160","status":"offline","lastUpdate":null,"positionId":0,"phone":null,"model":null,"contact":null,"category":null,"disabled":false,"expirationTime":null}
And because I have it, here’s a section of my traccar log.
2024-02-19 22:13:03 INFO: [T664b87ca: gnx < 172.18.0.1] 2a310d0a24340d0a696e666f0d0a
2024-02-19 22:13:06 INFO: [T664b87ca] disconnected
2024-02-19 22:13:18 INFO: [T2c58bcb0] connected
2024-02-19 22:13:21 INFO: [T2c58bcb0: gnx < 172.18.0.1] 00000031ff534d4272000000000000000000000000000000000000000000000000000100000e00024e54204c4d20302e3132000200
2024-02-19 22:13:24 INFO: [T2c58bcb0] disconnected
2024-02-19 22:13:24 INFO: [Td470386b] connected
2024-02-19 22:13:24 INFO: [Td470386b: gnx < 172.18.0.1] 0000006efe534d4240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000400010000000000000000000000000000000000000000000000000000000000000002021002000302031103
2024-02-19 22:13:27 INFO: [Td470386b] disconnected
2024-02-19 22:13:39 INFO: [T1552c554] connected
2024-02-19 22:13:42 INFO: [T1552c554: gnx < 172.18.0.1] 160301010a010001060303aa4a7097161c1337aa0145910449006e72a9a609433ba94e9c011130e1c1576c20f6d4e79bdb415dc0311c3466745d7b4e25760dc285df1c460eeca24679bd3729003cc02bc02fc02cc030cca9cca8c009c013c00ac014009c009d002f0035c008c012000ac024c028c023c027003c003dc007c0110005000413011302130301000081000500050100000000000a000a0008001d001700180019000b00020100000d001a0018080404030807080508060401050106010503060302010203ff010001000017000000120000002b000b0a03040303030203010300003300260024001d00203fd7df69fe2cdad15b644b6d5f3eb9d4f66d63bcff092feb918cc36fe7917f73
2024-02-19 22:13:48 INFO: [T1552c554] disconnected
I’ve been at it all day and getting nowhere.
Thanks