Commit updates to a table
post
{scheme}://{host}/{basePath}/v1/{prefix}/namespaces/{namespace}/tables/{table}
Commit updates to a table.
Commits have two parts, requirements and updates. Requirements are assertions that will be validated before attempting to make and commit changes. For example, `assert-ref-snapshot-id` will check that a named ref's snapshot ID has a certain value. Server implementations are required to fail with a 400 status code if any unknown updates or requirements are received.
Updates are changes to make to table metadata. For example, after asserting that the current main ref is at the expected snapshot, a commit may add a new child snapshot and set the ref to the new snapshot id.
Create table transactions that are started by createTable with `stage-create` set to true are committed using this route. Transactions should include all changes to the table, including table initialization, like AddSchemaUpdate and SetCurrentSchemaUpdate. The `assert-create` requirement is used to ensure that the table was not created concurrently.
Request
Path Parameters
-
namespace(required): string
A namespace identifier as a single string. Multipart namespace parts must be separated by the namespace separator as indicated via the /config override `namespace-separator`, which defaults to the unit separator `0x1F` byte (url encoded `%1F`). To be compatible with older clients, servers must use both the advertised separator and `0x1F` as valid separators when decoding namespaces. The `namespace-separator` should be provided in a url encoded form.Examples
-
prefix(required): string
An optional prefix in the path
-
table(required): string
A table nameExample:
sales
Header Parameters
-
Idempotency-Key: string(uuid)
Optional client-provided idempotency key for safe request retries. When present, the server ensures no additional effects for requests that carry the same Idempotency-Key. If a prior request with this key has been finalized, the server returns an equivalent final response without re-running the operation. The response body may reflect a newer state of the catalog than existed at the time of the commit. Finalization rules: - Finalize & replay: 200, 201, 204, and deterministic terminal 4xx (including 409 such as AlreadyExists, NamespaceNotEmpty, etc.) - Do not finalize (not stored/replayed): 5xx Key Requirements: - Key format: UUIDv7 in string form (RFC 9562). - The idempotency key must be globally unique (no reuse across different operations). - Catalogs SHOULD NOT expire keys before the end of the advertised token lifetime. - If Idempotency-Key is used, clients MUST reuse the same key when retrying the same logical operation and MUST generate a new key for a different operation.
Supported Media Types
- application/json
Nested Schema : TableIdentifier
Type:
Show Source
object-
name(required): string
-
namespace(required): array
Namespace
Reference to one or more levels of a namespace
Nested Schema : requirements
Type:
Show Source
array-
Array of:
object Discriminator: type
Discriminator:
{ "propertyName":"type", "mapping":{ "assert-create":"#/components/schemas/AssertCreate", "assert-table-uuid":"#/components/schemas/AssertTableUUID", "assert-ref-snapshot-id":"#/components/schemas/AssertRefSnapshotId", "assert-last-assigned-field-id":"#/components/schemas/AssertLastAssignedFieldId", "assert-current-schema-id":"#/components/schemas/AssertCurrentSchemaId", "assert-last-assigned-partition-id":"#/components/schemas/AssertLastAssignedPartitionId", "assert-default-spec-id":"#/components/schemas/AssertDefaultSpecId", "assert-default-sort-order-id":"#/components/schemas/AssertDefaultSortOrderId" } }
Nested Schema : Namespace
Type:
arrayReference to one or more levels of a namespace
Show Source
Example:
[
"accounting",
"tax"
]Nested Schema : Discriminator: type
Type:
objectDiscriminator: type
Discriminator Values
- assert-create
- assert-table-uuid
- assert-ref-snapshot-id
- assert-last-assigned-field-id
- assert-current-schema-id
- assert-last-assigned-partition-id
- assert-default-spec-id
- assert-default-sort-order-id
Response
Supported Media Types
- application/json
200 Response
Response used when a table is successfully updated.
The table metadata JSON is returned in the metadata field. The corresponding file location of table metadata must be returned in the metadata-location field. Clients can check whether metadata has changed by comparing metadata locations.
Headers
-
ETag:
Identifies a unique version of the table metadata. Implementations that support ETags should produce unique tags for responses that return different metadata content but represent the same version of table metadata. For example, the `snapshots` query parameter may result in different metadata representations depending on whether `refs` or `all` is provided, therefore should have distinct ETags.
Nested Schema : TableMetadata
Type:
Show Source
object-
current-schema-id: integer
-
current-snapshot-id: integer
(int64)
-
default-sort-order-id: integer
-
default-spec-id: integer
-
encryption-keys: array
encryption-keys
-
format-version(required): integer
Minimum Value:
1Maximum Value:3 -
last-column-id: integer
-
last-partition-id: integer
-
last-sequence-number: integer
(int64)
-
last-updated-ms: integer
(int64)
-
location: string
-
metadata-log: array
MetadataLog
-
next-row-id: integer
(int64)
A long higher than all assigned row IDs; the next snapshot's first-row-id.
-
partition-specs: array
partition-specs
-
partition-statistics: array
partition-statistics
-
properties: object
properties
Additional Properties Allowed: additionalProperties
-
refs: object
SnapshotReferences
Additional Properties Allowed: SnapshotReference
-
schemas: array
schemas
-
snapshot-log: array
SnapshotLog
-
snapshots: array
snapshots
-
sort-orders: array
sort-orders
-
statistics: array
statistics
-
table-uuid(required): string
Nested Schema : EncryptedKey
Type:
Show Source
object-
encrypted-by-id: string
-
encrypted-key-metadata(required): string
(byte)
-
key-id(required): string
-
properties: object
properties
Additional Properties Allowed: additionalProperties
Nested Schema : PartitionSpec
Type:
Show Source
object-
fields(required): array
fields
-
spec-id: integer
Read Only:
true
Nested Schema : PartitionField
Type:
Show Source
object-
field-id: integer
-
name(required): string
-
source-id(required): integer
-
transform(required): string
Example:
[ "identity", "year", "month", "day", "hour", "bucket[256]", "truncate[16]" ]
Nested Schema : SnapshotReference
Type:
Show Source
object-
max-ref-age-ms: integer
(int64)
-
max-snapshot-age-ms: integer
(int64)
-
min-snapshots-to-keep: integer
-
snapshot-id(required): integer
(int64)
-
type(required): string
Allowed Values:
[ "tag", "branch" ]
Nested Schema : Schema-allOf[1]
Type:
Show Source
object-
identifier-field-ids: array
identifier-field-ids
-
schema-id: integer
Read Only:
true
Nested Schema : PrimitiveTypeValue
Match One Schema
Show Source
-
boolean
Title:
BooleanTypeValueExample:true -
integer
Title:
IntegerTypeValueExample:42 -
integer(int64)
Title:
LongTypeValueExample:9223372036854776000 -
number(float)
Title:
FloatTypeValueExample:3.14 -
number(double)
Title:
DoubleTypeValueExample:123.456 -
string
Title:
DecimalTypeValueDecimal type values are serialized as strings. Decimals with a positive scale serialize as numeric plain text, while decimals with a negative scale use scientific notation and the exponent will be equal to the negated scale. For instance, a decimal with a positive scale is '123.4500', with zero scale is '2', and with a negative scale is '2E+20'Example:123.45 -
string
Title:
StringTypeValueExample:hello -
string(uuid)
Title:
UUIDTypeValueMinimum Length:36Maximum Length:36Pattern:^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$UUID type values are serialized as a 36-character lowercase string in standard UUID format as specified by RFC-4122Example:eb26bdb1-a1d8-4aa6-990e-da940875492c -
string(date)
Title:
DateTypeValueDate type values follow the 'YYYY-MM-DD' ISO-8601 standard date formatExample:2007-12-03 -
string
Title:
TimeTypeValueTime type values follow the 'HH:MM:SS.ssssss' ISO-8601 format with microsecond precisionExample:22:31:08.123456 -
string
Title:
TimestampTypeValueTimestamp type values follow the 'YYYY-MM-DDTHH:MM:SS.ssssss' ISO-8601 format with microsecond precisionExample:2007-12-03T10:15:30.123456 -
string
Title:
TimestampTzTypeValueTimestampTz type values follow the 'YYYY-MM-DDTHH:MM:SS.ssssss+00:00' ISO-8601 format with microsecond precision, and a timezone offset (+00:00 for UTC)Example:2007-12-03T10:15:30.123456+00:00 -
string
Title:
TimestampNanoTypeValueTimestamp_ns type values follow the 'YYYY-MM-DDTHH:MM:SS.sssssssss' ISO-8601 format with nanosecond precisionExample:2007-12-03T10:15:30.123456789 -
string
Title:
TimestampTzNanoTypeValueTimestamp_ns type values follow the 'YYYY-MM-DDTHH:MM:SS.sssssssss+00:00' ISO-8601 format with nanosecond precision, and a timezone offset (+00:00 for UTC)Example:2007-12-03T10:15:30.123456789+00:00 -
string
Title:
FixedTypeValueFixed length type values are stored and serialized as an uppercase hexadecimal string preserving the fixed lengthExample:78797A -
string
Title:
BinaryTypeValueBinary type values are stored and serialized as an uppercase hexadecimal stringExample:78797A
Nested Schema : Snapshot
Type:
Show Source
object-
added-rows: integer
(int64)
The upper bound of the number of rows with assigned row IDs
-
first-row-id: integer
(int64)
The first _row_id assigned to the first row in the first data file in the first manifest
-
manifest-list(required): string
Location of the snapshot's manifest list file
-
parent-snapshot-id: integer
(int64)
-
schema-id: integer
-
sequence-number: integer
(int64)
-
snapshot-id(required): integer
(int64)
-
summary(required): object
summary
Additional Properties Allowed: additionalProperties
-
timestamp-ms(required): integer
(int64)
Nested Schema : summary
Type:
objectAdditional Properties Allowed
Show Source
Show Source
-
operation(required): string
Allowed Values:
[ "append", "replace", "overwrite", "delete" ]
Nested Schema : SortOrder
Type:
Show Source
object-
fields(required): array
fields
-
order-id(required): integer
Read Only:
true
Nested Schema : SortField
Type:
Show Source
object-
direction(required): string
Allowed Values:
[ "asc", "desc" ] -
null-order(required): string
Allowed Values:
[ "nulls-first", "nulls-last" ] -
source-id(required): integer
-
transform(required): string
Example:
[ "identity", "year", "month", "day", "hour", "bucket[256]", "truncate[16]" ]
400 Response
Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure, such as invalid json. Usually serves application/json content, although in some cases simple text/plain content might be returned by the server's middleware.
Root Schema : IcebergErrorResponse
Type:
objectJSON wrapper for all error responses (non-2xx)
Show Source
-
error(required): object
ErrorModel
JSON error payload returned in a response with further details on the error
Example:
{
"error":{
"message":"The server does not support this operation",
"type":"UnsupportedOperationException",
"code":406
}
}Nested Schema : ErrorModel
Type:
objectJSON error payload returned in a response with further details on the error
Show Source
-
code(required): integer
Minimum Value:
400Maximum Value:600HTTP response codeExample:404 -
message(required): string
Human-readable error message
-
stack: array
stack
-
type(required): string
Internal type definition of the errorExample:
NoSuchNamespaceException
401 Response
Unauthorized. The REST Catalog SHOULD respond with the 401 UnauthorizedResponse when the access token provided is expired, revoked, malformed, or invalid for other reasons. The client MAY request a new access token and retry the request.
Root Schema : IcebergErrorResponse
Type:
objectJSON wrapper for all error responses (non-2xx)
Show Source
-
error(required): object
ErrorModel
JSON error payload returned in a response with further details on the error
Example:
{
"error":{
"message":"The server does not support this operation",
"type":"UnsupportedOperationException",
"code":406
}
}Nested Schema : ErrorModel
Type:
objectJSON error payload returned in a response with further details on the error
Show Source
-
code(required): integer
Minimum Value:
400Maximum Value:600HTTP response codeExample:404 -
message(required): string
Human-readable error message
-
stack: array
stack
-
type(required): string
Internal type definition of the errorExample:
NoSuchNamespaceException
403 Response
Forbidden. Authenticated user does not have the necessary permissions.
Root Schema : IcebergErrorResponse
Type:
objectJSON wrapper for all error responses (non-2xx)
Show Source
-
error(required): object
ErrorModel
JSON error payload returned in a response with further details on the error
Example:
{
"error":{
"message":"The server does not support this operation",
"type":"UnsupportedOperationException",
"code":406
}
}Nested Schema : ErrorModel
Type:
objectJSON error payload returned in a response with further details on the error
Show Source
-
code(required): integer
Minimum Value:
400Maximum Value:600HTTP response codeExample:404 -
message(required): string
Human-readable error message
-
stack: array
stack
-
type(required): string
Internal type definition of the errorExample:
NoSuchNamespaceException
404 Response
Not Found - NoSuchTableException, table to load does not exist
Root Schema : IcebergErrorResponse
Type:
objectJSON wrapper for all error responses (non-2xx)
Show Source
-
error(required): object
ErrorModel
JSON error payload returned in a response with further details on the error
Example:
{
"error":{
"message":"The server does not support this operation",
"type":"UnsupportedOperationException",
"code":406
}
}Nested Schema : ErrorModel
Type:
objectJSON error payload returned in a response with further details on the error
Show Source
-
code(required): integer
Minimum Value:
400Maximum Value:600HTTP response codeExample:404 -
message(required): string
Human-readable error message
-
stack: array
stack
-
type(required): string
Internal type definition of the errorExample:
NoSuchNamespaceException
Examples
409 Response
Conflict - CommitFailedException, one or more requirements failed. The client may retry.
Root Schema : IcebergErrorResponse
Type:
objectJSON wrapper for all error responses (non-2xx)
Show Source
-
error(required): object
ErrorModel
JSON error payload returned in a response with further details on the error
Example:
{
"error":{
"message":"The server does not support this operation",
"type":"UnsupportedOperationException",
"code":406
}
}Nested Schema : ErrorModel
Type:
objectJSON error payload returned in a response with further details on the error
Show Source
-
code(required): integer
Minimum Value:
400Maximum Value:600HTTP response codeExample:404 -
message(required): string
Human-readable error message
-
stack: array
stack
-
type(required): string
Internal type definition of the errorExample:
NoSuchNamespaceException
419 Response
This is an optional status response type that the REST Catalog can issue when the token has expired. The client MAY request a new access token and retry the request. 401 UnauthorizedResponse SHOULD be preferred over this response type on token expiry.
Root Schema : IcebergErrorResponse
Type:
objectJSON wrapper for all error responses (non-2xx)
Show Source
-
error(required): object
ErrorModel
JSON error payload returned in a response with further details on the error
Example:
{
"error":{
"message":"The server does not support this operation",
"type":"UnsupportedOperationException",
"code":406
}
}Nested Schema : ErrorModel
Type:
objectJSON error payload returned in a response with further details on the error
Show Source
-
code(required): integer
Minimum Value:
400Maximum Value:600HTTP response codeExample:404 -
message(required): string
Human-readable error message
-
stack: array
stack
-
type(required): string
Internal type definition of the errorExample:
NoSuchNamespaceException
500 Response
An unknown server-side problem occurred; the commit state is unknown.
Root Schema : IcebergErrorResponse
Type:
objectJSON wrapper for all error responses (non-2xx)
Show Source
-
error(required): object
ErrorModel
JSON error payload returned in a response with further details on the error
Example:
{
"error":{
"message":"The server does not support this operation",
"type":"UnsupportedOperationException",
"code":406
}
}Nested Schema : ErrorModel
Type:
objectJSON error payload returned in a response with further details on the error
Show Source
-
code(required): integer
Minimum Value:
400Maximum Value:600HTTP response codeExample:404 -
message(required): string
Human-readable error message
-
stack: array
stack
-
type(required): string
Internal type definition of the errorExample:
NoSuchNamespaceException
502 Response
A gateway or proxy received an invalid response from the upstream server; the commit state is unknown.
Root Schema : IcebergErrorResponse
Type:
objectJSON wrapper for all error responses (non-2xx)
Show Source
-
error(required): object
ErrorModel
JSON error payload returned in a response with further details on the error
Example:
{
"error":{
"message":"The server does not support this operation",
"type":"UnsupportedOperationException",
"code":406
}
}Nested Schema : ErrorModel
Type:
objectJSON error payload returned in a response with further details on the error
Show Source
-
code(required): integer
Minimum Value:
400Maximum Value:600HTTP response codeExample:404 -
message(required): string
Human-readable error message
-
stack: array
stack
-
type(required): string
Internal type definition of the errorExample:
NoSuchNamespaceException
503 Response
The service is not ready to handle the request, request could have been partially processed.
The service may additionally send a Retry-After header to indicate when to retry, a non idempotent request should only be retried by the client when the Retry-After header is present.
Root Schema : IcebergErrorResponse
Type:
objectJSON wrapper for all error responses (non-2xx)
Show Source
-
error(required): object
ErrorModel
JSON error payload returned in a response with further details on the error
Example:
{
"error":{
"message":"The server does not support this operation",
"type":"UnsupportedOperationException",
"code":406
}
}Nested Schema : ErrorModel
Type:
objectJSON error payload returned in a response with further details on the error
Show Source
-
code(required): integer
Minimum Value:
400Maximum Value:600HTTP response codeExample:404 -
message(required): string
Human-readable error message
-
stack: array
stack
-
type(required): string
Internal type definition of the errorExample:
NoSuchNamespaceException
504 Response
A server-side gateway timeout occurred; the commit state is unknown.
Root Schema : IcebergErrorResponse
Type:
objectJSON wrapper for all error responses (non-2xx)
Show Source
-
error(required): object
ErrorModel
JSON error payload returned in a response with further details on the error
Example:
{
"error":{
"message":"The server does not support this operation",
"type":"UnsupportedOperationException",
"code":406
}
}Nested Schema : ErrorModel
Type:
objectJSON error payload returned in a response with further details on the error
Show Source
-
code(required): integer
Minimum Value:
400Maximum Value:600HTTP response codeExample:404 -
message(required): string
Human-readable error message
-
stack: array
stack
-
type(required): string
Internal type definition of the errorExample:
NoSuchNamespaceException
5XX Response
A server-side problem that might not be addressable on the client.
Root Schema : IcebergErrorResponse
Type:
objectJSON wrapper for all error responses (non-2xx)
Show Source
-
error(required): object
ErrorModel
JSON error payload returned in a response with further details on the error
Example:
{
"error":{
"message":"The server does not support this operation",
"type":"UnsupportedOperationException",
"code":406
}
}Nested Schema : ErrorModel
Type:
objectJSON error payload returned in a response with further details on the error
Show Source
-
code(required): integer
Minimum Value:
400Maximum Value:600HTTP response codeExample:404 -
message(required): string
Human-readable error message
-
stack: array
stack
-
type(required): string
Internal type definition of the errorExample:
NoSuchNamespaceException