Skip to main content
POST
Describe or change a table's schema

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

database
string
required

Target database.

Body

application/json

POST /v1/schema/{database}: one op, two shapes. With table_name alone it describes the table; with patch it changes the schema — or creates the table when there is none — and describes the result.

The two shapes answer differently. A describe answers the [{name, type, nullable, …}] column-descriptor array, which is what it has always answered; encoding asks for the other forms. A write answers the schema document ([SchemaDocument]), which is what carries the schema_id the next compare-and-set needs.

table_name
string
required
encoding
string | null

Response encoding of a describe. Omitted (the default) returns the [{name, type, nullable, …}] column-descriptor array; "document" returns the schema document ([SchemaDocument]), which adds each column's stable id, its index and its metadata; "ipc" returns an Arrow IPC schema message carrying the Arrow shape of the columns. Any other value is a 400.

Only a describe takes it: sending it together with patch is a 400, because a write always answers the document.

expected_schema_id
integer<int32> | null

Compare-and-set against the document's schema_id: the write is refused with 409 when the schema has moved.

Required range: x >= 0
patch
object | null

The schema write, in the document's own shape: fields to add or change (matched by id when given, else by name; dropped: true retires one), max_fields, max_depth. Nothing is dropped by omission, and applying what a describe returned changes nothing. Requires the manage capability; a patch that is present and not null counts as a write, whether the body is sent as an object or as an array, which serde fills by position.

Response

A describe answers the table's columns as the [{name, type, nullable, …}] descriptor array by default, the schema document under encoding: "document", and an Arrow IPC schema message under encoding: "ipc". A write answers the schema document that resulted — the patch applied, or the table created from it.

One column as POST /v1/schema/{database} describes it by default. name, type and nullable describe a column and a struct's own fields; a map's key/value, and a list's item when the element is itself nested, are types rather than fields and carry type and its keys alone. This is the create_table descriptor vocabulary widened to every type a table can hold — see SchemaField for which of them create_table accepts back. A column's stable id, its index and its metadata are not in this shape; ask for encoding: "document" to get those.

type
string
required

The type tag: a scalar spelling ("i64", "large_utf8", "timestamp_ms", …), or "vector", "list", "large_list", "fixed_size_list", "struct", "map", "decimal", "decimal256". A type with no spelling at all falls back to Arrow's own display name.

dim
integer<int32> | null

Element count of a vector or fixed_size_list.

Required range: x >= 0
fields
array | null

A struct's own fields.

item

The element's bare scalar spelling, or its own type keys.

key
null | any

A map's key type.

name
string | null

Absent when this describes a type rather than a field — a map's key/value, or a nested list item.

nullable
boolean | null

Absent alongside name, for the same reason.

precision
integer<int32> | null

Total digits of a decimal.

Required range: x >= 0
scale
integer<int32> | null

Digits after the point of a decimal; may be negative.

tz
string | null

IANA time zone of a zoned timestamp.

value
null | any

A map's value type.

Last modified on October 7, 2026