Search items
glpi_searchFind GLPI tickets, users, changes, problems or assets using field-based criteria to filter, sort and list matching records.
Instructions
Search GLPI items with criteria. itemtype: Ticket, User, Change, Problem, Computer, etc. Each criterion is {field, searchtype, value, link}: field = search option ID, searchtype = contains | equals | notequals | lessthan | morethan | under, link = AND | OR (omit on the first). Rows come keyed by the search option names in the GLPI user's language ('Título', 'ID', 'Status'...); coded columns (status, priority, urgency, impact, type, approval) hold the GLPI label and the code sits beside it as ' (id)' (e.g. 'Status': 'Solucionado', 'Status (id)': 5). named_columns=false returns the raw search keyed by option ID ('1', '2'...). Use glpi_list_search_options to discover the option IDs for criteria, forcedisplay and sort.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Search option ID to sort by (e.g. 19 = last update on Ticket) | |
| order | No | Sort direction (default asc) | |
| range | No | Pagination range, e.g. 0-49 | |
| fields | No | Field set: 'essential' (default, trims internal GLPI fields) or 'all' | |
| format | No | Output format: 'json' (default) or 'markdown' (a table for listings, key/value lines for one item; returned in both the text and the structured result) | |
| criteria | No | Array of {field, searchtype, value, link}; a group is {link, criteria: [...]} (e.g. requester OR technician) | |
| itemtype | Yes | Item type, e.g. Ticket, User, Change, Problem | |
| forcedisplay | No | Search option IDs to add as columns | |
| named_columns | No | Key each row by search option name, coded values labelled (default true); false = raw, by numeric option ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| note | No | Pagination hint: how to fetch the next page | |
| count | No | Items in this page | |
| total | No | Total matching items in GLPI (all pages) | |
| format | No | 'markdown' when data holds the markdown rendering |