Getting started
Read device and user inventory
List managed devices and users in your Trio company, filter users, and retrieve subsequent pages.
Use the Inventory API to collect managed devices and users for your company. Start with an Inventory
API key and set TRIO_API_KEY and TRIO_API_URL for your region as shown in the
Quickstart. Send the key in the X-API-Key header. Trio
determines the company from that key. To list users, the key's owner must also have permission to
read users.
List managed devices
Request the first 50 devices and read each device from the response's items array.
curl --fail-with-body --get \
--header "X-API-Key: ${TRIO_API_KEY}" \
--data-urlencode 'limit=50' \
--data-urlencode 'offset=0' \
"${TRIO_API_URL}/external/v1/devices"See List devices for the available device fields and error responses.
Find users
Request the first 50 users matching alex whose accounts are active or pending. curl encodes the
query values before sending them.
curl --fail-with-body --get \
--header "X-API-Key: ${TRIO_API_KEY}" \
--data-urlencode 'q=alex' \
--data-urlencode 'status=active,pending' \
--data-urlencode 'limit=50' \
--data-urlencode 'offset=0' \
"${TRIO_API_URL}/external/v1/users"The users endpoint accepts two optional filters. Omit both to list users without filtering.
| Filter | Accepted values |
|---|---|
q | Up to 200 characters, matched against the name, email, or username. |
status | active, inactive, pending, deactivated, or blocked. Separate multiple values with commas. |
See List users for user fields and error responses.
Retrieve the next page
Both endpoints return items, total, and the limit and offset the server applied. Process the
current page, then calculate the next offset as response.offset + response.limit. If that value is
at least response.total, you have reached the last page.
For example, if the response returns offset: 0, limit: 50, and total: 128, request the same
endpoint with offset=50 for the next page. Keep the same q and status values when paging through
filtered users. Calculate again from each response rather than incrementing by the page size you
originally requested, which the server may have adjusted.