Using the API to rename a property (on a group)?
All,
I want to rename a property on a group using the API.
I see the verbs for /device/groups/{gid}/properties/ ..... POST and GET.
I see the following verbs for /device/groups/{gid}/properties/{name} ..... PATCH, DELETE, GET, PUT.
I'm currently using a stored procedure that uses PUT and POST to set or update properties by name, buy building a short json body with the name and the value, and then doing a PUT to create the property, and if an error comes back, depending on the error, doing a POST.
But I'm not actually sure how to RENAME the property itself.
Would i need to do a GET to obtain the value, then do a DELETE on the property, and then do the PUT with the value I retained?
Or is there a one-step rename option somewhere in the API? Basically, I'm hoping there is a way to update in 1 step instead of 3.
Thanks!
- Anonymous3 years ago7 minutes ago, Lewis Beard said:
Would i need to do a GET to obtain the value, then do a DELETE on the property, and then do the PUT with the value I retained?
That's how I would do it. No one step that I know of.