get_devices
Retrieve and filter organizational device lists using advanced search parameters, pagination, and sorting to manage inventory effectively.
Instructions
Get a list of devices for an organization using advanced search and filtering.
Key Features
Combine query parameters (pagination, sorting) with body parameters (filtering)
Support for text search, field-specific filters, and complex queries
Pagination with cursor-based navigation
Example Usage
Find first 5 devices for user with email "someone@gmail.com":
Query: limit=5
Body: {"searchTerm": "someone@gmail.com", "searchFields": ["people.primaryEmail"]}
Pro Tips
1: Always make sure understand the definition of the fields (preset and custom fields) before using them.
2: If user search devices by category: pc, phone or other, please use body.type to filter devices by category.
3: Always to understand what are current sub types of the devices. If the user search information relate to sub types, Please use body.filters.["preset.subtype"] to filter devices by sub types.
4: We don't really need to use searchFields parameter to the search results in all fields, only use it when the user search information relate to specific fields.
5: If user want to filter devices by status, please use body.filters.["preset.status"].eq to filter devices by status.
5.1: Unassigned devices status should be "in_stock" or "decommissioned".
6: If user want to filter devices by preset fields or custom fields, please check the field.kind first, we only support date, number, dropdown kind of fields.
6.1: If the field.kind is date, please use body.filters.["preset.field_name"].minDate or body.filters.["custom.attributeCode"].minDate and body.filters.["preset.field_name"].maxDate or body.filters.["custom.attributeCode"].maxDate to filter devices by date range.
6.2: If the field.kind is number, please use body.filters.["preset.field_name"].minNumber or body.filters.["custom.attributeCode"].minNumber and body.filters.["preset.field_name"].maxNumber or body.filters.["custom.attributeCode"].maxNumber to filter devices by number range.
6.3: If the preset field field.kind is dropdown, please use body.filters.["preset.field_name"].eq or body.filters.["custom.attributeCode"].eq to filter devices by dropdown value.
7: Combine multiple filters examples: {"preset.status":{"eq":"active"},"preset.subtype":{"eq":"desktop_pc"},"custom.custom_xxx":{"eq":"1"},"custom.dt_13":{"minDate":"2025-12-23","maxDate":"2025-12-25"},"custom.drp_4":{"eq":"1"}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of items to return per page | |
| cursor | No | Base64-encoded cursor for pagination | |
| sortBy | No | Sort by field. Format: `<preset | custom>.<unique field name>` or `people.displayName` | |
| sortOrder | No | Sort order for the results | |
| expands | No | Expand other datasets when fetching devices | |
| peopleId | No | Filter devices by the people ID assigned to them | |
| type | No | Filter devices by device type | |
| employeeStatus | No | Filter devices by the employment status of the assigned person | |
| searchTerm | No | Search term to filter devices | |
| searchFields | No | Array of field names to search within when using searchTerm. Supports memo, people fields, preset fields, and custom fields | |
| filters | No | Advanced filters. Keys look like `preset.<unique field name>`. There are certain extra virtual fields, such as `$age` |