KACE Product Support Question
Query Labels from KACE API
03/05/2018 921 views
Is this possible?
I'd like to use the API to return a set of machines for a given label. I don't see anything in the documentation that shows how one would fetch this data, if it is possible.
We'd like to use this for integration with other automation workflows in our environment.
I know how to do this using a MySQL client, but I'd prefer to use the REST API so I don't have a Sql dependency.
Can anyone point me in the right direction?
Community Chosen Answer
Please log in to answer
You want to use a filter on label.name:
/api/inventory/machines?filtering=label.name eq Library Services
In the API reference guide there is a list of Definitions at the end of the Inventory API Reference section. Those definitions define what you can use to filter the results. For instance, the machine schema contains many of the columns from the MACHINE table and this API query will return machines where the OS_Name contains macOS:
/api/inventory/machines?filtering=machine.os_name co macOS
Answered 03/06/2018 by: chucksteel