Notification settings and recipients (GraphQL)

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

Queries

getNotificationSettings (query)

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

Get notification settings

Arguments

ArgumentTypeDescription
monitorLabels[String]Filter by notifications that handle these monitor labels

Returns

[AccountNotificationSetting]

Example

query GetNotificationSettings {
  getNotificationSettings {
    id
    deletedAt
    uuid
    createdTime
    lastUpdateTime
    name
    isTemplateManaged
    namespace
    type
    recipients
    extra
    notificationScheduleType
    notificationEnabled
    recipientDisplayName
    recipientsDisplayNames
    permalink
    alertSubTypes
    customMessage
    integrationId
    channelUrl
  }
}

Related types

AccountNotificationSetting

getNotificationTypeCapabilities (query)

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

Status: Experimental

Capability flags per notification type. Use supportsMonitorChanges to decide whether to render the monitor-change opt-in toggle for a type.

Returns

[NotificationTypeCapabilities!]!

Example

query GetNotificationTypeCapabilities {
  getNotificationTypeCapabilities {
    notificationType
    supportsMonitorChanges
    supportsTriageThreadedReply
  }
}

Types used only by getNotificationTypeCapabilities

NotificationTypeCapabilities

Object type.

FieldTypeDescription
notificationTypeString!The notification type these capability flags apply to
supportsMonitorChangesBoolean!True if this notification type honors the receiveMonitorChanges flag on NotificationExtra. The frontend should only render the toggle for types where this is True.
supportsTriageThreadedReplyBoolean!True if this notification type honors the triageThreadedReply flag on NotificationExtra. The frontend should only render the toggle for types where this is True.

Mutations

createOrUpdateNotificationSetting (mutation)

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

Create or update a notification setting

Arguments

ArgumentTypeDescription
anomalyTypes[String]Deprecated. No longer supported for notification settings.
audienceIdUUIDAudience associated with the recipient
customMessageStringDeprecated. No longer supported for notification settings.
digestSettingsNotificationDigestSettingsDeprecated. No longer supported for notification settings.
dryBooleanTest destination is reachable by sending a sample alert. Note - setting is not saved and rules are not evaluated. Default: false.
extraNotificationExtraAny extra values
incidentSubTypes[IncidentSubType]Limit notifications to specific incident sub types (default=all). Deprecated. No longer supported for notification settings.
integrationIdUUIDIntegration ID for the recipient
notificationScheduleTypeStringDeprecated. No longer supported for notification settings.
notificationTypeString!Specify the notification integration to use. Supported options include: email, opsgenie, pagerduty, slack, slack_v2, google_chat, webhook, msteams, msteams_v2, alation, servicenow, jira, webex, incidentio, datadog, azure_devops, firehydrant
recipientStringDeprecated
recipients[String]Destination to send notifications to
rulesNotificationRoutingRulesDeprecated. No longer supported for notification settings.
settingIdUUIDFor updating a notification setting

Returns

CreateOrUpdateNotificationSetting

Example

mutation CreateOrUpdateNotificationSetting($notificationType: String!) {
  createOrUpdateNotificationSetting(notificationType: $notificationType) {
    notificationSetting {
      id
      deletedAt
      uuid
      createdTime
      lastUpdateTime
      name
      isTemplateManaged
      namespace
      type
      recipients
      extra
      notificationScheduleType
      notificationEnabled
      recipientDisplayName
      recipientsDisplayNames
      permalink
      alertSubTypes
      customMessage
      integrationId
      channelUrl
    }
  }
}

Types used only by createOrUpdateNotificationSetting

CreateOrUpdateNotificationSetting

Object type. Create or update a notification setting

FieldTypeDescription
notificationSettingAccountNotificationSettingSetting that was created or updated
MonitorLabelsMatchType

Enum type. Used to select the logical operator for matching labels

ValueDescription
AND
OR
NotificationRoutingRules

Input object type.

FieldTypeDescription
projectNames[String]Allowlist by project names
projectMcons[String]Allowlist by project mcons
datasetIds[UUID]Allowlist by dataset identifiers
fullTableIds[String]Allowlist by full table identifiers
tableMcons[String]Allowlist by table mcons
ruleIds[UUID]Allowlist by rule identifiers
domainIds[UUID]Allowlist by domain identifiers
tagKeys[String]Allowlist by tag keys
tagKeyValues[NotificationTagPairs]Allowlist by tag key/value pairs
allTagKeyValues[[NotificationTagPairs]]
tableStatsRulesTableStatsRulesAllowlist by table stats (importance_score, is_important).
monitorLabels[UUID]Allowlist by monitor labels
monitorLabelsMatchTypeMonitorLabelsMatchTypeLogic operator for matching labels. Defaults to OR.
excludeProjectNames[String]Denylist by project names
excludeProjectMcons[String]Denylist by project mcons
excludeDatasetIds[UUID]Denylist by dataset identifiers
excludeFullTableIds[String]Denylist by full table identifiers
excludeTableMcons[String]Denylist by table mcon identifiers
excludeTagKeys[String]Denylist by tag keys
excludeTagKeyValues[NotificationTagPairs]Denylist by tag key/value pairs
excludeAllTagKeyValues[[NotificationTagPairs]]
tableRegexStringFor use in updating regex based rules

Related types

AccountNotificationSetting, IncidentSubType, NotificationDigestSettings, NotificationExtra, NotificationTagPairs, TableStatsRules, UUID

createOrUpdateRecipientName (mutation)

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

Create or update a recipient's custom name

Arguments

ArgumentTypeDescription
nameString!Custom name
recipientString!Recipient string

Returns

CreateOrUpdateRecipientName

Example

mutation CreateOrUpdateRecipientName($name: String!, $recipient: String!) {
  createOrUpdateRecipientName(name: $name, recipient: $recipient) {
    recipient
    name
  }
}

Types used only by createOrUpdateRecipientName

CreateOrUpdateRecipientName

Object type. Create or update a recipient's custom name

FieldTypeDescription
recipientString
nameString

deleteNotificationSettings (mutation)

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

Arguments

ArgumentTypeDescription
uuids[UUID]!

Returns

DeleteNotificationSetting

Example

mutation DeleteNotificationSettings($uuids: [UUID]!) {
  deleteNotificationSettings(uuids: $uuids) {
    deleted
  }
}

Types used only by deleteNotificationSettings

DeleteNotificationSetting

Object type.

FieldTypeDescription
deletedInt

Related types

UUID

deleteRecipientName (mutation)

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

Create or update a recipient's custom name

Arguments

ArgumentTypeDescription
recipientString!Recipient string

Returns

DeleteRecipientName

Example

mutation DeleteRecipientName($recipient: String!) {
  deleteRecipientName(recipient: $recipient) {
    success
  }
}

Types used only by deleteRecipientName

DeleteRecipientName

Object type. Create or update a recipient's custom name

FieldTypeDescription
successBoolean

Source: The GraphQL API reference

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