Liongard icon

Liongard

Get data from the Liongard API

Asset Inventory → Get Devices

AI-generated

Summary

Retrieve a list of devices from a specified Liongard environment's asset inventory with optional filtering and sorting.

Inputs

  • Environment (required) — Select the environment to query devices from, either by choosing from a list or entering the environment ID.
  • Return All — Choose whether to return all device results or limit the number returned.
  • Limit — Set the maximum number of device results to return when 'Return All' is false.
  • Additional Fields — Optionally filter devices by fields like Alias, Class, Hostname, Inventory State, or Location using various operations. Also optionally sort devices by these fields in ascending or descending order.

Output shape

a list of device objects from the asset inventory for the specified environment

If 'Return All' is false, results are limited to the specified 'Limit'; otherwise all matching devices are returned. Filtering and sorting are applied as specified. Errors or partial results depend on API response.

Examples

Example 1: Get all devices from environment ID 1234 with Hostname starting with 'srv' and sorted alphabetically by Alias.

Set Environment by ID to '1234', add a filter for Hostname starting with 'srv', enable Return All, and add sorting by Alias ascending.

Discussion