Saved Queries (Devices)
  • 5 Minutes To Read
  • Print
  • Share
  • Dark

Saved Queries (Devices)

  • Print
  • Share
  • Dark

The Devices page displays the query name above the search bar along with the query status that indicates if a new query is unsaved or if a saved query has been edited.

After building a new query or updating an existing one, you can save the query and add it to the Saved Queries list for future and advanced usage.


Saving a New Query

To save a new unsaved query, click Save as next to the query name. A “Save as” popup is displayed in which you can define the new saved query name, description and the query access.

A saved query can have private or public access. Private saved queries are only visible for the current user and can only be used in Saved Queries page and in My Dashboard space. Public saved queries can be viewed by all users and can be accessed everywhere in the system (Dashboards, Enforcement Center, Reports, Query Wizard).

The permissions: Create saved query, Edit saved queries, Run saved queries and Delete saved query - All apply on public saved queries only. Private saved queries can always be created, edited, run and deleted.

Saved queries consist of two main elements:

  • Query filter – which displays the collected devices alongside their details according to the filter imposed
  • Query view – when saving a query, the current selected columns, as determined by the Edit Columns popup alongside the collected devices details. The Query view is used for every future usage of that saved query to display the same “view” of selected fields in the table.
The “view” is saved as part of the saved query. It doesn’t impact the filtered devices data - only the data that is visible in the query results table.

Running a Saved Query

Once a query is saved you can use and run it from the Saved Queries page or from the Saved Queries list in the Query Search Bar.

Saved Queries List in the Query Filter Bar

In the Devices page, click the Query search bar. The drop-down list displays list of saved queries and history of the query executed in Axonius.
To run a saved query, use the vertical scroll to select the desired saved query. Then click it to execute.


You can use the Query Search Bar to search for saved queries by name.

Updating an Existing Saved Query

After opening a saved query, in the Devices page, you can do the following:

  • Rename a saved query by a single click.
  • Save - Update the saved query you are working on.
  • Save as - Save the query results as a new saved query.
  • Discard Changes - Undo any changes made on the saved query you are working on and reload the saved query.
  • Reset - Reset the page to its default column view and with no filtering, resulted in all devices/users being displayed.


Working with the Saved Queries Page

To open the Saved Queries page, in the Devices page, click Saved Queries on the top right corner above the query results table.

The Saved Queries page opens, displaying all the saved queries for devices entities details:

  • Name - The saved query name.
  • Associated tags - The saved query associated tags, if exists.
    • The Tags filter lets you select one or more tags from a list of all the tags associated with the saved queries. The filter will display only the saved queries tagged with at least one of the selected tags.
  • Access - The access of the saved query.
    • Private - Only the user can view this saved query. It can only be used in Saved Query page and in My Dashboard space.
    • Public - All users can view this saved query. It can be used in all Dashboard, Enforcement Center, Reports and Query Wizard.
  • Last Updated - The date and time the saved query has been updated.
  • Updated By - The user made the last update to the query.
    • The user name is displayed with a prefix:
      • Internal - If the user has been defined internally in Axonius by one of the system admins.
      • SAML or LDAP - If the user has logged in using LDAP or SAML based login option.
    • If the user no longer exists in the system, the displayed user name will be displayed with a “(deleted)” suffix.
    • Hover over the field to display the user first and last name in addition to the user name, if exist.
    • For predefined saved queries, that have been preconfigured by Axonius, the Updated by value is Predefined.

The total number of saved queries is displayed on the top left side of the table:


Saved Query Details Drawer

To view its details, in the Saved Queries page, click a saved query record. This drawer lets you:

  • View and edit the following saved query details:
    • Name
    • Description (optional, limited to 300 characters)
    • Associated tags
    • Always keep Cached
  • View the following saved query details:
    • Query Wizard expressions
    • Last updated
    • Updated by
  • Run a query. The Run Query button executes the query and displays its result in the Devices / Users page.
  • Create a new enforcement set using the saved query as a trigger.
    The Enforcement Set Configuration page opens, enabling you to create a new enforcement set for the selected query that is already automatically configured as part of the enforcement set trigger. For more details, see Enforcement Set Configuration.
    You can add a new enforcement to a single query one at a time.
  • Set access to public - This option is only relevant for private saved queries. Changing the access of a saved query to public will make it publicly available to all users and cannot be reset to private.
  • Keep saved query always cached - The Keep always cached checkbox lets you keep a saved query always cached.
    • If enabled, the saved query will be always be cached. The saved query will be executed and cached each TTL interval defined in Cache Settings.
    • If disabled, the saved query will not be always cached.
    • This checkbox is only visible when Caching is enabled in the system.
  • Delete the saved query.


Was This Article Helpful?