The addScheduledSearchLabel() GraphQL mutation may be used to add a label to a scheduled search.

For more information on scheduled searches, see the Scheduled Searches documentation page.

Syntax

Below is the syntax for the addScheduledSearchLabel() mutation field:

graphql
addScheduledSearchLabel(
       input: AddLabelScheduledSearch!
    ): ScheduledSearch!

Given Datatypes

For the input (i.e., AddLabelScheduledSearch), there are a few parameters that may be given. Below is a list of them along with their datatype and a description of each:

Table: AddLabelScheduledSearch

ParameterTypeRequired[a]DefaultDescription
id[InputDictionaryEntry]yes The unique identifier of the scheduled search. Its datatype is key: string and value: string, both required.
labelstringyes The label for the scheduled search.
viewNamestringyes The name of the view of the scheduled search.

[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

As indicated by the syntax above, this mutation will return data using the datatype, ScheduledSearch. Below is a list of the parameters of that data type:

Table: ScheduledSearch

ParameterTypeRequired[a]DefaultDescription
actions[string]yes List of unique identifiers for actions to fire on query result.
backfillLimitintegeryes User-defined limit, which caps the number of missed searches to backfill, e.g. in the event of a shutdown.
descriptionstring  A description of the scheduled search.
enabledbooleanyes Whether the scheduled search is enabled.
endstringyes The end of the relative time interval for the query.
idstringyes The unique identifier of the scheduled search.
isStarredbooleanyes Whether the calling user has 'starred' the scheduled search.
labels[string]yes The labels added to the scheduled search.
lastErrorstring  The last error encountered while running the search.
lastScheduledSearchlong  The UNIX timestamp at which the last query result was processed.
namestringyes The name of the scheduled search.
packagePackageInstallationyes The related package (see PackageInstallation Table).
queryStringstringyes The LogScale query to execute.
runAsUserUseryes The unique identifier of the user as which the scheduled search is running (see User Table).
schedulestringyes The cron pattern describing the schedule to execute the query on.
startstringyes The start of the relative time interval for the query.
timeOfNextPlannedExecutionlong  The UNIX timestamp for next planned search.
timeZonestringyes Time zone of the schedule. Currently, this field only supports UTC offsets like 'UTC', 'UTC-01' or 'UTC+12:45'.
yamlTemplateYAMLyes A template that can be used to recreate the scheduled search.

[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.