Avatar

Set Device Api call not saving disableBuzzer immobilizeUnit and immobilizeArming fields

0

 Hi all,

i'm trying to set immobilizeArming, immobilizeUnit, disableBuzzer with this api call in POST:

https://<server>.geotab.com/apiv1/

and this parameters:
 
{"method": "Set","params": {"typeName": "Device","entity":{"immobilizeArming":60,"immobilizeUnit":true,"disableBuzzer":false,"id": <vehicle id>,"name":"name from api"},"credentials":{"database": <database>,"sessionId": <sessionId>,"userName": <username>}}}

the response is:

{"jsonrpc" : "2.0"}

 

The device name changes but not immobilizeArming, immobilizeUnit, disableBuzzer fields

I'm missing something?

Thanks

Simone Borgnese

Please sign in to leave a comment.

1 comment

0
Avatar

Hello Simone,

We recommend grabbing the object you are trying to modify before setting it. Here is a sample in JS:

api.call("Get", {"typeName": "Device"

}, function(result) {
    let temp = result[0];
    temp.immobilizeArming = 60;
    temp.immobilizeUnit = true;
    temp.disableBuzzer = false;
    api.call("Set", {"typeName": "Device",
        "entity": temp
    })
})

Wajih Qazi 0 votes