This is an automated email from the ASF dual-hosted git repository.
stevenwu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/main by this push:
new bf54961551 OpenAPI: Add REST endpoint for registering views (#14869)
bf54961551 is described below
commit bf549615515157addf94d637538b34f847aea061
Author: Ajantha Bhat <[email protected]>
AuthorDate: Sat Jan 17 10:35:12 2026 +0530
OpenAPI: Add REST endpoint for registering views (#14869)
---
open-api/rest-catalog-open-api.py | 5 +++
open-api/rest-catalog-open-api.yaml | 65 +++++++++++++++++++++++++++++++++++++
2 files changed, 70 insertions(+)
diff --git a/open-api/rest-catalog-open-api.py
b/open-api/rest-catalog-open-api.py
index 1079d277d3..0f60730783 100644
--- a/open-api/rest-catalog-open-api.py
+++ b/open-api/rest-catalog-open-api.py
@@ -578,6 +578,11 @@ class RegisterTableRequest(BaseModel):
)
+class RegisterViewRequest(BaseModel):
+ name: str
+ metadata_location: str = Field(..., alias='metadata-location')
+
+
class TokenType(BaseModel):
__root__: Literal[
'urn:ietf:params:oauth:token-type:access_token',
diff --git a/open-api/rest-catalog-open-api.yaml
b/open-api/rest-catalog-open-api.yaml
index e9a40ed129..9722344347 100644
--- a/open-api/rest-catalog-open-api.yaml
+++ b/open-api/rest-catalog-open-api.yaml
@@ -1835,6 +1835,60 @@ paths:
5XX:
$ref: '#/components/responses/ServerErrorResponse'
+ /v1/{prefix}/namespaces/{namespace}/register-view:
+ parameters:
+ - $ref: '#/components/parameters/prefix'
+ - $ref: '#/components/parameters/namespace'
+
+ post:
+ tags:
+ - Catalog API
+ summary: Register a view in the catalog
+ parameters:
+ - $ref: '#/components/parameters/idempotency-key'
+ description:
+ Register a view in the given namespace using given metadata file
location.
+
+ operationId: registerView
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RegisterViewRequest'
+ responses:
+ 200:
+ $ref: '#/components/responses/LoadViewResponse'
+ 400:
+ $ref: '#/components/responses/BadRequestErrorResponse'
+ 401:
+ $ref: '#/components/responses/UnauthorizedResponse'
+ 403:
+ $ref: '#/components/responses/ForbiddenResponse'
+ 404:
+ description: Not Found - The namespace specified does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IcebergErrorResponse'
+ examples:
+ NamespaceNotFound:
+ $ref: '#/components/examples/NoSuchNamespaceError'
+ 409:
+ description: Conflict - The identifier already exists as a table or
view
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IcebergErrorResponse'
+ examples:
+ ViewAlreadyExists:
+ $ref: '#/components/examples/ViewAlreadyExistsError'
+ 419:
+ $ref: '#/components/responses/AuthenticationTimeoutResponse'
+ 503:
+ $ref: '#/components/responses/ServiceUnavailableResponse'
+ 5XX:
+ $ref: '#/components/responses/ServerErrorResponse'
components:
#######################################################
@@ -3696,6 +3750,17 @@ components:
additionalProperties:
type: string
+ RegisterViewRequest:
+ type: object
+ required:
+ - name
+ - metadata-location
+ properties:
+ name:
+ type: string
+ metadata-location:
+ type: string
+
TokenType:
type: string
enum: