list_sessions
Retrieve active user sessions in a Horizon VDI environment with filters for user, desktop pool, machine, client, or state. Supports pagination to fetch all results.
Instructions
List active user sessions in the environment.
Common filter fields: user_name, desktop_pool_id, machine_name, client_name, state. Session states: CONNECTED, DISCONNECTED, PENDING.
Returns {items, count, page, size, pages_fetched, has_more, next_page, truncated}. If has_more is true there may be more results: call again with page=next_page (or narrow the filter), or pass fetch_all=true to fetch pages automatically (stops after 10 pages or 5000 items and sets truncated=true). Never treat a result with has_more=true as the complete list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (1-based) | |
| size | No | Results per page (max 1000) | |
| filter | No | Horizon filter JSON string. Example: {"type":"Equals","name":"desktop_pool_id","value":"<id>"} or {"type":"Equals","name":"user_name","value":"jsmith"} | |
| sort_by | No | Field to sort by, e.g. user_name, start_time | |
| order_by | No | Sort direction: ASC or DESC | |
| fetch_all | No | Fetch successive pages automatically (up to 10 pages / 5000 items). Prefer a filter when you only need a subset. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||