> ## 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 Organization Role Get

> Get one ClickHouse Cloud organization role by its ID, with its policies and actors. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Get one ClickHouse Cloud organization role by its ID, with its policies and actors.

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

## 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_organization_role_get',
  {
    "organizationId": "123e4567-e89b-42d3-a456-426614174000",
    "roleId": "123e4567-e89b-42d3-a456-426614174000"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute clickhouse_organization_role_get --input '{
  "organizationId": "123e4567-e89b-42d3-a456-426614174000",
  "roleId": "123e4567-e89b-42d3-a456-426614174000"
}' --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": {
      "id": "id_123",
      "tenantId": "tenant_123",
      "ownerId": "owner_123"
    }
  }
}
```

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

## Input reference

Returns details for a specific role.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.organizationId` | `string` | Yes | — | ID of the requested organization. Format: `uuid`. |
| `payload.roleId` | `string` | Yes | — | ID of the requested role. Format: `uuid`. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Returns details for a specific role.",
    "properties": {
      "organizationId": {
        "type": "string",
        "description": "ID of the requested organization.",
        "format": "uuid"
      },
      "roleId": {
        "type": "string",
        "description": "ID of the requested role.",
        "format": "uuid"
      }
    },
    "required": [
      "organizationId",
      "roleId"
    ],
    "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.id` | `string` | No | — | Unique role identifier |
| `result.data.result.tenantId` | `string` | No | — | Tenant resource ID (e.g., organization/uuid) |
| `result.data.result.ownerId` | `string` | No | — | Owner resource ID (e.g., organization/uuid) |
| `result.data.result.name` | `string` | No | — | Name of the role |
| `result.data.result.type` | `"system" \| "custom"` | No | — | Whether this is a system role or a custom role Allowed: `system`, `custom`. |
| `result.data.result.actors` | `array` | No | — | List of actor resource IDs assigned to this role (e.g., user/uuid, apiKey/uuid) |
| `result.data.result.policies` | `array` | No | — | List of policies associated with this role |
| `result.data.result.policies[].id` | `string` | No | — | Unique policy identifier |
| `result.data.result.policies[].roleId` | `string` | No | — | ID of the role this policy belongs to |
| `result.data.result.policies[].tenantId` | `string` | No | — | Tenant resource ID (e.g., organization/uuid) |
| `result.data.result.policies[].allowDeny` | `"ALLOW" \| "DENY"` | No | — | Whether this policy allows or denies access Allowed: `ALLOW`, `DENY`. |
| `result.data.result.policies[].permissions` | `array` | No | — | List of permissions granted or denied by this policy |
| `result.data.result.policies[].resources` | `array` | No | — | List of resource IDs this policy applies to (e.g., instance/uuid, instance/\*) |
| `result.data.result.policies[].tags` | `object` | No | — | — |
| `result.data.result.policies[].tags.grants` | `array` | No | — | Optional list of database grants (e.g., database names) |
| `result.data.result.policies[].tags.roleV2` | `"sql-console-readonly" \| "sql-console-admin"` | No | — | Optional SQL console role type Allowed: `sql-console-readonly`, `sql-console-admin`. |
| `result.data.result.createdAt` | `string` | No | — | Timestamp when the role was created. ISO-8601. Format: `date-time`. |
| `result.data.result.updatedAt` | `string` | No | — | Timestamp when the role was last updated. ISO-8601. 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": {
              "id": {
                "type": "string",
                "description": "Unique role identifier"
              },
              "tenantId": {
                "type": "string",
                "description": "Tenant resource ID (e.g., organization/uuid)"
              },
              "ownerId": {
                "type": "string",
                "description": "Owner resource ID (e.g., organization/uuid)"
              },
              "name": {
                "type": "string",
                "description": "Name of the role"
              },
              "type": {
                "type": "string",
                "description": "Whether this is a system role or a custom role",
                "enum": [
                  "system",
                  "custom"
                ]
              },
              "actors": {
                "type": "array",
                "description": "List of actor resource IDs assigned to this role (e.g., user/uuid, apiKey/uuid)",
                "items": {
                  "type": "string"
                }
              },
              "policies": {
                "type": "array",
                "description": "List of policies associated with this role",
                "items": {
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique policy identifier"
                    },
                    "roleId": {
                      "type": "string",
                      "description": "ID of the role this policy belongs to"
                    },
                    "tenantId": {
                      "type": "string",
                      "description": "Tenant resource ID (e.g., organization/uuid)"
                    },
                    "allowDeny": {
                      "type": "string",
                      "description": "Whether this policy allows or denies access",
                      "enum": [
                        "ALLOW",
                        "DENY"
                      ]
                    },
                    "permissions": {
                      "type": "array",
                      "description": "List of permissions granted or denied by this policy",
                      "items": {
                        "type": "string"
                      }
                    },
                    "resources": {
                      "type": "array",
                      "description": "List of resource IDs this policy applies to (e.g., instance/uuid, instance/*)",
                      "items": {
                        "type": "string"
                      }
                    },
                    "tags": {
                      "properties": {
                        "grants": {
                          "type": "array",
                          "description": "Optional list of database grants (e.g., database names)",
                          "items": {
                            "type": "string"
                          }
                        },
                        "roleV2": {
                          "type": "string",
                          "description": "Optional SQL console role type",
                          "enum": [
                            "sql-console-readonly",
                            "sql-console-admin"
                          ]
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              },
              "createdAt": {
                "type": "string",
                "description": "Timestamp when the role was created. ISO-8601.",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "description": "Timestamp when the role was last updated. ISO-8601.",
                "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.