List alerts

projectAlerts(projectReference: ID!, status: [AlertStatus!], sortOrder: AlertSortOrder, limit: Int, cursor: String): ProjectAlertPage!

Requires project.logs.read.

Arguments

ArgumentTypeRequiredDescription
projectReferenceID!YesProject UUID or slug.
status[AlertStatus!]NoOnly alerts in one of these statuses. Omit for firing and resolved alerts.
sortOrderAlertSortOrderNoOrder by first seen time; ties break by id ascending. Defaults to desc, newest first.
limitIntNoAlerts per page, 1 to 100; default 20.
cursorStringNoThe previous page's pageInfo.endCursor.

Response

Returns ProjectAlertPage!. Open the type for its fields and nested types.

FieldType
data[ProjectAlert!]!
pageInfoPageInfo!

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
query ProjectAlerts($projectReference: ID!, $status: [AlertStatus!], $sortOrder: AlertSortOrder, $limit: Int, $cursor: String) {
  projectAlerts(projectReference: $projectReference, status: $status, sortOrder: $sortOrder, limit: $limit, cursor: $cursor) {
    data {
      id
      status
      errorCode
      resolvedAt
      ruleId
    }
    pageInfo {
      hasNextPage
      endCursor
      hasPreviousPage
      startCursor
    }
  }
}
json
{
  "projectReference": "00000000-0000-4000-8000-000000000001"
}