The createSavedQuery() GraphQL mutation may be used to create a saved query in LogScale.

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 createSavedQuery() mutation field:

graphql
createSavedQuery(
      input: CreateSavedQueryInput!
   ): CreateSavedQueryPayload!

Given Datatypes

For the given datatype, CreateSavedQueryInput, there are several parameters that may be given. Below is a list of them along with their datatypes and a description of each:

Table: CreateSavedQueryInput

ParameterTypeRequired[a]DefaultDescription
namestringyes The name of the saved query to create.
viewNamestringyes The name of the view associated with the saved query.
queryStringstringyes The query to be used, to be saved.
startstring  The start point for events processed by the saved query.
endstring  The end point for events processed by the saved query.
isLiveboolean  Whether the saved query uses live, streaming data.
widgetTypestring  The type of widget to use for dispaly the results for the saved query.
optionsstring  Any options related to the saved query.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.


Returned Datatypes

The returned datatype CreateSavedQueryPayload has its own parameter:

Table: CreateSavedQueryPayload

ParameterTypeRequired[a]DefaultDescription
savedQuerySavedQueryyes The saved query (see SavedQuery Table).

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.