> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dqlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Alert

> Alert endpoints: Get Alerts, Update Alert

<script type="application/ld+json">
  {`{
            "@context": "https://schema.org",
            "@type": "TechArticle",
            "headline": "Alert",
            "description": "Alert endpoints: Get Alerts, Update Alert",
            "url": "https://docs.dqlabs.ai/api-reference/metrics/alert",
            "publisher": {
              "@type": "Organization",
              "name": "DQLabs Inc",
              "logo": "https://media.brand.dev/332adc35-5bc4-4d2b-bf78-256aa4a5e414.svg"
            }
            }`}
</script>

<Tabs>
  <Tab title="Get Alerts">
    `POST /api/v1/metrics/alert/list`

    Get all alerts

    **Request Body**

    <ParamField body="pagination" type="object">
      <ParamField body="page" type="integer">
        Example: `1`.
      </ParamField>

      <ParamField body="pageSize" type="integer">
        Example: `10`.
      </ParamField>
    </ParamField>

    <ParamField body="sorting" type="object[]" />

    <ParamField body="filters" type="object[]" />

    <ParamField body="search" type="string">
      Example: `""`.
    </ParamField>

    <ParamField body="export" type="boolean">
      Example: `false`.
    </ParamField>

    **Response**

    <ResponseField name="success" type="boolean">Whether the request completed successfully</ResponseField>

    <ResponseField name="message" type="string">Human-readable result message</ResponseField>

    <ResponseField name="timestamp" type="string">ISO 8601 server timestamp</ResponseField>

    <ResponseField name="correlation_id" type="string">Unique ID for this request</ResponseField>

    <ResponseField name="data" type="object">
      <ResponseField name="data" type="object[]">
        <ResponseField name="id" type="string">
          Example: `"512cbad5-ebfa-406d-85f6-b0bb2056323d"`.
        </ResponseField>

        <ResponseField name="percentage_change" type="number">
          Example: `896.566370017725`.
        </ResponseField>

        <ResponseField name="priority" type="string">
          Example: `"CRITICAL"`.
        </ResponseField>

        <ResponseField name="value" type="number">
          Example: `4.5`.
        </ResponseField>

        <ResponseField name="threshold" type="object" />

        <ResponseField name="message" type="string">
          Example: `"MSSQL Behavioral — Segment Gold spiked 896.6% above baseline"`.
        </ResponseField>

        <ResponseField name="marked_as" type="string">
          Example: `"ACTIVE"`.
        </ResponseField>

        <ResponseField name="collected_at" type="string">
          Example: `"2027-01-01T00:00:00Z"`.
        </ResponseField>

        <ResponseField name="sla_status" type="string">
          Example: `"ON_TRACK"`.
        </ResponseField>

        <ResponseField name="asset_id" type="string">
          Example: `"9d66d5f9-ec0e-4ff6-93ca-1ca57009d27c"`.
        </ResponseField>

        <ResponseField name="asset_type" type="string">
          Example: `"TABLE"`.
        </ResponseField>

        <ResponseField name="asset_name" type="string">
          Example: `"CUSTOMERAI_INCRMT"`.
        </ResponseField>

        <ResponseField name="qualified_name" type="string">
          Example: `"\"dqlabs\".\"CustomerAI\".\"CUSTOMERAI_INCRMT\""`.
        </ResponseField>

        <ResponseField name="schema_name" type="string">
          Example: `"behavioral"`.
        </ResponseField>

        <ResponseField name="table_name" type="string">
          Example: `"cef6f1d6_b1b2_4a0b_93e3_31424017a0a7"`.
        </ResponseField>

        <ResponseField name="metric_id" type="string">
          Example: `"ddd62d78-71ed-4589-90d9-64dc9f8c8126"`.
        </ResponseField>

        <ResponseField name="metric_detail_id" type="string">
          Example: `"cef6f1d6-b1b2-4a0b-93e3-31424017a0a7"`.
        </ResponseField>

        <ResponseField name="metric_type" type="string">
          Example: `"custom"`.
        </ResponseField>

        <ResponseField name="metric_name" type="string">
          Example: `"behavioral"`.
        </ResponseField>

        <ResponseField name="metric_detail_context" type="string">
          Example: `"Business"`.
        </ResponseField>

        <ResponseField name="metric_detail_category" type="string">
          Example: `"Behavioral"`.
        </ResponseField>

        <ResponseField name="metric_detail_subcategory" type="string">
          Example: `"Segment"`.
        </ResponseField>

        <ResponseField name="metric_detail_sigma" type="number">
          Example: `0.0`.
        </ResponseField>

        <ResponseField name="metric_detail_pass_criteria" type="object" />

        <ResponseField name="auto_threshold" type="boolean">
          Example: `true`.
        </ResponseField>

        <ResponseField name="issue_id" type="string">
          Example: `"044f21cb-0b63-4132-b817-2a20c6b0286b"`.
        </ResponseField>

        <ResponseField name="issue_ref_id" type="string">
          Example: `"ISU-124"`.
        </ResponseField>

        <ResponseField name="database_asset_id" type="string">
          Example: `"d59eb4a6-58ca-4cb9-8e4d-e40e09e3ce06"`.
        </ResponseField>

        <ResponseField name="schema_asset_id" type="string">
          Example: `"a055619b-ce67-4617-a777-fb569e7c0897"`.
        </ResponseField>

        <ResponseField name="table_asset_id" type="string">
          Example: `"9d66d5f9-ec0e-4ff6-93ca-1ca57009d27c"`.
        </ResponseField>

        <ResponseField name="source_type" type="string">
          Example: `"MSSQL"`.
        </ResponseField>

        <ResponseField name="segment" type="string">
          Example: `"Gold"`.
        </ResponseField>
      </ResponseField>

      <ResponseField name="total_count" type="integer">
        Example: `7583`.
      </ResponseField>

      <ResponseField name="metrics" type="object[]">
        <ResponseField name="type" type="string">
          Example: `"Operational"`.
        </ResponseField>

        <ResponseField name="title" type="string">
          Example: `"OPERATIONAL"`.
        </ResponseField>

        <ResponseField name="value" type="integer">
          Example: `5138`.
        </ResponseField>
      </ResponseField>
    </ResponseField>

    **Example**

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://<your-workspace>.prizmdata.ai/api/v1/metrics/alert/list" \
        -H "Authorization: Bearer <YOUR_API_TOKEN>" \
        -H "Content-Type: application/json" \
        -d '{
        "pagination": {
          "page": 1,
          "pageSize": 10
        },
        "sorting": [],
        "filters": [],
        "search": "",
        "export": false
      }'
      ```
    </CodeGroup>

    ```json Response theme={null}
    {
      "success": true,
      "message": "Get all alerts",
      "timestamp": "2026-09-21T09:43:50.316067+00:00",
      "correlation_id": "1bff0823-3db2-4b12-bf56-22ea8d38bba2",
      "data": {
        "data": [
          {
            "id": "512cbad5-ebfa-406d-85f6-b0bb2056323d",
            "percentage_change": 896.566370017725,
            "priority": "CRITICAL",
            "value": 4.5,
            "threshold": {},
            "message": "MSSQL Behavioral — Segment Gold spiked 896.6% above baseline",
            "marked_as": "ACTIVE",
            "collected_at": "2027-01-01T00:00:00Z",
            "sla_status": "ON_TRACK",
            "asset_id": "9d66d5f9-ec0e-4ff6-93ca-1ca57009d27c",
            "asset_type": "TABLE",
            "asset_name": "CUSTOMERAI_INCRMT",
            "qualified_name": "\"dqlabs\".\"CustomerAI\".\"CUSTOMERAI_INCRMT\"",
            "schema_name": "behavioral",
            "table_name": "cef6f1d6_b1b2_4a0b_93e3_31424017a0a7",
            "metric_id": "ddd62d78-71ed-4589-90d9-64dc9f8c8126",
            "metric_detail_id": "cef6f1d6-b1b2-4a0b-93e3-31424017a0a7",
            "metric_type": "custom",
            "metric_name": "behavioral",
            "metric_detail_context": "Business",
            "metric_detail_category": "Behavioral",
            "metric_detail_subcategory": "Segment",
            "metric_detail_sigma": 0.0,
            "metric_detail_pass_criteria": {},
            "auto_threshold": true,
            "issue_id": "044f21cb-0b63-4132-b817-2a20c6b0286b",
            "issue_ref_id": "ISU-124",
            "database_asset_id": "d59eb4a6-58ca-4cb9-8e4d-e40e09e3ce06",
            "schema_asset_id": "a055619b-ce67-4617-a777-fb569e7c0897",
            "table_asset_id": "9d66d5f9-ec0e-4ff6-93ca-1ca57009d27c",
            "source_type": "MSSQL",
            "segment": "Gold"
          }
        ],
        "total_count": 7583,
        "metrics": [
          {
            "type": "Operational",
            "title": "OPERATIONAL",
            "value": 5138
          }
        ]
      }
    }
    ```
  </Tab>

  <Tab title="Update Alert">
    `PUT /api/v1/metrics/alert/{alertId}`

    Update an alert

    **Path Parameters**

    <ParamField path="alertId" type="string" required={true}>
      Example: `3fa85f64-5717-4562-b3fc-2c963f66afa6`
    </ParamField>

    **Response**

    <ResponseField name="success" type="boolean">Whether the request completed successfully</ResponseField>

    <ResponseField name="message" type="string">Human-readable result message</ResponseField>

    <ResponseField name="timestamp" type="string">ISO 8601 server timestamp</ResponseField>

    <ResponseField name="correlation_id" type="string">Unique ID for this request</ResponseField>

    <ResponseField name="data" type="object">The endpoint's response payload.</ResponseField>

    **Example**

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X PUT "https://<your-workspace>.prizmdata.ai/api/v1/metrics/alert/{alertId}" \
        -H "Authorization: Bearer <YOUR_API_TOKEN>" \
        -H "Content-Type: application/json" \
        -d '{}'
      ```
    </CodeGroup>

    ```json Response theme={null}
    {
      "success": true,
      "message": "Update an alert",
      "timestamp": "2026-09-21T09:43:50.316067+00:00",
      "correlation_id": "1bff0823-3db2-4b12-bf56-22ea8d38bba2",
      "data": {}
    }
    ```
  </Tab>
</Tabs>
