> ## 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 Cloud: Clickhouse Click Stack Get Alert

> Get one ClickStack alert by its ID, with its threshold, interval and target. Includes SDK V2 examples, input constraints, response fields, and Deepline cost.

Get one ClickStack alert by its ID, with its threshold, interval and target.

> [!NOTE]
>
> Tool ID: `clickhouse_click_stack_get_alert`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'clickhouse_click_stack_get_alert',
  {
    "organizationId": "123e4567-e89b-42d3-a456-426614174000",
    "serviceId": "123e4567-e89b-42d3-a456-426614174000",
    "clickStackAlertId": "click_stack_alert_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute clickhouse_click_stack_get_alert --input '{
  "organizationId": "123e4567-e89b-42d3-a456-426614174000",
  "serviceId": "123e4567-e89b-42d3-a456-426614174000",
  "clickStackAlertId": "click_stack_alert_123"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "status": 123,
    "requestId": "123e4567-e89b-42d3-a456-426614174000",
    "result": {
      "dashboardId": "dashboard_123",
      "tileId": "tile_123",
      "savedSearchId": "saved_search_123"
    }
  }
}
```

Use `deepline describe clickhouse_click_stack_get_alert --json` for the latest machine-readable contract.

## Input reference

**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. ClickStack: Retrieves a specific alert by ID

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.organizationId` | `string` | Yes | — | ID of the organization that owns the service. Format: `uuid`. |
| `payload.serviceId` | `string` | Yes | — | ID of the ClickStack service. Format: `uuid`. |
| `payload.clickStackAlertId` | `string` | Yes | — | ClickStack Alert ID |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. ClickStack: Retrieves a specific alert by ID",
    "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"
      },
      "clickStackAlertId": {
        "type": "string",
        "description": "ClickStack Alert ID"
      }
    },
    "required": [
      "organizationId",
      "serviceId",
      "clickStackAlertId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.status` | `number` | No | — | HTTP status code. |
| `result.data.requestId` | `string` | No | — | Unique id assigned to every request. UUIDv4 Format: `uuid`. |
| `result.data.result` | `object` | No | — | — |
| `result.data.result.dashboardId` | `string \| null` | No | — | Dashboard ID for tile-based alerts. |
| `result.data.result.tileId` | `string \| null` | No | — | Tile ID for tile-based alerts. Must be a line, stacked bar, or number type tile. |
| `result.data.result.savedSearchId` | `string \| null` | No | — | Saved search ID for saved\_search alerts. |
| `result.data.result.groupBy` | `string \| null` | No | — | Group-by key for saved search alerts. |
| `result.data.result.threshold` | `number` | No | — | Threshold value for triggering the alert. For between and not\_between threshold types, this is the lower bound. |
| `result.data.result.thresholdMax` | `number \| null` | No | — | Upper bound for between and not\_between threshold types. Required when thresholdType is between or not\_between, must be >= threshold. |
| `result.data.result.interval` | `"1m" \| "5m" \| "15m" \| "30m" \| "1h" \| "6h" \| "12h" \| "1d"` | No | — | Evaluation interval for the alert. Allowed: `1m`, `5m`, `15m`, `30m`, `1h`, `6h`, `12h`, `1d`. |
| `result.data.result.scheduleOffsetMinutes` | `integer \| null` | No | — | Offset from the interval boundary in minutes. For example, 2 with a 5m interval evaluates windows at :02, :07, :12, etc. (UTC). |
| `result.data.result.scheduleStartAt` | `string \| null` | No | — | Absolute UTC start time anchor. Alert windows start from this timestamp and repeat every interval. Format: `date-time`. |
| `result.data.result.source` | `"saved_search" \| "tile"` | No | — | Alert source type (tile-based or saved search). Allowed: `saved_search`, `tile`. |
| `result.data.result.thresholdType` | `"above" \| "below" \| "above_exclusive" \| "below_or_equal" \| "equal" \| "not_equal" \| "between" \| "not_between"` | No | — | Threshold comparison direction. Allowed: `above`, `below`, `above_exclusive`, `below_or_equal`, `equal`, `not_equal`, `between`, `not_between`. |
| `result.data.result.channel` | `record` | No | — | — |
| `result.data.result.name` | `string \| null` | No | — | Human-friendly alert name. |
| `result.data.result.message` | `string \| null` | No | — | Alert message template. |
| `result.data.result.note` | `string \| null` | No | — | Freeform note for the alert. Supports markdown formatting. |
| `result.data.result.numConsecutiveWindows` | `integer \| null` | No | — | 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. |
| `result.data.result.id` | `string` | No | — | Unique alert identifier. |
| `result.data.result.state` | `"ALERT" \| "OK" \| "INSUFFICIENT_DATA" \| "DISABLED" \| "PENDING"` | No | — | Current alert state. Allowed: `ALERT`, `OK`, `INSUFFICIENT_DATA`, `DISABLED`, `PENDING`. |
| `result.data.result.teamId` | `string` | No | — | Team identifier. |
| `result.data.result.silenced` | `record` | No | — | — |
| `result.data.result.executionErrors` | `array` | No | — | Errors recorded during the most recent alert execution, if any. |
| `result.data.result.executionErrors[].timestamp` | `string` | Yes | — | When the error occurred. Format: `date-time`. |
| `result.data.result.executionErrors[].type` | `"QUERY_ERROR" \| "WEBHOOK_ERROR" \| "INVALID_ALERT" \| "UNKNOWN"` | Yes | — | Category of the error. Allowed: `QUERY_ERROR`, `WEBHOOK_ERROR`, `INVALID_ALERT`, `UNKNOWN`. |
| `result.data.result.executionErrors[].message` | `string` | Yes | — | Human-readable error message. |
| `result.data.result.createdAt` | `string \| null` | No | — | Creation timestamp. Format: `date-time`. |
| `result.data.result.updatedAt` | `string \| null` | No | — | Last update timestamp. Format: `date-time`. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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": {
            "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>

## Deepline cost

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

## Related documentation

* [ClickHouse Cloud provider guide](https://deepline.com/docs/providers/clickhouse/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.