Audiences (GraphQL)

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

Queries

getNotificationAudienceCreators (query)

getNotificationAudienceCreators 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

Retrieve users who created notification audiences. This may include null if there are audiences without a creator

Arguments

ArgumentTypeDescription
audienceIdUUIDAudience associated with the recipient
searchStringSearch text to filter the audiences list, returning those whose labels contain the specified text

Returns

[User]

Example

query GetNotificationAudienceCreators {
  getNotificationAudienceCreators {
    id
    cognitoUserId
    email
    firstName
    lastName
    displayName
    state
    createdOn
    isSso
    ssoGroups
    ssoGroupsUpdatedAt
    tokenId
    isDeleted
    deletedAt
    deleteReason
    invalidatedAt
    persona
    role
  }
}

Related types

UUID, User

getNotificationAudiences (query)

getNotificationAudiences 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

Get notification audiences

Arguments

ArgumentTypeDescription
audienceIdUUIDAudience associated with the recipient
searchStringSearch text to filter the audiences list, returning those whose labels contain the specified text
createdBy[String]Filter by creator using a list of user emails. It can include null to filter audiences without a creator
orderByStringField and direction to order audiences by
limitIntNumber of audiences to return
offsetIntFrom which audience to return the next results

Returns

[NotificationAudience!]

Example

query GetNotificationAudiences {
  getNotificationAudiences {
    uuid
    accountUuid
    label
    defaultFailureAudience
    routingRulesCount
    customMonitorsCount
    notificationServices
    notificationSettingsCount
    incidentCount
  }
}

Related types

NotificationAudience, UUID

getNotificationAudiencesCount (query)

getNotificationAudiencesCount 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

The number of audiences matching the filters

Arguments

ArgumentTypeDescription
audienceIdUUIDAudience associated with the recipient
searchStringSearch text to filter the audiences list, returning those whose labels contain the specified text
createdBy[String]Filter by creator using a list of user emails. It can include null to filter audiences without a creator

Returns

Int

Example

query GetNotificationAudiencesCount {
  getNotificationAudiencesCount
}

Related types

UUID

getNotificationCounts (query)

getNotificationCounts 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 counts over the last 30 days

Returns

[NotificationRecordCount!]

Example

query GetNotificationCounts {
  getNotificationCounts {
    accountUuid
    audienceUuid
    incidentNotifications
    digestNotifications
  }
}

Types used only by getNotificationCounts

NotificationRecordCount

Object type.

FieldTypeDescription
accountUuidUUID!Account UUID
audienceUuidUUID!Audience UUID
incidentNotificationsInt!Incident notification count over the last 30 days
digestNotificationsInt!Digest notification count over the last 30 days

Related types

UUID

getNotificationSettingsForAudiences (query)

getNotificationSettingsForAudiences 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

The notification settings that will be used for the given audiences

Arguments

ArgumentTypeDescription
labelNames[String]Label names.

Returns

[NotificationSetting!]

Example

query GetNotificationSettingsForAudiences {
  getNotificationSettingsForAudiences {
    uuid
    createdTime
    lastUpdateTime
    name
    isTemplateManaged
    namespace
    type
    recipients
    extra
    notificationEnabled
    integrationUuid
    recipientsDisplayNames
    customDisplayNames
    incidentCount
    integrationId
    teamId
    channelUrl
  }
}

Related types

NotificationSetting

getNotificationSettingsForOotb (query)

getNotificationSettingsForOotb 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 OOTB notification settings for the given asset

Arguments

ArgumentTypeDescription
mconString!Asset MCON
anomalyTypeIncidentSubType!OOTB anomaly type

Returns

[NotificationSetting!]

Example

query GetNotificationSettingsForOotb($mcon: String!, $anomalyType: IncidentSubType!) {
  getNotificationSettingsForOotb(mcon: $mcon, anomalyType: $anomalyType) {
    uuid
    createdTime
    lastUpdateTime
    name
    isTemplateManaged
    namespace
    type
    recipients
    extra
    notificationEnabled
    integrationUuid
    recipientsDisplayNames
    customDisplayNames
    incidentCount
    integrationId
    teamId
    channelUrl
  }
}

Related types

IncidentSubType, NotificationSetting

Mutations

createOrUpdateAudience (mutation)

createOrUpdateAudience 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 a notification audience

Arguments

ArgumentTypeDescription
labelString!Label for the audience
notificationSettings[AudienceNotificationSettingInput]!Notification settings for the audience
uuidUUIDFor updating an audience

Returns

CreateOrUpdateAudience

Example

mutation CreateOrUpdateAudience($label: String!, $notificationSettings: [AudienceNotificationSettingInput]!) {
  createOrUpdateAudience(label: $label, notificationSettings: $notificationSettings) {
    audience {
      uuid
      accountUuid
      label
      defaultFailureAudience
      routingRulesCount
      customMonitorsCount
      notificationServices
      notificationSettingsCount
      incidentCount
    }
  }
}

Types used only by createOrUpdateAudience

AudienceNotificationSettingInput

Input object type.

FieldTypeDescription
recipients[String]!Destination to send notifications to
customDisplayNames[String]Display names for the recipients. If this input parameter is provided, it should contain an entry for each recipient in the same order as the recipients list
recipientsDisplayNames[String]Display names for the recipients. If this input parameter is provided, it should contain an entry for each recipient in the same order as the recipients list
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
extraNotificationExtraAny extra values
audienceIdUUIDAudience associated with the recipient
integrationIdUUIDIntegration ID for the recipient
uuidUUIDFor updating a notification setting
CreateOrUpdateAudience

Object type. Create a notification audience

FieldTypeDescription
audienceNotificationAudience

Related types

NotificationAudience, NotificationExtra, UUID

createOrUpdateAudienceNotificationSetting (mutation)

createOrUpdateAudienceNotificationSetting 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 an audience notification setting

Arguments

ArgumentTypeDescription
audienceIdUUIDAudience associated with the recipient
customDisplayNames[String]Display names for the recipients. If this input parameter is provided, it should contain an entry for each recipient in the same order as the recipients list
dryBooleanTest destination is reachable by sending a sample alert. Note - setting is not saved and rules are not evaluated. Default: false.
extraNotificationExtraAny extra values
integrationIdUUIDIntegration ID for the recipient
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
recipients[String]!Destination to send notifications to
recipientsDisplayNames[String]Display names for the recipients. If this input parameter is provided, it should contain an entry for each recipient in the same order as the recipients list
uuidUUIDFor updating a notification setting

Returns

CreateOrUpdateAudienceNotificationSetting

Example

mutation CreateOrUpdateAudienceNotificationSetting($notificationType: String!, $recipients: [String]!) {
  createOrUpdateAudienceNotificationSetting(notificationType: $notificationType, recipients: $recipients) {
    notificationSetting {
      uuid
      createdTime
      lastUpdateTime
      name
      isTemplateManaged
      namespace
      type
      recipients
      extra
      notificationEnabled
      integrationUuid
      recipientsDisplayNames
      customDisplayNames
      incidentCount
      integrationId
      teamId
      channelUrl
    }
  }
}

Types used only by createOrUpdateAudienceNotificationSetting

CreateOrUpdateAudienceNotificationSetting

Object type. Create or update an audience notification setting

FieldTypeDescription
notificationSettingNotificationSettingSetting that was created or updated

Related types

NotificationExtra, NotificationSetting, UUID

createOrUpdateAudienceRoutingRule (mutation)

createOrUpdateAudienceRoutingRule 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 an audience routing rule

Arguments

ArgumentTypeDescription
alertSubTypes[AlertSubType]Limit notifications to specific alert sub types (default=all).
allTagKeyValues[[NotificationTagPairs]]
anomalyTypes[String]Limit notifications to specific incident types (default=all). Supported options include: anomalies, schema_changes, json_schema_changes, deleted_tables, metric_anomalies, agent_metric_anomalies, agent_evaluation_anomalies, agent_anomalies, metric_comparison_anomalies, custom_rule_anomalies, performance_anomalies, dbt_errors, etl_errors, pseudo_integration_test, rule_run_execution_error, merged
assetsMcons[String]Allowlist by asset mcons
audienceIdUUID!Audience associated with the rule
customMessageStringA custom message to be sent with triggered notification
datasetIds[UUID]Allowlist by dataset identifiers
digestSettingsNotificationDigestSettingsDeprecated. No longer supported for audience routing rules.
domainIds[UUID]Allowlist by domain identifiers
excludeAllTagKeyValues[[NotificationTagPairs]]
excludeAssetsMcons[String]Denylist by asset mcons
excludeDatasetIds[UUID]Denylist by dataset identifiers
excludeFullTableIds[String]Denylist by full table identifiers
excludeProjectMcons[String]Denylist by project mcons
excludeProjectNames[String]Denylist by project names
excludeTableMcons[String]Denylist by table mcon identifiers
excludeTagKeyValues[NotificationTagPairs]Denylist by tag key/value pairs
excludeTagKeys[String]Denylist by tag keys
fullTableIds[String]Allowlist by full table identifiers
incidentSubTypes[IncidentSubType]Limit notifications to specific incident sub types (default=all). Deprecated, use alertSubTypes instead.
projectMcons[String]Allowlist by project mcons
projectNames[String]Allowlist by project names
tableMcons[String]Allowlist by table mcons
tableRegexStringFor use in updating regex based rules
tableStatsRulesTableStatsRulesAllowlist by table stats (importance_score, is_important).
tagKeyValues[NotificationTagPairs]Allowlist by tag key/value pairs
tagKeys[String]Allowlist by tag keys
uuidUUIDRule ID to update a routing rule

Returns

CreateOrUpdateAudienceRoutingRule

Example

mutation CreateOrUpdateAudienceRoutingRule($audienceId: UUID!) {
  createOrUpdateAudienceRoutingRule(audienceId: $audienceId) {
    routingRule {
      uuid
      tableRules
      tagRules
      sqlRules
      tableStatsRules
      domainRules
      tableIdRules
      assetRules
      anomalyTypes
      incidentSubTypes
      customMessage
      createdTime
      updatedTime
      incidentCount
      alertSubTypes
      assetDisplayNames
    }
  }
}

Types used only by createOrUpdateAudienceRoutingRule

CreateOrUpdateAudienceRoutingRule

Object type. Create or update an audience routing rule

FieldTypeDescription
routingRuleNotificationRoutingRuleRouting rule that was created or updated

Related types

AlertSubType, IncidentSubType, NotificationDigestSettings, NotificationRoutingRule, NotificationTagPairs, TableStatsRules, UUID

deleteAudienceNotificationSetting (mutation)

deleteAudienceNotificationSetting 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

DeleteAudienceNotificationSetting

Example

mutation DeleteAudienceNotificationSetting($uuids: [UUID]!) {
  deleteAudienceNotificationSetting(uuids: $uuids) {
    deleted
  }
}

Types used only by deleteAudienceNotificationSetting

DeleteAudienceNotificationSetting

Object type.

FieldTypeDescription
deletedInt

Related types

UUID

deleteAudienceRoutingRule (mutation)

deleteAudienceRoutingRule 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

DeleteAudienceRoutingRule

Example

mutation DeleteAudienceRoutingRule($uuids: [UUID]!) {
  deleteAudienceRoutingRule(uuids: $uuids) {
    deleted
  }
}

Types used only by deleteAudienceRoutingRule

DeleteAudienceRoutingRule

Object type.

FieldTypeDescription
deletedInt

Related types

UUID

setDefaultFailureAudiences (mutation)

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

Status: Experimental

Set default failure audiences (labels) for the account

Arguments

ArgumentTypeDescription
audienceIds[UUID!]!Audience (labels) UUIDs to set as default for failure notifications

Returns

SetDefaultFailureAudiences

Example

mutation SetDefaultFailureAudiences($audienceIds: [UUID!]!) {
  setDefaultFailureAudiences(audienceIds: $audienceIds) {
    success
  }
}

Types used only by setDefaultFailureAudiences

SetDefaultFailureAudiences

Object type.

FieldTypeDescription
successBoolean

Related types

UUID

Source: The GraphQL API reference

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