> ## 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 Validate Dashboard

> Check whether a ClickStack dashboard definition is valid before creating or updating it. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Check whether a ClickStack dashboard definition is valid before creating or updating it.

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

## 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_validate_dashboard',
  {
    "organizationId": "123e4567-e89b-42d3-a456-426614174000",
    "serviceId": "123e4567-e89b-42d3-a456-426614174000",
    "name": "Example",
    "tiles": [
      {
        "name": "Example",
        "x": 123,
        "y": 123,
        "w": 123,
        "h": 123
      }
    ]
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute clickhouse_click_stack_validate_dashboard --input '{
  "organizationId": "123e4567-e89b-42d3-a456-426614174000",
  "serviceId": "123e4567-e89b-42d3-a456-426614174000",
  "name": "Example",
  "tiles": [
    {
      "name": "Example",
      "x": 123,
      "y": 123,
      "w": 123,
      "h": 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": {
      "valid": true,
      "errors": [
        {
          "path": "example",
          "message": "Example message"
        }
      ],
      "normalized": {}
    }
  }
}
```

Use `deepline describe clickhouse_click_stack_validate_dashboard --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: Validates a dashboard body against the same schema and tile rules used by POST /api/v2/dashboards. The dashboard is **never persisted**. Use this endpoint at plan time (e.g. from a Terraform provider) to check that a dashboard configuration is valid before applying it.

| 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.name` | `string` | Yes | — | Dashboard name. |
| `payload.tiles` | `array` | Yes | — | List of tiles/charts to include in the dashboard. |
| `payload.tags` | `array` | No | — | Tags for organizing and filtering dashboards. |
| `payload.filters` | `array` | No | — | Dashboard filter keys to add to the dashboard and apply across all tiles |
| `payload.savedQuery` | `string` | No | — | Optional default dashboard query to persist on the dashboard. |
| `payload.savedQueryLanguage` | `"sql" \| "lucene"` | No | — | Query language used by savedQuery. Allowed: `sql`, `lucene`. |
| `payload.savedFilterValues` | `array` | No | — | Optional default dashboard filter values to persist on the dashboard. |
| `payload.containers` | `array` | No | — | Optional grouping containers. Each tile may join a container via tile.containerId, and a tab inside it via tile.tabId. |

<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: Validates a dashboard body against the same schema and tile rules used by POST /api/v2/dashboards. The dashboard is **never persisted**. Use this endpoint at plan time (e.g. from a Terraform provider) to check that a dashboard configuration is valid before applying it.",
    "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"
      },
      "name": {
        "type": "string",
        "description": "Dashboard name."
      },
      "tiles": {
        "type": "array",
        "description": "List of tiles/charts to include in the dashboard.",
        "items": {
          "properties": {
            "name": {
              "type": "string",
              "description": "Display name for the tile"
            },
            "x": {
              "type": "integer",
              "description": "Horizontal position in the grid (0-based)"
            },
            "y": {
              "type": "integer",
              "description": "Vertical position in the grid (0-based)"
            },
            "w": {
              "type": "integer",
              "description": "Width in grid units"
            },
            "h": {
              "type": "integer",
              "description": "Height in grid units"
            },
            "config": {
              "type": "object",
              "additionalProperties": true
            },
            "containerId": {
              "type": "string",
              "description": "References a DashboardContainer by id. Tiles without containerId render in the default ungrouped area."
            },
            "tabId": {
              "type": "string",
              "description": "References a tab inside the tile's container by id. Requires containerId to be set, and the container to declare a matching tab."
            },
            "id": {
              "type": "string",
              "description": "Optional tile ID. Omit to generate a new ID."
            },
            "asRatio": {
              "type": "boolean",
              "description": "Display two series as a ratio (series[0] / series[1]). Only applicable when providing \"series\". Deprecated in favor of \"config.asRatio\"."
            },
            "series": {
              "type": "array",
              "description": "Data series to display in this tile (all must be the same type). Deprecated; use \"config\" instead.",
              "items": {
                "type": "object",
                "additionalProperties": true
              }
            }
          },
          "required": [
            "name",
            "x",
            "y",
            "w",
            "h"
          ],
          "additionalProperties": false
        }
      },
      "tags": {
        "type": "array",
        "description": "Tags for organizing and filtering dashboards.",
        "items": {
          "type": "string"
        }
      },
      "filters": {
        "type": "array",
        "description": "Dashboard filter keys to add to the dashboard and apply across all tiles",
        "items": {
          "properties": {
            "type": {
              "type": "string",
              "description": "Filter type. Must be \"QUERY_EXPRESSION\".",
              "enum": [
                "QUERY_EXPRESSION"
              ]
            },
            "name": {
              "type": "string",
              "description": "Display name for the dashboard filter key"
            },
            "expression": {
              "type": "string",
              "description": "Key expression used when applying this dashboard filter key"
            },
            "sourceId": {
              "type": "string",
              "description": "Source ID this dashboard filter key applies to"
            },
            "sourceMetricType": {
              "type": "string",
              "description": "Metric type when source is metrics",
              "enum": [
                "sum",
                "gauge",
                "histogram",
                "summary",
                "exponential histogram"
              ]
            },
            "where": {
              "type": "string",
              "description": "Optional WHERE condition to scope which rows this filter key reads values from"
            },
            "whereLanguage": {
              "type": "string",
              "description": "Language of the where condition",
              "enum": [
                "sql",
                "lucene"
              ]
            },
            "appliesToSourceIds": {
              "type": "array",
              "description": "Optional list of source IDs this filter applies to. Omit or provide an empty array to apply the filter to ALL tiles regardless of source. A non-empty array restricts the filter to only tiles whose source ID is in the list; tiles using other sources are not affected by the selected filter value(s).",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "type",
            "name",
            "expression",
            "sourceId"
          ],
          "additionalProperties": false
        }
      },
      "savedQuery": {
        "type": [
          "string",
          "null"
        ],
        "description": "Optional default dashboard query to persist on the dashboard."
      },
      "savedQueryLanguage": {
        "type": [
          "string",
          "null"
        ],
        "description": "Query language used by savedQuery.",
        "enum": [
          "sql",
          "lucene"
        ]
      },
      "savedFilterValues": {
        "type": "array",
        "description": "Optional default dashboard filter values to persist on the dashboard.",
        "items": {
          "properties": {
            "type": {
              "type": "string",
              "description": "Filter type. Currently only \"sql\" is supported.",
              "enum": [
                "sql"
              ]
            },
            "condition": {
              "type": "string",
              "description": "SQL filter condition. For example use expressions in the form \"column IN ('value')\"."
            }
          },
          "required": [
            "condition"
          ],
          "additionalProperties": false
        }
      },
      "containers": {
        "type": "array",
        "description": "Optional grouping containers. Each tile may join a container via tile.containerId, and a tab inside it via tile.tabId.",
        "items": {
          "properties": {
            "id": {
              "type": "string",
              "description": "Unique identifier for the container within the dashboard."
            },
            "title": {
              "type": "string",
              "description": "Display title for the container."
            },
            "collapsed": {
              "type": "boolean",
              "description": "Persisted default collapse state. Per-viewer state lives in the URL."
            },
            "collapsible": {
              "type": "boolean",
              "description": "Whether the user can collapse the group."
            },
            "bordered": {
              "type": "boolean",
              "description": "Whether to show a visual border around the group."
            },
            "tabs": {
              "type": "array",
              "description": "Optional tabs. 2+ entries renders a tab bar; 0-1 entries renders a plain group header. Tiles join a tab via tabId.",
              "items": {
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier for the tab within its container."
                  },
                  "title": {
                    "type": "string",
                    "description": "Display title for the tab."
                  }
                },
                "required": [
                  "id",
                  "title"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "id",
            "title",
            "collapsed"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "organizationId",
      "serviceId",
      "name",
      "tiles"
    ],
    "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.valid` | `boolean` | Yes | — | True when the body passes all validation rules. |
| `result.data.result.errors` | `array` | Yes | — | Validation errors. Empty when valid is true. |
| `result.data.result.errors[].path` | `string` | Yes | — | Dot-separated field path, or empty string for top-level errors. |
| `result.data.result.errors[].message` | `string` | Yes | — | Human-readable error description. |
| `result.data.result.normalized` | `record` | Yes | — | — |
| `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": {
              "valid": {
                "type": "boolean",
                "description": "True when the body passes all validation rules."
              },
              "errors": {
                "type": "array",
                "description": "Validation errors. Empty when valid is true.",
                "items": {
                  "properties": {
                    "path": {
                      "type": "string",
                      "description": "Dot-separated field path, or empty string for top-level errors."
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error description."
                    }
                  },
                  "required": [
                    "path",
                    "message"
                  ],
                  "additionalProperties": false
                }
              },
              "normalized": {
                "type": "object",
                "additionalProperties": true
              }
            },
            "required": [
              "valid",
              "errors",
              "normalized"
            ],
            "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.