Rules and custom SQL, part 2 of 2 (GraphQL)

Related queries and mutations in Monitors. Each has its own section.

Mutations

createOrUpdateFreshnessCustomRule (mutation)

createOrUpdateFreshnessCustomRule is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Create or update a freshness monitor

Arguments

ArgumentTypeDescription
alertGroupingAlertGroupingInputPer-monitor alert grouping configuration. Omit or pass null for legacy per-type grouping; a non-null value enables monitor-based alert grouping. The createOrUpdate* mutations are full-state: omitting this field on an update clears any existing configuration (same as samplingConfig).
audienceConditions[AudienceConditionInput!]Narrows individual audiences to the triage priorities that reach them. Always a full replace: omitting the argument (or passing null) makes every audience unconditional, the same as passing an empty list; a non-empty list replaces the conditions wholesale. Every audience named here must also appear in this mutation's audience list (audiences, or labels on the mutations that spell it that way), which stays the monitor's full audience set — a condition narrows when one of them is notified, it does not add one.
autoTriageBooleanPer-monitor automated-triage override. true forces triage on for this monitor, false forces it off, and null (or omitting the argument) clears the override so the monitor inherits the domain/account setting. Because omitting the argument clears the override, an update call that does not send this field will reset any previously set override, including a deliberate false, back to inherit.
comparisons[CustomRuleComparisonInput]!Custom rule comparisons
customRuleUuidUUIDUUID of custom rule, to update existing rule
dataQualityDimensionStringData quality dimension on the custom rule.
descriptionStringUsed as the name in the UI
domainUuids[UUID!]Please provide one and only one valid domain uuid.
dwIdUUIDWarehouse the tables are contained in. Required when using fullTableIds
eventRollupCountIntThe number of events to roll up into a single incident
eventRollupUntilChangedBooleanIf true, roll up events until the value changes
exceptionPrimaryKeyColumnStringSpecifies the column which contains the primary key for sampled data used in exception management.
failureAudiences[String!]The audiences to notify on failure
intervalMinutesIntHow often to run scheduled custom rule check (DEPRECATED, use schedule instead)
labels[String]The monitor labels
notesStringAdditional context for the monitor Default: "".
notifyRuleRunFailureBooleanDEPRECATED: Completely ignored. This field has no effect on anything. Use failure_audiences to determine who is notified when run failures occur.
pauseBooleanPause state of the rule.
priorityStringThe default priority for alerts involving this monitor
replacesOotbBooleanIndicate if this rule replaces the default ootb detector
scheduleConfigScheduleConfigInputSchedule of custom rule
severityStringDEPRECATED. Use priority instead. The default severity for incidents involving this monitor Default: "".
startTimeDateTimeStart time of schedule (DEPRECATED, use schedule instead)
tags[TagKeyValuePairInput]The monitor tags.
timezoneStringTimezone (DEPRECATED, use timezone in scheduleConfig instead

Returns

CreateOrUpdateFreshnessCustomRule

Example

mutation CreateOrUpdateFreshnessCustomRule($comparisons: [CustomRuleComparisonInput]!) {
  createOrUpdateFreshnessCustomRule(comparisons: $comparisons) {
    customRule {
      id
      createdTime
      updatedTime
      uuid
      accountUuid
      projects
      datasets
      isDeleted
      deletedAt
      description
      notes
      labels
      failureAudiences
      isTemplateManaged
      namespace
      priority
      isPaused
      pausedReason
      isDraft
      isAutoCreated
    }
  }
}

Types used only by createOrUpdateFreshnessCustomRule

CreateOrUpdateFreshnessCustomRule

Object type. Create or update a freshness custom rule

FieldTypeDescription
customRuleCustomRule

Related types

AlertGroupingInput, AudienceConditionInput, CustomRule, CustomRuleComparisonInput, DateTime, ScheduleConfigInput, TagKeyValuePairInput, UUID

createOrUpdateQueryPerfRule (mutation)

createOrUpdateQueryPerfRule is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Create or update a query performance monitor

Arguments

ArgumentTypeDescription
audienceConditions[AudienceConditionInput!]Narrows individual audiences to the triage priorities that reach them. Always a full replace: omitting the argument (or passing null) makes every audience unconditional, the same as passing an empty list; a non-empty list replaces the conditions wholesale. Every audience named here must also appear in this mutation's audience list (audiences, or labels on the mutations that spell it that way), which stays the monitor's full audience set — a condition narrows when one of them is notified, it does not add one.
autoTriageBooleanPer-monitor automated-triage override. true forces triage on for this monitor, false forces it off, and null (or omitting the argument) clears the override so the monitor inherits the domain/account setting. Because omitting the argument clears the override, an update call that does not send this field will reset any previously set override, including a deliberate false, back to inherit.
comparisons[CustomRuleComparisonInput]!Custom rule comparisons
customRuleUuidUUIDUUID of custom rule, to update existing rule
dataQualityDimensionStringdata quality dimension
descriptionString!Description of rule
domainUuids[UUID!]Please provide one and only one valid domain uuid.
dryRunBooleanDry run the monitor creation or update and return the MaC YAML and queries. Default: false.
failureAudiences[String!]The monitor failure audiences
isDraftBooleanMake target a draft monitor. Default: false.
labels[String]The monitor labels
notesStringAdditional context for the rule
priorityStringThe default priority for alerts involving this monitor
ruleNameStringRule Name. DEPRECATED: field will be ignored.
selectionQuerySelectionInput!Selection of the monitored queries
severityStringDEPRECATED. Use priority instead. The default severity for incidents involving this monitor Default: "".
tags[TagKeyValuePairInput]The monitor tags.

Returns

CreateOrUpdateQueryPerfRule

Example

mutation CreateOrUpdateQueryPerfRule($comparisons: [CustomRuleComparisonInput]!, $description: String!, $selection: QuerySelectionInput!) {
  createOrUpdateQueryPerfRule(comparisons: $comparisons, description: $description, selection: $selection) {
    yaml
  }
}

Types used only by createOrUpdateQueryPerfRule

CreateOrUpdateQueryPerfRule

Object type. Create or update query performance rule/monitor.
There must be exactly (3) comparisons, which follow this format:
{
"comparisonType": "QUERY_PERFORMANCE",
"operator": "GT",
"metric": "runtime",
"threshold": <THRESHOLD IN SECONDS>,
},
{
"comparisonType": "QUERY_PERFORMANCE",
"operator": "GT",
"metric": "runtime_change",
"threshold": <THRESHOLD AS PERCENTAGE>,
"baselineAggFunction": <MEDIAN|AVG>,
"thresholdLookbackDataPoints": <NUMBER OF DATA POINTS TO INCLUDE IN LOOKBACK RANGE>,
},
{
"comparisonType": "QUERY_PERFORMANCE",
"operator": "GT",
"metric": "consecutive_breach_count",
"threshold": <NUMBER OF CONSECUTIVE BREACHES TO TRIGGER AN ALERT>,
}

FieldTypeDescription
customRuleCustomRule
yamlString

Related types

AudienceConditionInput, CustomRule, CustomRuleComparisonInput, QuerySelectionInput, TagKeyValuePairInput, UUID

createOrUpdateVolumeRule (mutation)

createOrUpdateVolumeRule is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Create or update a volume monitor

Arguments

ArgumentTypeDescription
alertGroupingAlertGroupingInputPer-monitor alert grouping configuration. Omit or pass null for legacy per-type grouping; a non-null value enables monitor-based alert grouping. The createOrUpdate* mutations are full-state: omitting this field on an update clears any existing configuration (same as samplingConfig).
audienceConditions[AudienceConditionInput!]Narrows individual audiences to the triage priorities that reach them. Always a full replace: omitting the argument (or passing null) makes every audience unconditional, the same as passing an empty list; a non-empty list replaces the conditions wholesale. Every audience named here must also appear in this mutation's audience list (audiences, or labels on the mutations that spell it that way), which stays the monitor's full audience set — a condition narrows when one of them is notified, it does not add one.
autoTriageBooleanPer-monitor automated-triage override. true forces triage on for this monitor, false forces it off, and null (or omitting the argument) clears the override so the monitor inherits the domain/account setting. Because omitting the argument clears the override, an update call that does not send this field will reset any previously set override, including a deliberate false, back to inherit.
comparisons[CustomRuleComparisonInput]!Custom rule comparisons
customRuleUuidUUIDUUID of custom rule, to update existing rule
dataCollectionScheduleConfigScheduleConfigInputData Collection schedule of custom rule
dataQualityDimensionStringData quality dimension on the custom rule.
descriptionString!Description of rule
domainUuids[UUID!]Please provide one and only one valid domain uuid.
dwIdUUIDWarehouse the tables are contained in. Required when using fullTableIds
eventRollupCountIntThe number of events to roll up into a single incident
eventRollupUntilChangedBooleanIf true, roll up events until the value changes
exceptionPrimaryKeyColumnStringSpecifies the column which contains the primary key for sampled data used in exception management.
failureAudiences[String!]The audiences to notify on failure
labels[String]The monitor labels
notesStringAdditional context for the monitor Default: "".
notifyRuleRunFailureBooleanDEPRECATED: Completely ignored. This field has no effect on anything. Use failure_audiences to determine who is notified when run failures occur.
overrideBooleanIf override is set, it forces the dc schedule to run
priorityStringThe default priority for alerts involving this monitor
replacesOotbBooleanIndicate if this rule replaces the default ootb detector
scheduleConfigScheduleConfigInputSchedule of custom rule
severityStringDEPRECATED. Use priority instead. The default severity for incidents involving this monitor Default: "".
tags[TagKeyValuePairInput]The monitor tags.
timezoneStringTimezone (DEPRECATED, use timezone in scheduleConfig instead

Returns

CreateOrUpdateVolumeRule

Example

mutation CreateOrUpdateVolumeRule($comparisons: [CustomRuleComparisonInput]!, $description: String!) {
  createOrUpdateVolumeRule(comparisons: $comparisons, description: $description) {
    customRule {
      id
      createdTime
      updatedTime
      uuid
      accountUuid
      projects
      datasets
      isDeleted
      deletedAt
      description
      notes
      labels
      failureAudiences
      isTemplateManaged
      namespace
      priority
      isPaused
      pausedReason
      isDraft
      isAutoCreated
    }
  }
}

Types used only by createOrUpdateVolumeRule

CreateOrUpdateVolumeRule

Object type. Create or update a Volume Rule

FieldTypeDescription
customRuleCustomRule

Related types

AlertGroupingInput, AudienceConditionInput, CustomRule, CustomRuleComparisonInput, ScheduleConfigInput, TagKeyValuePairInput, UUID

deleteCustomRule (mutation)

deleteCustomRule is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Delete a custom rule

Arguments

ArgumentTypeDescription
uuidUUIDUUID for rule to delete
warehouseUuidUUIDDeprecated

Returns

DeleteCustomRule

Example

mutation DeleteCustomRule {
  deleteCustomRule {
    uuid
  }
}

Types used only by deleteCustomRule

DeleteCustomRule

Object type. Delete a custom rule

FieldTypeDescription
uuidUUID

Related types

UUID

deleteCustomSqlTemplate (mutation)

deleteCustomSqlTemplate is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Delete custom sql template

Arguments

ArgumentTypeDescription
uuidUUIDuuid of custom sql template

Returns

DeleteCustomSQLTemplate

Example

mutation DeleteCustomSqlTemplate {
  deleteCustomSqlTemplate {
    success
  }
}

Types used only by deleteCustomSqlTemplate

DeleteCustomSQLTemplate

Object type.

FieldTypeDescription
successBoolean

Related types

UUID

pauseRule (mutation)

pauseRule is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Pause a rule from collecting data or triggering notifications

Arguments

ArgumentTypeDescription
pauseBoolean!Pause state of the monitor.
reasonStringJustification for the change, recorded as a monitor comment.
uuidUUID!UUID of the rule whose skip status is being changed.

Returns

PauseRule

Example

mutation PauseRule($pause: Boolean!, $uuid: UUID!) {
  pauseRule(pause: $pause, uuid: $uuid) {
    rule {
      id
      createdTime
      updatedTime
      uuid
      accountUuid
      projects
      datasets
      isDeleted
      deletedAt
      description
      notes
      labels
      failureAudiences
      isTemplateManaged
      namespace
      priority
      isPaused
      pausedReason
      isDraft
      isAutoCreated
    }
  }
}

Types used only by pauseRule

PauseRule

Object type. Pause a rule from collecting data or triggering notifications

FieldTypeDescription
ruleCustomRuleThe rule whose pause property has been toggled.

Related types

CustomRule, UUID

restoreCustomRule (mutation)

restoreCustomRule is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Restore a soft-deleted custom rule. When connectionUuid is provided, a rule that was soft-deleted as a side-effect of its connection being deleted is re-pointed to the new connection before being un-tombstoned. The new connection must live in the same warehouse as the rule, share the original connection's type, and support a superset of its job types.

Arguments

ArgumentTypeDescription
connectionUuidUUIDRe-point the rule to a different connection as part of the restore. Only valid when the rule was deleted as a side-effect of its original connection being deleted. The new connection must be in the same warehouse, share the original connection's type, and support a superset of its job types.
uuidUUIDUUID for rule to restore
warehouseUuidUUIDDeprecated

Returns

RestoreCustomRule

Example

mutation RestoreCustomRule {
  restoreCustomRule {
    uuid
  }
}

Types used only by restoreCustomRule

RestoreCustomRule

Object type. Restore a soft-deleted custom rule. When connectionUuid is provided, a rule that was soft-deleted as a side-effect of its connection being deleted is re-pointed to the new connection before being un-tombstoned. The new connection must live in the same warehouse as the rule, share the original connection's type, and support a superset of its job types.

FieldTypeDescription
uuidUUID

Related types

UUID

runCustomRules (mutation)

runCustomRules is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Run a list of custom rules manually

Arguments

ArgumentTypeDescription
ruleUuids[UUID!]!Rule UUIDs

Returns

RunCustomRules

Example

mutation RunCustomRules($ruleUuids: [UUID!]!) {
  runCustomRules(ruleUuids: $ruleUuids) {
    success
  }
}

Types used only by runCustomRules

RunCustomRules

Object type. Run a list of custom rules manually

FieldTypeDescription
successBoolean

Related types

UUID

runSqlRule (mutation)

runSqlRule is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Run a Custom SQL monitor manually

Arguments

ArgumentTypeDescription
ruleUuidUUID!Rule UUID
runtimeVariables[RuntimeVariableValueInput!]Rule execution runtime_variables

Returns

RunSqlRule

Example

mutation RunSqlRule($ruleUuid: UUID!) {
  runSqlRule(ruleUuid: $ruleUuid) {
    jobExecutionUuids
  }
}

Types used only by runSqlRule

RunSqlRule

Object type. Run a Custom SQL monitor manually

FieldTypeDescription
jobExecutionUuids[UUID]DEPRECATED

Related types

RuntimeVariableValueInput, UUID

snoozeCustomRule (mutation)

snoozeCustomRule is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Snooze a custom rule. Data collection will continue, but no anomalies will be reported.

Arguments

ArgumentTypeDescription
reasonStringJustification for the change, recorded as a monitor comment.
snoozeMinutesIntNumber of minutes to snooze rule - deprecated by snooze_type
snoozeTypeCustomRuleSnoozeInputChoose regular snooze or conditional snooze options
uuidUUIDUUID for rule to snooze - deprecated by snooze_type

Returns

SnoozeCustomRule

Example

mutation SnoozeCustomRule {
  snoozeCustomRule {
    customRule {
      id
      createdTime
      updatedTime
      uuid
      accountUuid
      projects
      datasets
      isDeleted
      deletedAt
      description
      notes
      labels
      failureAudiences
      isTemplateManaged
      namespace
      priority
      isPaused
      pausedReason
      isDraft
      isAutoCreated
    }
  }
}

Types used only by snoozeCustomRule

CustomRuleSnoozeInput

Input object type. input variables for snoozing

FieldTypeDescription
ruleUuidUUID!UUID of rule to snooze
snoozeMinutesIntnumber of minutes to snooze rule
conditionalSnoozeBooleansnooze rule until breach condition changes or is resolved Default: false.
SnoozeCustomRule

Object type. Snooze a custom rule. Data collection will continue, but no anomalies will be reported.

FieldTypeDescription
customRuleCustomRule

Related types

CustomRule, UUID

snoozeCustomRules (mutation)

snoozeCustomRules is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Snooze a list of custom rules. Data collection will continue, but no anomalies will be reported.

Arguments

ArgumentTypeDescription
conditionalSnoozeBooleansnooze rules until breach condition changes or is resolved Default: false.
reasonStringJustification for the change, recorded as a comment on each rule.
snoozeMinutesIntnumber of minutes to snooze rules
uuids[UUID!]UUIDs of the rules to snooze

Returns

SnoozeCustomRules

Example

mutation SnoozeCustomRules {
  snoozeCustomRules {
    customRules {
      id
      createdTime
      updatedTime
      uuid
      accountUuid
      projects
      datasets
      isDeleted
      deletedAt
      description
      notes
      labels
      failureAudiences
      isTemplateManaged
      namespace
      priority
      isPaused
      pausedReason
      isDraft
      isAutoCreated
    }
  }
}

Types used only by snoozeCustomRules

SnoozeCustomRules

Object type.

FieldTypeDescription
customRules[CustomRule!]

Related types

CustomRule, UUID

triggerCircuitBreakerRule (mutation)

triggerCircuitBreakerRule is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Deprecated: Use TriggerCircuitBreakerRuleV2 instead to support rules with multiple executions

Run a custom rule as a circuit breaker immediately. Supports rules that produce a single pollable job execution.

Arguments

ArgumentTypeDescription
namespaceStringNamespace
ruleNameStringRule Name
ruleUuidUUIDRule UUID

Returns

TriggerCircuitBreakerRule

Example

mutation TriggerCircuitBreakerRule {
  triggerCircuitBreakerRule {
    jobExecutionUuid
  }
}

Types used only by triggerCircuitBreakerRule

TriggerCircuitBreakerRule

Object type. Run a custom rule as a circuit breaker immediately. Supports rules that produce a single pollable job execution.

FieldTypeDescription
jobExecutionUuidUUIDThe UUID of the job execution that can be polled for a result. A run may also dispatch data-collection-only executions, which are not returned.

Related types

UUID

triggerCircuitBreakerRuleV2 (mutation)

triggerCircuitBreakerRuleV2 is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Run a custom rule as a circuit breaker immediately. Supports rules that create multiple queries.

Arguments

ArgumentTypeDescription
namespaceStringNamespace
ruleNameStringRule Name
ruleUuidUUIDRule UUID
runtimeVariables[RuntimeVariableValueInput!]Rule execution runtime variables

Returns

TriggerCircuitBreakerRuleV2

Example

mutation TriggerCircuitBreakerRuleV2 {
  triggerCircuitBreakerRuleV2 {
    jobExecutionUuids
  }
}

Types used only by triggerCircuitBreakerRuleV2

TriggerCircuitBreakerRuleV2

Object type. Run a custom rule as a circuit breaker immediately. Supports rules that create multiple queries.

FieldTypeDescription
jobExecutionUuids[UUID]The UUIDs of the job executions that can be polled for a result. A run may also dispatch data-collection-only executions, which are not returned.

Related types

RuntimeVariableValueInput, UUID

triggerCustomRule (mutation)

triggerCustomRule is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Deprecated: Use RunSqlRule instead

Run a custom rule immediately

Arguments

ArgumentTypeDescription
customSqlContainsStringString to completely or partially match the rule SQL, case-insensitive
descriptionContainsStringString to completely or partially match the rule description, case-insensitive
ruleIdUUIDRule id

Returns

TriggerCustomRule

Example

mutation TriggerCustomRule {
  triggerCustomRule {
    customRule {
      id
      createdTime
      updatedTime
      uuid
      accountUuid
      projects
      datasets
      isDeleted
      deletedAt
      description
      notes
      labels
      failureAudiences
      isTemplateManaged
      namespace
      priority
      isPaused
      pausedReason
      isDraft
      isAutoCreated
    }
  }
}

Types used only by triggerCustomRule

TriggerCustomRule

Object type. Run a custom rule immediately

FieldTypeDescription
customRuleCustomRule

Related types

CustomRule, UUID

unsnoozeCustomRule (mutation)

unsnoozeCustomRule is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Un-snooze a custom rule.

Arguments

ArgumentTypeDescription
reasonStringJustification for the change, recorded as a monitor comment.
uuidUUIDUUID for rule to un-snooze

Returns

UnsnoozeCustomRule

Example

mutation UnsnoozeCustomRule {
  unsnoozeCustomRule {
    customRule {
      id
      createdTime
      updatedTime
      uuid
      accountUuid
      projects
      datasets
      isDeleted
      deletedAt
      description
      notes
      labels
      failureAudiences
      isTemplateManaged
      namespace
      priority
      isPaused
      pausedReason
      isDraft
      isAutoCreated
    }
  }
}

Types used only by unsnoozeCustomRule

UnsnoozeCustomRule

Object type. Un-snooze a custom rule.

FieldTypeDescription
customRuleCustomRule

Related types

CustomRule, UUID

unsnoozeCustomRules (mutation)

unsnoozeCustomRules is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Un-snooze a list of custom rules.

Arguments

ArgumentTypeDescription
reasonStringJustification for the change, recorded as a comment on each rule.
uuids[UUID!]UUIDs of the rules to snooze

Returns

UnsnoozeCustomRules

Example

mutation UnsnoozeCustomRules {
  unsnoozeCustomRules {
    customRules {
      id
      createdTime
      updatedTime
      uuid
      accountUuid
      projects
      datasets
      isDeleted
      deletedAt
      description
      notes
      labels
      failureAudiences
      isTemplateManaged
      namespace
      priority
      isPaused
      pausedReason
      isDraft
      isAutoCreated
    }
  }
}

Types used only by unsnoozeCustomRules

UnsnoozeCustomRules

Object type. Un-snooze a list of custom rules.

FieldTypeDescription
customRules[CustomRule!]

Related types

CustomRule, UUID

updateCustomMetricRuleNotes (mutation)

updateCustomMetricRuleNotes is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Deprecated: Use UpdateMonitorNotes instead

Create or update notes for custom metric rule

Arguments

ArgumentTypeDescription
customRuleUuidUUID!UUID of custom rule, to update existing rule
notesStringAdditional context for the custom SQL rule

Returns

UpdateCustomMetricRuleNotes

Example

mutation UpdateCustomMetricRuleNotes($customRuleUuid: UUID!) {
  updateCustomMetricRuleNotes(customRuleUuid: $customRuleUuid) {
    customRule {
      id
      createdTime
      updatedTime
      uuid
      accountUuid
      projects
      datasets
      isDeleted
      deletedAt
      description
      notes
      labels
      failureAudiences
      isTemplateManaged
      namespace
      priority
      isPaused
      pausedReason
      isDraft
      isAutoCreated
    }
  }
}

Types used only by updateCustomMetricRuleNotes

UpdateCustomMetricRuleNotes

Object type. Create or update notes for custom metric rule

FieldTypeDescription
customRuleCustomRule

Related types

CustomRule, UUID

updateCustomMetricSeverity (mutation)

updateCustomMetricSeverity is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Deprecated: Custom metric rule now has priority instead of severity

DEPRECATED. Create or update default severity for custom metric rule

Arguments

ArgumentTypeDescription
customRuleUuidUUID!UUID of custom rule, to update existing rule
severityStringSystem set severity when an incident for the rule is created

Returns

UpdateCustomMetricSeverity

Example

mutation UpdateCustomMetricSeverity($customRuleUuid: UUID!) {
  updateCustomMetricSeverity(customRuleUuid: $customRuleUuid) {
    customRule {
      id
      createdTime
      updatedTime
      uuid
      accountUuid
      projects
      datasets
      isDeleted
      deletedAt
      description
      notes
      labels
      failureAudiences
      isTemplateManaged
      namespace
      priority
      isPaused
      pausedReason
      isDraft
      isAutoCreated
    }
  }
}

Types used only by updateCustomMetricSeverity

UpdateCustomMetricSeverity

Object type. DEPRECATED. Create or update default severity for custom metric rule

FieldTypeDescription
customRuleCustomRule

Related types

CustomRule, UUID

updateCustomRuleInvestigationQuery (mutation)

updateCustomRuleInvestigationQuery is a mutation in the Monte Carlo GraphQL API, in Monitors. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Update a rule's investigation query

Arguments

ArgumentTypeDescription
customSamplingSqlString!The new investigation query
ruleUuidUUID!The UUID of the rule to update

Returns

UpdateCustomRuleInvestigationQuery

Example

mutation UpdateCustomRuleInvestigationQuery($customSamplingSql: String!, $ruleUuid: UUID!) {
  updateCustomRuleInvestigationQuery(customSamplingSql: $customSamplingSql, ruleUuid: $ruleUuid) {
    rule {
      id
      createdTime
      updatedTime
      uuid
      accountUuid
      projects
      datasets
      isDeleted
      deletedAt
      description
      notes
      labels
      failureAudiences
      isTemplateManaged
      namespace
      priority
      isPaused
      pausedReason
      isDraft
      isAutoCreated
    }
  }
}

Types used only by updateCustomRuleInvestigationQuery

UpdateCustomRuleInvestigationQuery

Object type. Update a rule's investigation query

FieldTypeDescription
ruleCustomRuleThe updated rule

Related types

CustomRule, UUID

Source: The GraphQL API reference

This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.