API Stability Long-Term

The savedQuery() GraphQL query is used to retrieve a saved query.

For more information on saved queries, see the User Functions (Saved Searches) reference page where saved queries are discussed. Also, look at the Searching Data documentation page as it relates to recent queries and saving queries.

Syntax

Below is the syntax for the savedQuery() query field:

graphql
savedQuery(
     id: string!
   ): SavedQuery!

Below is an example of how this query field might be used:

Show:
graphql
query {
  savedQuery(id:"1234")
     { name, displayName, isStarred, 
       query{arguments{key, value}} }
}

Returned Datatypes

The returned datatype savedQuery() has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: SavedQuery

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Mar 28, 2025
allowedActions[AssetAction]yes PreviewThe allowed asset actions. See AssetAction. This is a preview and subject to change.
descriptionstring  Long-TermA description of the saved query.
displayNamestringyes Long-TermThe display name of the saved query.
idstringyes Long-TermThe unique identifier for the saved query.
interactions[QueryBasedWidgetInteraction]yes Long-TermThe interactions of the saved query. See QueryBasedWidgetInteraction.
isStarredbooleanyes Long-TermWhether the saved query has been marked with a star.
namestringyes Long-TermThe name of the saved query.
optionsJSONyes Long-TermOptions related to the saved query, in JSON form.
packagePackageInstallation  Long-TermThe package, if there is one, in which the saved query is included. See PackageInstallation.
packageIdVersionedPackageSpecifier  Long-TermThe unique identifier of the package. VersionedPackageSpecifier is a scalar value.
queryHumioQueryyes Long-TermThe saved query itself. See HumioQuery.
resourcestringyes Short-TermThe resource identifier for this saved query.
widgetTypestringyes Long-TermThe type of widget used with the saved query.
yamlTemplateYAMLyes Long-TermA YAML formatted string that describes the saved query. This replaced templateYaml starting in LogScale version 1.225.