API Stability Preview

The updateScheduledSearchV2() GraphQL mutation field is used to update a scheduled search.

Syntax

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

graphql
updateScheduledSearchV2(
       input: UpdateScheduledSearchV2!
    ): ScheduledSearch!

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

Show:
graphql
mutation {
  updateScheduledSearchV2( input:
    { viewName: "humio",
      id: "abc123",
      name: "mySearch",
      queryString: "@host=localhost",
      searchIntervalSeconds: 10,
      schedule: "15 1 * * *",
      timeZone: "UTC+2",
      enabled: false,
      actionIdsOrNames: [],
      labels: [],
      queryOwnershipType: User
    }
  )
 { id }
}
Example Responses
Show:
json
{
  "data": {
    "updateScheduledSearchV2": {
      "id": "abc123"
    }
  }
}

Given Datatypes

For UpdateScheduledSearchV2, there are several parameters. Below is a list of them:

Table: UpdateScheduledSearchV2

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: Feb 24, 2025
actions[string]yes  A list of ids or names for actions to fire on query result. Actions in packages can be referred to as packagescope/packagename:actionname.
backfillLimitinteger   User-defined limit, which caps the number of missed searches to backfill, e.g. in the event of a shutdown.
descriptionstring   Description of the scheduled search.
enabledboolean   Flag indicating whether the scheduled search is enabled. The default is true.
idstringyes  The unique identifier of the scheduled search.
labels[string]yes  Labels attached to the scheduled search.
maxWaitTimeSecondslong   The maximum number of seconds to wait for ingest delay and query warnings. Only allowed when queryTimestamp is IngestTimestamp where it's mandatory.
namestringyes  Name of the scheduled search.
queryOwnershipTypeQueryOwnershipTypeyes  Ownership of the query run by this scheduled search. If value is User, ownership will be based on the runAsUserId field. See QueryOwnershipType.
queryStringstringyes  LogScale query to execute.
queryTimestampTypeQueryTimestampTypeyes  The timestamp type to use for the query. Running on @ingesttimestamp is only available with feature flag, ScheduledSearchIngestTimestamp. See QueryTimestampType.
runAsUserIdstring   The scheduled search will run with the permissions of the user corresponding to this id if the queryOwnershipType field is set to User. If the queryOwnershipType is set to Organization, whilst runAsUserId is set, this will result in an error. If not specified, the scheduled search will run with the permissions of the calling user. It requires the 'ChangeTriggersToRunAsOtherUsers' permission to set this field to a user id different from the calling user.
schedulestringyes  Cron pattern describing the schedule to execute the query on.
searchIntervalOffsetSecondslong   The offset of the search interval in seconds. Only allowed when queryTimestampType is EventTimestamp where it's mandatory.
searchIntervalSecondslong   The search interval in seconds.
timeZonestringyes  Time zone of the schedule. Currently this field only supports UTC offsets like 'UTC', 'UTC-01' or 'UTC+12:45'.
viewNamestringyes  Name of the view of the scheduled search.

Returned Datatypes

For ScheduledSearch, there are also several parameters. Below is a list of them:

Table: ScheduledSearch

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 27, 2025
actions[string]yes Long-TermList of unique identifiers for actions to fire on query result.
actionsV2[Action]yes Long-TermList of actions to fire on query result. See Action.
allowedActions[AssetAction]yes PreviewThe allowed asset actions. See AssetAction.
backfillLimitinteger  DeprecatedUser-defined limit, which caps the number of missed searches to backfill (e.g., in the event of a shutdown). This option is deprecated and will be removed at the earliest in version 1.231. Use instead backfillLimitV2.
backfillLimitV2integer  Long-TermUser-defined limit, which caps the number of missed searches to backfill when queryTimestampType is EventTimestamp.
descriptionstring  Long-TermA description of the scheduled search.
enabledbooleanyes Long-TermWhether the scheduled search is enabled.
endstringyes DeprecatedThe end of the relative time interval for the query. This parameter is deprecated and will be removed at the earliest in version 1.231. Use instead searchIntervalOffsetSeconds.
idstringyes Long-TermThe unique identifier of the scheduled search.
isStarredbooleanyes DeprecatedWhether the calling user has 'starred' the scheduled search. This has been deprecated and is no longer in use and has no effect. It will be removed in version 1.213.
labels[string]yes Long-TermThe labels added to the scheduled search.
lastErrorstring  Long-TermThe last error encountered while running the search.
lastExecutedlong  Long-TermUnix timestamp for end of search interval for last query execution.
lastScheduledSearchlong  DeprecatedThe UNIX timestamp at which the last query result was processed. This is deprecated and replaced with lastExecuted and lastTriggered. It will be removed at the earliest in version 1.202.
lastTriggeredlong  Long-TermUnix timestamp for end of search interval for last query execution that triggered.
lastWarnings[string]yes Long-TermThe Last warnings encountered while running the scheduled search.
maxWaitTimeSecondslong  Long-TermThe maximum wait time in seconds when queryTimestampType is IngestTimestamp.
modifiedInfoModifiedInfoyes PreviewUser or token used to modify the asset. See ModifiedInfo.
namestringyes Long-TermThe name of the scheduled search.
packagePackageInstallation  Long-TermThe related package. See PackageInstallation.
packageIdVersionedPackageSpecifier  Long-TermThe unique identifier for the related package. VersionedPackageSpecifier is a scalar.
queryOwnershipQueryOwnershipyes Long-TermOwnership of the query run by this scheduled search. See QueryOwnership.
queryStringstringyes Long-TermThe LogScale query to execute.
queryTimestampTypeQueryTimestampTypeyes Long-TermThe timestamp type to use for the query. Running on @ingesttimestamp is only available with feature flag ScheduledSearchIngestTimestamp. See QueryTimestampType.
resourcestringyes Short-TermThe resource identifier for the scheduled search.
runAsUserUser  Long-TermThe unique identifier of the user as which the scheduled search is running. See User.
schedulestringyes Long-TermThe cron pattern describing the schedule to execute the query on.
searchIntervalOffsetSecondslong  Long-TermThe search interval offset in seconds when queryTimestampType is EventTimestamp.
searchIntervalSecondslongyes Long-TermThe search interval in seconds.
startstringyes DeprecatedThe start of the relative time interval for the query. This parameter is deprecated and will be removed at the earliest in version 1.231. Use instead searchIntervalSeconds.
timeOfNextPlannedExecutionlong  Long-TermThe UNIX timestamp for next planned search.
timeZonestringyes Long-TermTime zone of the schedule. Currently, this field only supports UTC offsets like 'UTC', 'UTC-01' or 'UTC+12:45'.
yamlTemplateyamlyes Long-TermA template that can be used to recreate the scheduled search.