/build/static/layout/Breadcrumb_cap_w.png

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)

Posted by: AbhayR 5 years ago
Red Belt
1
Currently there is no API to assign a label to device
Posted by: Stepan 8 months ago
White Belt
0

Dear @AbhayR, 

Is it still not supported?

It would make my life much easier. 
Maybe some workaround like write a Custom Inventory Field via API and then assign smart label based on this? (asking because hadn't found a way to write Custom Inventory Field as well).

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ