API Stability Long-Term

The updateAggregateAlert() GraphQL mutation is used to update an existing aggregate alert.

For more information on aggregate alerts, see the Aggregate alerts documentation page.

Syntax

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

graphql
updateAggregateAlert(
      input: UpdateAggregateAlert!
   ): AggregateAlert!

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

Show:
graphql
mutation {
  updateAggregateAlert( input:
    {
      viewName: "humio",
      id: "abc123",
      name: "our-aggregate-alert",
      queryString: "#kind=threaddumps | NOT \"(Native Method)\" | top(humioLine)",
      actionIdsOrNames: [ "act-one", "act-two" ],
      labels: [ "admin" ],
      enabled: false,
      throttleTimeSeconds: 100,
      searchIntervalSeconds: 10800,
      queryTimestampType: EventTimestamp,
      triggerMode: CompleteMode,
      queryOwnershipType: User
    }
  )
  { id }
}
Example Responses
Show:
json
{
  "updateAggregateAlert": {
    "id": "abc123"
    }
  }
}

Given Datatypes

For UpdateAggregateAlert, there are a few parameters. Below is a list of them along with a description of each:

Table: UpdateAggregateAlert

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: Sep 23, 2024
actionIdsOrNames[string]yes Long-TermList of ids or names for actions to fire on query result. Actions in packages can be referred to as 'packagescope/packagename:actionname'.
enabledbooleanyes Long-TermFlag indicating whether the aggregate alert is enabled.
descriptionstring  Long-TermDescription of the aggregate alert.
idstringyes Long-TermThe unique identifier of the aggregate alert.
labels[string]yes Long-TermLabels attached to the aggregate alert.
namestringyes Long-TermName of the aggregate alert.
queryOwnershipTypeQueryOwnershipTypeyes Long-TermOwnership of the query run by this aggregate alert. If value is User, ownership will be based on the runAsUserId field. See queryOwnershipType.
queryStringstringyes Long-TermLogScale query to execute.
textQueryTimestampType  Long-TermTimestamp type to use for a query. See QueryTimestampType.
runAsUserIdstring  Long-TermThe aggregate alert 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 aggregate alert 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.
searchIntervalSecondslongyes Long-TermSearch interval in seconds. Valid values: 1-80 minutes in seconds divisible by 60 (60, 120, ..., 4800 seconds); 82-180 minutes in seconds divisible by 120 (4920, 5040, ..., 10800 seconds); and 4-24 hours in seconds divisible by 3600 (14400, 18000, ..., 86400 seconds).
throttleFieldstringyes Long-TermA field to throttle on. Can only be set if throttleTimeSeconds is set.
throttleTimeSecondslongyes Long-TermThrottle time in seconds.
triggerModeTriggerModeyes Long-TermTrigger mode used for triggering the alert. See TriggerMode.
viewNameRepoOrViewNameyes Long-TermName of the view of the aggregate alert. RepoOrViewName is a scalar.

Returned Datatypes

The returned datatype AggregateAlert has several parameters. Below is a list of them along with a description of each:

Table: AggregateAlert

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 25, 2025
actions[action]yes Long-TermList of actions to fire on query result. See Action.
allowedActions[AssetAction]yes PreviewList of actions allowed to fire on query result. See AssetAction.
descriptionstring  Long-TermDescription of the aggregate alert.
enabledbooleanyes Long-TermFlag indicating whether the aggregate alert is enabled.
idstringyes Long-TermUnique identifier of of the aggregate alert.
labels[string]yes Long-TermLabels attached to the aggregate alert.
lastErrorstring  Long-TermLast error encountered while running the aggregate alert.
lastSuccessfulPolllong  Long-TermUnix timestamp for last successful poll of the aggregate alert query. If this isn't very recent, the alert might have problems.
lastTriggeredlong  Long-TermUnix timestamp for last execution of trigger.
lastWarnings[string]yes Long-TermLast warnings encountered while running the aggregate alert.
modifiedInfoModifiedInfoyes PreviewInformation about the aggregate alert that was modified. See ModifiedInfo.
namestringyes Long-TermName of the aggregate alert.
packagePackageInstallation  Long-TermThe package of which the aggregate alert was installed. See PackageInstallation.
packageIdVersionedPackageSpecifier  Long-TermThe unique identifier of the package of the aggregate alert template. VersionedPackageSpecifier is a scalar.
queryOwnershipqueryOwnershipyes Long-TermOwnership of the query run by this alert. See queryOwnership.
queryStringstringyes Long-TermLogScale query to execute.
queryTimestampTypeQueryTimestampTypeyes Long-TermTimestamp type to use for a query. See QueryTimestampType and the FAQ: How Does LogScale Handle Ingest Delays in Aggregate Alerts KB article.
resourcestringyes Short-TermThe resource identifier for the aggregate alert.
searchIntervalSecondslongyes Long-TermSearch interval in seconds.
throttleFieldstring  Long-TermA field to throttle on.
throttleTimeSecondslongyes Long-TermThrottle time in seconds.
triggerModeTriggerModeyes Long-TermTrigger mode used for triggering the alert. See TriggerMode and the FAQ: How Does LogScale Handle Ingest Delays in Aggregate Alerts KB article.
yamlTemplateyamlyes Long-TermYAML specification of the aggregate alert.