Skip to main content
GET
/
orgs
/
{org_id}
/
k2
/
{kb_id}
/
schema
cURL
curl --request GET \
  --url https://api.timbal.ai/orgs/{org_id}/k2/{kb_id}/schema \
  --header 'Authorization: Bearer <token>'
{
  "tables": [
    {
      "columns": [
        {
          "data_type": "<string>",
          "is_nullable": true,
          "name": "<string>"
        }
      ],
      "constraints": [
        {
          "constraint_type": "PRIMARY_KEY",
          "columns": [
            "<string>"
          ],
          "expression": "<string>",
          "foreign_keys": [
            {
              "column": "<string>",
              "ref_column": "<string>",
              "ref_table": "<string>"
            }
          ]
        }
      ],
      "estimated_row_count": 1,
      "indexes": [
        {
          "columns": [
            "<string>"
          ],
          "is_unique": true,
          "name": "<string>",
          "table_name": "<string>"
        }
      ],
      "name": "<string>",
      "schema": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Timbal API key. Obtain your API key from the Timbal platform settings. See Authentication for more information.

Path Parameters

org_id
string
required
kb_id
string
required

Query Parameters

format
enum<string>

Response format: "structured" (default) or "sql"

Available options:
structured,
sql

Response

200 - application/json

Schema (structured by default, or SQL DDL statements when ?format=sql)

Response for the schema endpoint — structured (default) or SQL DDL.

tables
object[]
required