GET
/
monitoring-alerts
curl --request GET \
  --url https://api.godiligent.ai/monitoring-alerts \
  --header 'X-API-KEY: <api-key>'
{
  "items": [
    {
      "id": "a1b2c3d4",
      "monitoring_id": "d6e3b214-30b1-4401-a1b8-a1bd3c6a84e4",
      "website": "https://example.com",
      "status": "FAILED",
      "executionTime": "2024-06-20T10:00:00.000Z",
      "acknowledged": true,
      "details": {
        "check": "non_operational_website",
        "message": "Website is not reachable"
      }
    }
  ],
  "unacknowledgedCount": 123,
  "next_token": "<string>"
}

Overview

Retrieve a paginated list of monitoring alerts for the failed monitoring runs. Supports filtering by seen/unseen status and execution time, and provides an unseen alert count.

Request

  • Method: GET
  • Path: /monitoring-alerts
  • Query Parameters: Optional filters and pagination

Query Parameters

  • pageSize (integer, optional) - Number of alerts per page
    • Default: 10
    • Range: 1-100
    • Must be a positive integer
  • next_token (string, optional) - Pagination token for next page
  • onlyUnacknowledged (boolean, optional) - If true, returns only unacknowledged alerts
  • acknowledged (boolean, optional) - If true, returns only acknowledged alerts
  • executionTime_before (ISO8601 string, optional) - Only include alerts executed before this time
  • executionTime_after (ISO8601 string, optional) - Only include alerts executed after this time

Example Request

GET /monitoring-alerts?pageSize=20&onlyUnacknowledged=true

Success Response

  • Status: 200 OK

Response Body

  • items (array) - List of alert objects
    • id (string) - Unique identifier for the alert
    • monitoringId (string) - ID of the monitoring that triggered this alert
    • customerId (string) - ID of the customer that owns this monitoring
    • executionResultId (string) - ID of the execution result
    • website (string) - URL of the monitored website
    • failedChecks (array) - List of checks that failed
      • check (string) - The type of check that failed
      • explanation (string) - Explanation of the failure
      • methodUsed (string) - Method used for checking
      • status (string) - Status of the check
    • executionTime (string) - ISO8601 timestamp of when the monitoring was executed
    • createdAt (string) - ISO8601 timestamp of when the alert was created
    • acknowledged_at (string) - ISO8601 timestamp of when the alert was acknowledged
    • externalId (string, optional) - External reference ID
  • unacknowledgedCount (integer) - Number of unacknowledged alerts for the customer
  • next_token (string|null) - Token for next page (null if no more pages)

Example Response

{
  "items": [
    {
      "id": "532ebbd3-269d-4c8f-b73b-2269eb83f1ae",
      "monitoringId": "c3853e7e-46dc-4c1f-afb4-028b3bdfce19",
      "customerId": "69df5d81-2b74-4f42-a401-13eb96ba0619",
      "executionResultId": "e79a2fe0-041f-4357-8b3b-43aa8410ab0b",
      "website": "https://dokanstore-sa.com/",
      "failedChecks": [
        {
          "check": "non_operational_website",
          "explanation": "No Website Data found",
          "methodUsed": "",
          "status": "FAILED"
        }
      ],
      "executionTime": "2025-06-20T18:25:51.409Z",
      "createdAt": "2025-06-20T20:45:48.460Z",
      "acknowledged_at": "1970-01-01T00:00:00.000Z",
      "externalId": "cb7f0fab-38b7-4043-bd7f-5976ed4b5e19"
    },
    {
      "id": "f085ca1e-8079-4a6c-8b1d-c17796c0aff5",
      "monitoringId": "288888fc-b5b4-4131-bac8-d45c33e9e32b",
      "customerId": "69df5d81-2b74-4f42-a401-13eb96ba0619",
      "executionResultId": "bccc5556-96bf-492a-aa69-09a1faefed15",
      "website": "https://example-02.com/",
      "failedChecks": [
        {
          "check": "non_operational_website",
          "explanation": "No Website Data found",
          "methodUsed": "",
          "status": "FAILED"
        }
      ],
      "executionTime": "2025-06-20T18:25:45.215Z",
      "createdAt": "2025-06-20T20:45:48.460Z",
      "acknowledged_at": "1970-01-01T00:00:00.000Z",
      "externalId": "cb7f0fab-38b7-4043-bd7f-5976ed4b5e19"
    }
  ],
  "unacknowledgedCount": 2,
  "next_token": null
}

Error Handling

  • 400 Bad Request
    • Invalid query parameter values
    • Example: { "error": "pageSize must be a positive integer between 1 and 100" }
  • 401 Unauthorized
    • Missing or invalid customer authentication
  • 500 Internal Server Error
    • Unexpected server error

Pagination

The API uses cursor-based pagination with Base64-encoded tokens:

  1. First request: Don’t include next_token
  2. Subsequent requests: Use the next_token from the previous response
  3. Last page: next_token will be null

Authorizations

X-API-KEY
string
header
required

Query Parameters

pageSize
integer
default:10

Number of alerts per page (1-100, default 10)

Required range: 1 <= x <= 100
next_token
string

Pagination token for next page (Base64-encoded)

onlyUnacknowledged
enum<string>

If 'true', returns only unacknowledged alerts

Available options:
true,
false
acknowledged
enum<string>

If 'true', returns only acknowledged alerts

Available options:
true,
false
executionTime_before
string

Only include alerts executed before this time (ISO8601)

executionTime_after
string

Only include alerts executed after this time (ISO8601)

Response

200
application/json

OK

The response is of type object.