Alerts (GraphQL)

Related queries and mutations in Alerts and incidents. Each has its own section.

Queries

getAlert (query)

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

Status: Experimental

Returns an alert or a merged alert (which only contains data to inform which alert it was merged into).

Arguments

ArgumentTypeDescription
idUUID!

Returns

GenericAlert

Example

query GetAlert($id: UUID!) {
  getAlert(id: $id)
}

Types used only by getAlert

GenericAlert

Union type.

One of: Alert, MergedAlert

Related types

Alert, MergedAlert, UUID

getAlertAccessRequest (query)

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

Status: Deprecated: Use getAccessRequest instead

DEPRECATED. Get the status of an alert access request for the current user

Arguments

ArgumentTypeDescription
alertIdUUID!UUID of the alert

Returns

AlertAccessRequest

Example

query GetAlertAccessRequest($alertId: UUID!) {
  getAlertAccessRequest(alertId: $alertId) {
    id
    userId
    alertId
    status
    createdTime
    updatedTime
    notifiedAdmins
  }
}

Related types

AlertAccessRequest, UUID

getAlertDescription (query)

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

Status: Experimental

Get a textual representation of an alert's description

Arguments

ArgumentTypeDescription
idUUID!UUID of the alert

Returns

AlertDescriptionOutput

Example

query GetAlertDescription($id: UUID!) {
  getAlertDescription(id: $id) {
    description
  }
}

Types used only by getAlertDescription

AlertDescriptionOutput

Object type.

FieldTypeDescription
descriptionString

Related types

UUID

getAlerts (query)

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

Status: Experimental

Get alerts (i.e. a collection of related events) in my account within a 2 month time range. Excludes alerts that have been merged into another.

Arguments

ArgumentTypeDescription
onAgentReadTablesBooleanTrue restricts alerts to known tables read by observed agents. The agents are those seen since the start of the time range, or in the last 3 hours if the range started more recently. The time range is createdTime, or updatedTime when createdTime is not supplied. The range end does not narrow the agents. Requires Assets and Lineage access in addition to Alerts access; a denied or failed dependency query raises an error. False or null applies no restriction.
updatedTimeDateTimeRangeInputSupply a time range within 2 months. Either this or createdTime or ids must be provided.
createdTimeDateTimeRangeInputSupply a time range within 2 months. Either this or updatedTime or ids must be provided.
ids[UUID!]Either this or updated_time or createdTime must be provided.
filterAlertsFilterInputFilter alerts.
agentFilters[AgentFilterInput!]Filter alerts by agent. Returns alerts associated with monitors covering the specified agent trace tables. With workflow set, a filter returns only the alerts of monitors whose agent span filter pins that workflow. AgentFilterInput.workflow lists the values it refuses.
offsetInt
beforeString
afterString
firstInt
lastInt
orderByStringOrder results by createdTime, updatedTime, sloBreachedTime, or triagePriority. Sorting by triagePriority always puts NOT_TRIAGED alerts at the bottom, regardless of asc/desc.

Returns

AlertConnection

Example

query GetAlerts {
  getAlerts {
    totalCount
  }
}

Types used only by getAlerts

AlertConnection

Object type.

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edges[AlertEdge]!Contains the nodes in this connection.
totalCountInt
AlertEdge

Object type. A Relay edge containing a Alert and its cursor.

FieldTypeDescription
nodeAlertThe item at the end of the edge
cursorString!A cursor for use in pagination

Related types

AgentFilterInput, Alert, AlertsFilterInput, DateTimeRangeInput, PageInfo, UUID

getAlertsCountByDate (query)

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

Status: Experimental

Get alert count by the updated_time date.

Arguments

ArgumentTypeDescription
updatedTimeDateTimeRangeInput!Supply a time range within 2 months.
filterAlertsFilterInputFilter alerts.
beforeString
afterString
firstInt
lastInt

Returns

AlertsCountByDateConnection

Example

query GetAlertsCountByDate($updatedTime: DateTimeRangeInput!) {
  getAlertsCountByDate(updatedTime: $updatedTime) {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Types used only by getAlertsCountByDate

AlertsCountByDate

Object type.

FieldTypeDescription
dateDateAlert updated date
countIntCount of alerts on the date
AlertsCountByDateConnection

Object type.

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edges[AlertsCountByDateEdge]!Contains the nodes in this connection.
AlertsCountByDateEdge

Object type. A Relay edge containing a AlertsCountByDate and its cursor.

FieldTypeDescription
nodeAlertsCountByDateThe item at the end of the edge
cursorString!A cursor for use in pagination

Related types

AlertsFilterInput, Date, DateTimeRangeInput, PageInfo

getAlertsFilters (query)

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

Status: Experimental

Filters that can be applied when requesting for a list of alerts

Returns

[AlertsFilter]

Example

query GetAlertsFilters {
  getAlertsFilters {
    fieldName
    displayName
    queryParameterName
    queryParameterAcceptsMultipleValues
    facetable
    facetSearchable
  }
}

Types used only by getAlertsFilters

AlertsFilter

Object type.

FieldTypeDescription
fieldNameAlertsFilterFieldName!
displayNameString!
queryParameterNameString!Associated getAlerts parameter used to filter alerts
queryParameterAcceptsMultipleValuesBoolean!Whether the associated getAlerts parameter accepts multiple values as input
facetableBoolean!Whether the filter shows up as a facet on the alert feed page
facetSearchableBoolean!Whether the filter values can be searched by their display name

Related types

AlertsFilterFieldName

getAlertsFiltersData (query)

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

Status: Experimental

Filters that can be applied when requesting for a list of alerts

Arguments

ArgumentTypeDescription
request[AlertsFilterDataRequestType]!

Returns

[AlertsFilterData]

Example

query GetAlertsFiltersData($request: [AlertsFilterDataRequestType]!) {
  getAlertsFiltersData(request: $request) {
    fieldName
  }
}

Types used only by getAlertsFiltersData

AlertsFilterData

Object type.

FieldTypeDescription
fieldNameAlertsFilterFieldName
values[AlertsFilterDataValue]List of possible values to filter alerts by
pageInfoNextPageInfoData for paginating values
AlertsFilterDataFilterType

Input object type.

FieldTypeDescription
fieldNameAlertsFilterFieldName!
valueGenericScalar
AlertsFilterDataRequestType

Input object type.

FieldTypeDescription
fieldNameAlertsFilterFieldName!
searchCriteriaAlertsFilterDataSearchCriteriaType!
firstIntNumber of results to return
afterStringCursor to paginate results
searchValueStringRespond with filter values which contain this text
AlertsFilterDataSearchCriteriaType

Input object type.

FieldTypeDescription
onAgentReadTablesBooleanTrue restricts facet counts to known tables read by observed agents. The agents are those seen since the start of the time range, or in the last 3 hours if the range started more recently. The time range is createdTime, or updatedTime when createdTime is not supplied. The range end does not narrow the agents. Requires Assets and Lineage access in addition to Alerts access; a denied or failed dependency query raises an error. False or null applies no restriction.
updatedTimeDateTimeRangeInputSupply a time range to filter alerts by their updated time. Either this or createdTime must be supplied.
createdTimeDateTimeRangeInputSupply a time range to filter alerts by their created time. Either this or updatedTime must be supplied.
filters[AlertsFilterDataFilterType]List of filters to apply to alerts
fromAgentMonitorBooleanScope the aggregated counts to alerts whose monitor was created by an agent (true) or not (false). Mirrors the getAlerts filter of the same name so the facet counts match the list. Omit for no constraint.
AlertsFilterDataValue

Object type.

FieldTypeDescription
valueGenericScalar
displayNameString
countInt
childValues[AlertsFilterDataValue]
queryParameterNameStringIf this has a value, it should override the value from AlertsFilter

Related types

AlertsFilterFieldName, DateTimeRangeInput, GenericScalar, NextPageInfo

Mutations

mergeAlerts (mutation)

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

Status: Experimental

Merge specified alerts into another alert

Arguments

ArgumentTypeDescription
fromAlertIds[UUID!]!UUID of the alert to merge from
toAlertMergeAlertsInput!Merge alerts into specified alert

Returns

MergeAlerts

Example

mutation MergeAlerts($fromAlertIds: [UUID!]!, $toAlert: MergeAlertsInput!) {
  mergeAlerts(fromAlertIds: $fromAlertIds, toAlert: $toAlert) {
    alert {
      id
      title
      type
      subTypes
      severity
      priority
      triagePriority
      triageState
      tsaAnalysisThreadId
      hasTsaInvestigation
      status
      monitorUuids
      fromAgentMonitor
      invalidRows
      inTeammateDomain
      commentCount
      lastCommentText
      createdTime
      updatedTime
      sloStatus
    }
  }
}

Types used only by mergeAlerts

MergeAlerts

Object type. Merge alerts together

FieldTypeDescription
alertAlertThe updated alert
MergeAlertsInput

Input object type.

FieldTypeDescription
idUUID!UUID of the alert to update
severitySeverityInputBy assigning a severity to the alert, the alert will be declared an incident
statusAlertStatusInputStatus to assign to the alert.
nameString!Custom name for the alert.

Related types

Alert, AlertStatusInput, SeverityInput, UUID

requestAlertAccess (mutation)

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

Status: Deprecated: Use requestAccess instead

DEPRECATED. Request access to view an alert

Arguments

ArgumentTypeDescription
alertIdUUID!UUID of the alert to request access for

Returns

AlertAccessRequestOutput

Example

mutation RequestAlertAccess($alertId: UUID!) {
  requestAlertAccess(alertId: $alertId) {
    success
  }
}

Types used only by requestAlertAccess

AlertAccessRequestOutput

Object type.

FieldTypeDescription
successBoolean!Whether the operation was successful
accessRequestAlertAccessRequestThe access request object

Related types

AlertAccessRequest, UUID

updateAlertActionPermissionSettings (mutation)

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

Status: Experimental

Set whether the calling user's account requires a permitted Monte Carlo user to act on alerts from connected Slack and Microsoft Teams channels.

Arguments

ArgumentTypeDescription
enforcementEnabledBoolean!Whether acting on an alert from a connected Slack or Microsoft Teams channel requires a matching Monte Carlo user with sufficient permissions. When false, anyone in a connected channel can interact with and resolve alerts, even without a Monte Carlo account. Enabling this can block people who act on alerts today, because it requires the connected app to share their email and requires that email to match an invited Monte Carlo user.

Returns

UpdateAlertActionPermissionSettings

Example

mutation UpdateAlertActionPermissionSettings($enforcementEnabled: Boolean!) {
  updateAlertActionPermissionSettings(enforcementEnabled: $enforcementEnabled) {
    alertActionPermissionSettings {
      enforcementEnabled
    }
  }
}

Types used only by updateAlertActionPermissionSettings

AlertActionPermissionSettings

Object type. Account-wide control over who may act on alerts from connected chat channels.

The value applies to every Slack and Microsoft Teams integration in the account.

FieldTypeDescription
enforcementEnabledBoolean!Whether acting on an alert from a connected Slack or Microsoft Teams channel requires a matching Monte Carlo user with sufficient permissions. When false, anyone in a connected channel can interact with and resolve alerts, even without a Monte Carlo account.
UpdateAlertActionPermissionSettings

Object type. Set whether alert actions from connected chat channels require a permitted user.

FieldTypeDescription
alertActionPermissionSettingsAlertActionPermissionSettings!The updated settings.

Source: The GraphQL API reference

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