API Stability |
Long-Term
|
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:
createSavedQuery(
input: CreateSavedQueryInput!
): CreateSavedQueryPayload!
Below is an example of how this mutation field might be used:
mutation {
createSavedQuery( input:
{ name: "my-saved-query",
viewName: "humio",
queryString: "@host=localhost"
} )
{ savedQuery {id, allowedActions} }
}
{
"data": {
"createSavedQuery": {
"savedQuery": {
"id": "S07kKBwioqCaOwkmpz7m9XSfQ9v1eWXb",
"allowedActions": [
"Read",
"Update"
]
}
}
}
}
Given Datatypes
For the given datatype,
CreateSavedQueryInput
,
there are several parameters that may be given. Below is a list of
them along with a description of each:
Table: CreateSavedQueryInput
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
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: Sep 17, 2024 | |||||
customLinkInteractions | [CustomLinkInteractionInput ] | yes | Long-Term | The custom links for interactions. See CustomLinkInteractionInput . | |
dashboardLinkInteractions | [DashboardLinkInteractionInput ] | yes | Long-Term | The dashboard links for interactions. See DashboardLinkInteractionInput . | |
end | string | Long-Term | The end point for events processed by the saved query. | ||
isLive | boolean | Long-Term | Whether the saved query uses live, streaming data. | ||
name | string | yes | Long-Term | The name of the saved query to create. | |
options | string | Long-Term | Any options related to the saved query. | ||
queryString | string | yes | Long-Term | The query to be used, to be saved. | |
searchLinkInteractions | [SearchLinkInteractionInput ] | yes | Long-Term | The search links for interactions. See SearchLinkInteractionInput . | |
start | string | Long-Term | The start point for events processed by the saved query. | ||
updateParametersInteractions | [UpdateParametersInteractionInput ] | yes | Long-Term | The parameters to update for interactions. See UpdateParametersInteractionInput . | |
viewName | string | yes | Long-Term | The name of the view associated with the saved query. | |
widgetType | string | Long-Term | The type of widget to use for dispaly the results for the saved query. |
Returned Datatypes
CreateSavedQueryPayload
has one parameter, but if you click on it in the table below,
you'll see that it has several sub-parameters:
Table: CreateSavedQueryPayload
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
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: Sep 24, 2024 | |||||
savedQuery | savedQuery | yes | Long-Term | The saved query to create from payload. See savedQuery . |