Matrix42 data query
data_queryRead records from your Matrix42 instance with validated ASQL queries, saved views, and object lookups. Retrieve data safely and accurately without modifying anything.
Instructions
Read records from the connected Matrix42 instance (read-only). action='asql_guide' explains the ASQL expression language used by 'where' and 'columns' — read it before writing a filter. action='validate_asql' checks an expression against a class and reports the exact error; validating is cheaper than a failed query. action='query' returns rows of one data definition, with typed column metadata, an ASQL 'where' filter, 'columns' projection, 'sort', and paging. action='get_fragment' returns one complete fragment by id; action='get_object' returns a whole object by configuration-item name and object id. action='list_views' lists the instance's saved data queries — curated, named views that already carry a predefined filter — and action='run_view' runs one; prefer a matching view over hand-written ASQL. action='list_journal' returns an object's comment timeline and action='list_attachments' its files. NEVER guess attribute names: read them with schema_discovery(describe_data_definition) before writing 'columns' or 'where', and use get_pickup_values for the valid values of any pickup you filter on.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 1-based page number (default 1). | |
| sort | No | Sort expression, e.g. 'CreatedDate DESC'. Pass one whenever you page — without it, page boundaries are not stable. | |
| class | No | Internal name of the data definition to read, e.g. 'SPSActivityClassBase'. Required by query, get_fragment and validate_asql. | |
| where | No | ASQL filter expression, e.g. "Subject LIKE '%printer%' AND T(SPSCommonClassBase).State.Value = 710". | |
| action | Yes | Which data operation to perform. | |
| search | No | Filter saved views by name, description or class (list_views), or free-text search within a view (run_view). | |
| verify | No | For action='deep_link': resolve the object's real configuration item first, so a dead link is reported rather than handed over. Defaults to true; set false only to build a link for an id this instance cannot resolve. | |
| ci_name | No | Configuration item internal name, e.g. 'SPSActivityTypeIncident'. Required for action='get_object'. | |
| columns | No | Comma-separated ASQL column expressions, e.g. 'ID,Subject,[Expression-ObjectID]'. Use only attribute names reported by schema_discovery(describe_data_definition) — guessed names fail. Aliases are supported ('expr AS Name'). ID is added for you; do NOT request DisplayString (it is returned automatically and cannot be selected explicitly). Omit entirely for Matrix42's default columns. | |
| view_id | No | Id of a saved data query. Required for action='run_view'. | |
| embedded | No | Hide the surrounding navigation, for embedding the page elsewhere. | |
| action_id | No | Action or wizard to run, for view_type='action'. | |
| dialog_id | No | Open a specific dialog instead of the default one. | |
| object_id | No | Object id — the value of [Expression-ObjectID] on a row. Required for get_object, list_journal and list_attachments. | |
| page_size | No | Rows per page (default 25). | |
| view_type | No | For action='deep_link': how to open the object. 'preview' (default) is read-only, 'edit' opens the form, 'new' a creation form, 'action' a wizard. Only 'new' works without an object_id. | |
| expression | No | The ASQL expression to check. Required for action='validate_asql'. | |
| application | No | UUX application hosting the creation form, e.g. 'ServiceDesk'. Used by link_kind='create'. | |
| fragment_id | No | Fragment id. Required for action='get_fragment'. | |
| link_view_id | No | Show only one page of the dialog, for action='deep_link'. | |
| preset_params | No | Values to pre-fill a creation form, keyed by data definition then attribute, e.g. {"SPSActivityClassBase":{"Initiator":"<user fragment id>"}}. |