How do I apply a label to a machine via API?
All,
Is there a way to apply a label to a machine via API? I thought I could do it by updating the inventory of the device like so:
PUT /api/inventory/machines/1023
(json_payload) = { "Machines": [{ "Id": "1023", "Label": [{ "ID": "162" }] }] }
(Label 162 is a real label ID for a label we created, and machine ID 1023 is my own machine, so I know those are valid values and I have used them in queries.)
And in fact, the response after the attempt is:
{'IDs': ['1023'], 'Result': 'Success'}
But reviewing the machine inventory (via the web or via API) reveals that nothing has changed.
I've reviewed the API reference document, but have not found anything detailing how an update should be performed. What am I missing?
Thank you
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
Stepan
1 year ago