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? 
0 Comments   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity


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
Red Belt

  • Awesome. Exactly what I need. Thanks for the answer.
Please log in to comment