DataLab saved queries
A saved query is a DataLab selection stored with a name, plus the actions configured to run on what it finds.
People build and save queries in Operator's DataLab, and arrange them in groups. Dashboards, Navigator menu items and other queries refer to saved queries. You can read about the Navigator menu item in Item: DataLab query.
This article will cover how to manage saved query and query group records. The selection they hold is described in DataLab queries, and the actions in DataLab actions.
Data model
Below is the core data model for a saved query. You can save a record without populating the action.
Matching action
"MatchingEntitiesAction" holds the action Operator runs on the primary selection, and optionally a secondary selection with its own action. Operator runs the primary action with "PrimarySelectionCriteria" as the "PrimarySelection", and the secondary action with both selections. The server stores the object as given and only reads it to set "IsActionable".
Requesting saved queries
The list is ordered by name and leaves out "PrimarySelectionCriteria" and "MatchingEntitiesAction". Get a query by ID or Key for the full record.
Get a list of saved queries
Get a saved query by ID or Key
Create and update saved queries
An update only changes the fields you send. A Key another saved query already uses is refused.
Create or update a saved query
Delete a saved query
We don't provide any bulk deletion but you can delete by record ID. Deleting an ID that does not exist still succeeds.
Delete a saved query
Query groups
A query group is a named folder for saved queries in Operator. A query joins a group through its "QueryGroup.ID".