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

# Clickhouse Click Stack List Alerts: Inputs, Cost & CLI

> ClickStack: List Alerts. Clickhouse Clickhouse Click Stack List Alerts docs include request fields, response shape, pricing notes, and Deepline CLI examples.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=clickhouse_click_stack_list_alerts:{"organizationId":"{{organizationId}}","serviceId":"{{serviceId}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                     | Type     | Required | Default | Description                                   |
| ------------------------ | -------- | -------- | ------- | --------------------------------------------- |
| `payload.organizationId` | `string` | Yes      |         | ID of the organization that owns the service. |
| `payload.serviceId`      | `string` | Yes      |         | ID of the ClickStack service.                 |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. ClickStack: Retrieves alerts for the authenticated team (paginated). Results are capped at `limit` (default and maximum 1000). When more records exist than are returned, `meta.total` exceeds `data.length`; clients with large collections must page with `limit`/`offset` to retrieve them all.",
    "properties": {
      "organizationId": {
        "type": "string",
        "description": "ID of the organization that owns the service.",
        "format": "uuid"
      },
      "serviceId": {
        "type": "string",
        "description": "ID of the ClickStack service.",
        "format": "uuid"
      }
    },
    "required": [
      "organizationId",
      "serviceId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `result.meta` | `object` | No       |         | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "status": {
            "type": "number",
            "description": "HTTP status code."
          },
          "requestId": {
            "type": "string",
            "description": "Unique id assigned to every request. UUIDv4",
            "format": "uuid"
          },
          "result": {
            "type": "array",
            "items": {
              "properties": {
                "dashboardId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Dashboard ID for tile-based alerts."
                },
                "tileId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Tile ID for tile-based alerts. Must be a line, stacked bar, or number type tile."
                },
                "savedSearchId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Saved search ID for saved_search alerts."
                },
                "groupBy": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Group-by key for saved search alerts."
                },
                "threshold": {
                  "type": "number",
                  "description": "Threshold value for triggering the alert. For between and not_between threshold types, this is the lower bound."
                },
                "thresholdMax": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Upper bound for between and not_between threshold types. Required when thresholdType is between or not_between, must be >= threshold."
                },
                "interval": {
                  "type": "string",
                  "description": "Evaluation interval for the alert.",
                  "enum": [
                    "1m",
                    "5m",
                    "15m",
                    "30m",
                    "1h",
                    "6h",
                    "12h",
                    "1d"
                  ]
                },
                "scheduleOffsetMinutes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Offset from the interval boundary in minutes. For example, 2 with a 5m interval evaluates windows at :02, :07, :12, etc. (UTC)."
                },
                "scheduleStartAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Absolute UTC start time anchor. Alert windows start from this timestamp and repeat every interval.",
                  "format": "date-time"
                },
                "source": {
                  "type": "string",
                  "description": "Alert source type (tile-based or saved search).",
                  "enum": [
                    "saved_search",
                    "tile"
                  ]
                },
                "thresholdType": {
                  "type": "string",
                  "description": "Threshold comparison direction.",
                  "enum": [
                    "above",
                    "below",
                    "above_exclusive",
                    "below_or_equal",
                    "equal",
                    "not_equal",
                    "between",
                    "not_between"
                  ]
                },
                "channel": {
                  "type": "object",
                  "additionalProperties": true
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Human-friendly alert name."
                },
                "message": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Alert message template."
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Freeform note for the alert. Supports markdown formatting."
                },
                "numConsecutiveWindows": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Fire the alert only after its condition has been met for this many consecutive evaluation windows. While the condition is met but fewer than this many consecutive windows have violated, the alert is in the PENDING state."
                },
                "id": {
                  "type": "string",
                  "description": "Unique alert identifier."
                },
                "state": {
                  "type": "string",
                  "description": "Current alert state.",
                  "enum": [
                    "ALERT",
                    "OK",
                    "INSUFFICIENT_DATA",
                    "DISABLED",
                    "PENDING"
                  ]
                },
                "teamId": {
                  "type": "string",
                  "description": "Team identifier."
                },
                "silenced": {
                  "type": "object",
                  "additionalProperties": true
                },
                "executionErrors": {
                  "type": "array",
                  "description": "Errors recorded during the most recent alert execution, if any.",
                  "items": {
                    "properties": {
                      "timestamp": {
                        "type": "string",
                        "description": "When the error occurred.",
                        "format": "date-time"
                      },
                      "type": {
                        "type": "string",
                        "description": "Category of the error.",
                        "enum": [
                          "QUERY_ERROR",
                          "WEBHOOK_ERROR",
                          "INVALID_ALERT",
                          "UNKNOWN"
                        ]
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable error message."
                      }
                    },
                    "required": [
                      "timestamp",
                      "type",
                      "message"
                    ],
                    "additionalProperties": false
                  }
                },
                "createdAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Creation timestamp.",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Last update timestamp.",
                  "format": "date-time"
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute clickhouse_click_stack_list_alerts --payload '{
  "organizationId": "string",
  "serviceId": "string"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.
* Billing mode: `no_bill`.
