Well, your JSON is invalid and the error message tells you exactly where the problem is.
Hi Anton,
So below body is the correct way?
{
"id": 0,
"deviceId": 249,
"description": "new",
"type": "custom",
"attributes": {"'data'": "setparam 11807:1" }
}
Are you kidding me?
Hi Anton,
I am really not sure how to sort it, after adding the quotes, "'data'", I received a 200 ok response so thought it was sorted.
Please point me in the correct direction.
Can you please explain why you have triple quoting there. Where on earth did you get it from?
Hi Anton,
I now have it as double quotes and get a 200 ok response but the parameter is not changed on the device. Below is the body.
{
"id": 0,
"deviceId": 249,
"description": "new",
"type": "custom",
"attributes": {"data": "setparam 11807:1" }
}
Hi Anton,
I've sorted it, thanks. I've used a parameter that was not configurable via command. The one below worked. Thanks for the help.
{
"id": 0,
"deviceId": 249,
"description": "new",
"type": "custom",
"attributes": {"data": "setparam 13501:1" }
}
Hi Anton,
I am trying to send a command to a Teltonika device from Postman but get error
Below are the body of the command. I have tried many other ways but cannot get it to work. Please assist.
{ "id": 0, "deviceId": 249, "description": "new", "type": "custom", "attributes": {data: "setparam 11807:1" } }