Can't get "Update Device Variable" PUT to work


#1

Every time I attempt the PUT to update a device variable, I receive a 403 with the message “You do not have permission to perform this action.”

I use the same token in the header as was used to initially create the device so I’m not sure where the issue is occurring. For device_label and variable_label I am using the API Label as opposed to the name or GUID.

I have tried payloads ranging from just updating the name to copying and pasting the example from the API Docs.

Happy to provide more information/code as necessary to assist in figuring this out.

Thank you,

James


#2

Greetings, find below an example to update a device variable property:

curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: BBFF-XXX" \
-d '{"name": "demo"}' "https://industrial.api.ubidots.com/api/v1.6/variables/ID"

All the best


#3

I’d rather get the Update Device Variable PUT to work as described here because it appears that it should work with API Labels rather than needing variable GUIDs.


#4

hi there, it seems that there is an error with that specific endpoint, I will report it and once I get a solve alert I will come back with you.

Thanks for the report