> ## 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 role details. ClickHouse Cloud Clickhouse Organization Role Get reference includes SDK V2 and CLI requests, input constraints, response fields,.

Get role details.

<Info>
  Tool ID: `clickhouse_organization_role_get`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
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={null}
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 exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "status": 123,
    "requestId": "123e4567-e89b-42d3-a456-426614174000",
    "result": {
      "id": "id_123",
      "tenantId": "tenant_123",
      "ownerId": "owner_123"
    }
  }
}
```

Use `deepline tools get 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={null}
  {
    "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={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": {
            "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](/docs/providers/clickhouse/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


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