You probably missed this part from the documentation:
REQUEST BODY SCHEMA: application/json
hi,
well noted (REQUEST BODY SCHEMA: application/json) thanks , I made the adjustment and put it similar code to the post session which is in react native.
but not working.
resquest
deviceId=5&type=custom&attributes=%7B%22data%22%3A%22ST300CMD%3BRes%3Bnumber_device%3B407%3BDisable1%22%7D
obs: number_device = my number ok i change. attributes = '{"data":"ST300CMD;Res;number_device;407;Disable1"}',
request reader
content-type. application/json;charset=UTF-8
response header
access-control-allow-methods GET, POST, PUT, DELETE, OPTIONS
Content-Length 240
Content-Type text/plain
Date. Sun, 09 Oct 2022 15:18:44 GMT
access-control-allow-credentials. true
access-control-allow-headers origin, content-type, accept, authorization
access-control-allow-origin *
Server J etty(10.0.7)
it is necessary to send the 'id' field ??
hi,
I made the following adjustments and now I get the Status Code 200 response.
content-type. application/json;charset=UTF-8
var details = {
'deviceId': 5,
'type': 'custom',
"attributes": {"data":"ST300CMD;Res;device_number;407;Enable1"}
};
body: JSON.stringify(details)
it worked had to adjust to the correct command
Hi,
I'm using react native
New Session Login - OK
Use GET to
http://xx.xx.xx.xx:8082/api/commands/send?deviceId=0
. - OKbut not workign command send
I looked at the documentation but I still can't pass the correct command
https://www.traccar.org/api-reference/#tag/Commands/paths/~1commands~1send/post