Resource

Alert

Manage alerts for your project

The Alert Model

Properties

  • Name
    _id
    Type
    Object ID
    Description

    ID of this object

  • Name
    createdAt
    Type
    Date
    Description

    Date and Time when the object was created.

  • Name
    updatedAt
    Type
    Date
    Description

    Date and Time when the object was updated.

  • Name
    project
    Type
    Project
    Description

    Relation to Project Resource in which this object belongs

  • Name
    projectId
    Type
    Object IDRequired
    Description

    ID of your Project in which this object belongs

  • Name
    title
    Type
    Long TextRequired
    Description

    Title of this alert

  • Name
    description
    Type
    Markdown
    Description

    Short description of this alert. This will be visible on the status page. This is in markdown.

  • Name
    createdByUser
    Type
    User
    Description

    Relation to User who created this object (if this object was created by a User)

  • Name
    createdByUserId
    Type
    Object ID
    Description

    User ID who created this object (if this object was created by a User)

  • Name
    monitor
    Type
    Monitor
    Description

    Relation to monitor this alert belongs to

  • Name
    monitorId
    Type
    Object ID
    Description

    ID of the monitor this alert belongs to

  • Name
    onCallDutyPolicies
    Type
    On-Call Policy
    Description

    List of on-call duty policies affected by this alert.

  • Name
    labels
    Type
    Label
    Description

    Relation to Labels Array where this object is categorized in.

  • Name
    currentAlertState
    Type
    Alert State
    Description

    Current state of this alert. Is the alert acknowledged? or resolved?. This is related to Alert State

  • Name
    currentAlertStateId
    Type
    Object IDRequired
    Description

    Current Alert State ID

  • Name
    alertSeverity
    Type
    Alert Severity
    Description

    How severe is this alert. Is it critical? or a minor alert?. This is related to Alert Severity.

  • Name
    alertSeverityId
    Type
    Object IDRequired
    Description

    Alert Severity ID

  • Name
    monitorStatusWhenThisAlertWasCreated
    Type
    Monitor Status
    Description

    Monitor status when this alert was created

  • Name
    monitorStatusWhenThisAlertWasCreatedId
    Type
    Object ID
    Description

    Monitor Status ID when this alert was created

  • Name
    customFields
    Type
    JSON
    Description

    Custom Fields on this resource.

  • Name
    rootCause
    Type
    Markdown
    Description

    What is the root cause of this alert?

  • Name
    createdStateLog
    Type
    JSON
    Description

  • Name
    createdCriteriaId
    Type
    Long Text
    Description

    If this alert was created by a Probe, this is the ID of the criteria that created it.

  • Name
    createdByProbe
    Type
    Probe
    Description

    If this alert was created by a Probe, this is the probe that created it.

  • Name
    createdByProbeId
    Type
    Object ID
    Description

    If this alert was created by a Probe, this is the ID of the probe that created it.

  • Name
    isCreatedAutomatically
    Type
    Boolean
    Description

    Is this alert created by Probe or Workers automatically (and not created manually by a user)?

  • Name
    remediationNotes
    Type
    Markdown
    Description

    Notes on how to remediate this alert. This is in markdown.

  • Name
    telemetryQuery
    Type
    JSON
    Description

    Telemetry query for this alert

  • Name
    alertNumber
    Type
    Number
    Description

    Alert Number

  • Name
    alertNumberWithPrefix
    Type
    Text
    Description

    Alert number with prefix (e.g., 'ALT-42' or '#42')

  • Name
    alertEpisode
    Type
    Alert Episode
    Description

    The episode this alert belongs to (if grouped)

  • Name
    alertEpisodeId
    Type
    Object ID
    Description

    The ID of the episode this alert belongs to (if grouped)

GETorPOST/api/alert/get-list

List

This endpoint allows you to retrieve a paginated list of all your Alert. By default, a maximum of ten Alert are shown per page.

Optional Query Params

  • limit
    number
    Number of objects to fetch. By default 10, you can increase this count up to 100
  • skip
    number
    Number of objects to skip. This can be useful in pagination

Optional Request Body

List Request

POST
/api/alert/get-list?skip=0&limit=10
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "select": {
    "alertSeverityId": true,
    "currentAlertStateId": true,
    "projectId": true,
    "title": true,
    "alertNumber": true
  },
  "query": {
    "title": "High CPU usage detected on production server"
  },
  "sort": {
    "createdAt": -1
  }
}

Response

{
  "count": 10,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "_id": "376ab3e0-28fe-11f1-b591-3fdcef396aba",
      "alertSeverityId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
      "currentAlertStateId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "title": "High CPU usage detected on production server",
      "alertNumber": 42
    },
    {
      "_id": "376ab3e1-28fe-11f1-b591-3fdcef396aba",
      "alertSeverityId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
      "currentAlertStateId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "title": "High CPU usage detected on production server",
      "alertNumber": 42
    },
    {
      "_id": "376ab3e2-28fe-11f1-b591-3fdcef396aba",
      "alertSeverityId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
      "currentAlertStateId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "title": "High CPU usage detected on production server",
      "alertNumber": 42
    }
  ]
}
GETorPOST/api/alert/:id/get-item

Get item by ID

This endpoint allows you to retrieve Alert by ID.

  • id
    text
    ID of the Object

Optional Request Body

Get Item Request

POST
/api/alert/:id/get-item
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "select": {
    "alertSeverityId": true,
    "currentAlertStateId": true,
    "projectId": true,
    "title": true,
    "alertNumber": true
  }
}

Response

{
  "_id": "376ab3e0-28fe-11f1-b591-3fdcef396aba",
  "alertSeverityId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "currentAlertStateId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
  "title": "High CPU usage detected on production server",
  "alertNumber": 42
}
POST/api/alert/count

Count

This endpoint allows you to retrieve the count of all your Alert.

Optional Request Body

Count Request

POST
/api/alert/count
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "query": {
    "title": "High CPU usage detected on production server"
  }
}

Response

{
  "count": 107
}
POST/api/alert

Create Alert

This endpoint allows you to create a new object.

Create Request

POST
/api/alert
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "data": {
    "alertSeverityId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
    "currentAlertStateId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
    "title": "High CPU usage detected on production server",
    "description": "CPU usage has exceeded 90% threshold for the past 5 minutes. Immediate investigation required."
  }
}

Response

{
  "_id": "376ab3e0-28fe-11f1-b591-3fdcef396aba",
  "alertSeverityId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "currentAlertStateId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
  "title": "High CPU usage detected on production server",
  "alertNumber": 42
}
PUT/api/alert/:id

Update by ID

This endpoint allows you to update object by its ID.

Alternative Methods

For clients that do not support PUT requests, you can use POST or GET with the same request headers and body:

POST/api/alert/:id/update-item
GET/api/alert/:id/update-item

Update Request

PUT
/api/alert/:id
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "data": {
    "alertSeverityId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
    "currentAlertStateId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "title": "High CPU usage detected on production server"
  }
}

Response

{}
DELETE/api/alert/:id

Delete by ID

This endpoint allows you to delete object by its ID.

Alternative Methods

For clients that do not support DELETE requests, you can use POST or GET with the same request headers and body:

POST/api/alert/:id/delete-item
GET/api/alert/:id/delete-item

Delete Request

DELETE
/api/alert/:id
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY

Response

{}

Permissions

Your API Token needs permissions to create, update, read or delete this resource. If you do not have permissions to make a request a 4xx status will be sent as response.

Read Permissions

Required to read Alert

  • Project Owner
  • Project Admin
  • Project Member
  • Read Alert
  • Read All Project Resources

Create Permissions

Required to create Alert

  • Project Owner
  • Project Admin
  • Project Member
  • Create Alert

Update Permissions

Required to update Alert

  • Project Owner
  • Project Admin
  • Project Member
  • Edit Alert

Delete Permissions

Required to delete Alert

  • Project Owner
  • Project Admin
  • Project Member
  • Delete Alert