Rename a table from its current name to a new name
POST/v1/:prefix/tables/rename
Rename a table from one identifier to another. It's valid to move a table across namespaces, but the server implementation is not required to support it.
Request
Path Parameters
The catalog name in Gravitino, as returned in defaults.prefix by GET /v1/config
Header Parameters
- Finalize & replay: 200, 201, 204, and deterministic terminal 4xx (including 409 such as AlreadyExists, NamespaceNotEmpty, etc.)
- Do not finalize (not stored/replayed): 5xx
- 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.
Possible values: >= 36 characters and <= 36 characters
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:
Key Requirements:
- application/json
Body
required
Current table identifier to rename and new table identifier to rename to
source
object
required
Reference to one or more levels of a namespace
destination
object
required
Reference to one or more levels of a namespace
Responses
- 204
- 400
- 401
- 403
- 404
- 406
- 409
- 419
- 503
- 5XX
Success, no content
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.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error
object
required
JSON error payload returned in a response with further details on the error
Human-readable error message
Internal type definition of the error
Possible values: >= 400 and <= 600
HTTP response code
{
"error": {
"message": "The server does not support this operation",
"type": "UnsupportedOperationException",
"code": 406
}
}
{
"error": {
"message": "Malformed request",
"type": "BadRequestException",
"code": 400
}
}
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.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error
object
required
JSON error payload returned in a response with further details on the error
Human-readable error message
Internal type definition of the error
Possible values: >= 400 and <= 600
HTTP response code
{
"error": {
"message": "The server does not support this operation",
"type": "UnsupportedOperationException",
"code": 406
}
}
{
"error": {
"message": "Not authorized to make this request",
"type": "NotAuthorizedException",
"code": 401
}
}
Forbidden. Authenticated user does not have the necessary permissions.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error
object
required
JSON error payload returned in a response with further details on the error
Human-readable error message
Internal type definition of the error
Possible values: >= 400 and <= 600
HTTP response code
{
"error": {
"message": "The server does not support this operation",
"type": "UnsupportedOperationException",
"code": 406
}
}
{
"error": {
"message": "Not authorized to make this request",
"type": "NotAuthorizedException",
"code": 403
}
}
Not Found - NoSuchTableException, Table to rename does not exist - NoSuchNamespaceException, The target namespace of the new table identifier does not exist
- application/json
- Schema
- Example (from schema)
- TableToRenameDoesNotExist
- NamespaceToRenameToDoesNotExist
Schema
error
object
required
JSON error payload returned in a response with further details on the error
Human-readable error message
Internal type definition of the error
Possible values: >= 400 and <= 600
HTTP response code
{
"error": {
"message": "The server does not support this operation",
"type": "UnsupportedOperationException",
"code": 406
}
}
The requested table does not exist
{
"error": {
"message": "The given table does not exist",
"type": "NoSuchTableException",
"code": 404
}
}
The requested namespace does not exist
{
"error": {
"message": "The given namespace does not exist",
"type": "NoSuchNamespaceException",
"code": 404
}
}
Not Acceptable / Unsupported Operation. The server does not support this operation.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Human-readable error message
Internal type definition of the error
Possible values: >= 400 and <= 600
HTTP response code
{
"message": "string",
"type": "NoSuchNamespaceException",
"code": 404,
"stack": [
"string"
]
}
{
"error": {
"message": "The server does not support this operation",
"type": "UnsupportedOperationException",
"code": 406
}
}
Conflict - The target identifier to rename to already exists as a table or view
- application/json
- Schema
- Example (from schema)
- Example
Schema
error
object
required
JSON error payload returned in a response with further details on the error
Human-readable error message
Internal type definition of the error
Possible values: >= 400 and <= 600
HTTP response code
{
"error": {
"message": "The server does not support this operation",
"type": "UnsupportedOperationException",
"code": 406
}
}
The requested table identifier already exists
{
"summary": "The requested table identifier already exists",
"value": {
"error": {
"message": "The requested table identifier already exists",
"type": "AlreadyExistsException",
"code": 409
}
}
}
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.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error
object
required
JSON error payload returned in a response with further details on the error
Human-readable error message
Internal type definition of the error
Possible values: >= 400 and <= 600
HTTP response code
{
"error": {
"message": "The server does not support this operation",
"type": "UnsupportedOperationException",
"code": 406
}
}
{
"error": {
"message": "Credentials have timed out",
"type": "AuthenticationTimeoutException",
"code": 419
}
}
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.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error
object
required
JSON error payload returned in a response with further details on the error
Human-readable error message
Internal type definition of the error
Possible values: >= 400 and <= 600
HTTP response code
{
"error": {
"message": "The server does not support this operation",
"type": "UnsupportedOperationException",
"code": 406
}
}
{
"error": {
"message": "Slow down",
"type": "SlowDownException",
"code": 503
}
}
A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error
object
required
JSON error payload returned in a response with further details on the error
Human-readable error message
Internal type definition of the error
Possible values: >= 400 and <= 600
HTTP response code
{
"error": {
"message": "The server does not support this operation",
"type": "UnsupportedOperationException",
"code": 406
}
}
{
"error": {
"message": "Internal Server Error",
"type": "InternalServerError",
"code": 500
}
}