Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions open-api/rest-catalog-open-api.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ class CatalogConfig(BaseModel):
...,
description='Properties that should be used as default configuration; applied before client configuration.',
)
endpoints: Optional[List[str]] = Field(
None,
description='A list of endpoints that the server supports. The format of each endpoint must be "<HTTP verb> <resource path from OpenAPI REST spec>". The HTTP verb and the resource path must be separated by a space character.',
example=[
'GET /v1/{prefix}/namespaces/{namespace}',
'GET /v1/{prefix}/namespaces',
'POST /v1/{prefix}/namespaces',
'GET /v1/{prefix}/namespaces/{namespace}/tables/{table}',
'GET /v1/{prefix}/namespaces/{namespace}/views/{view}',
],
)


class UpdateNamespacePropertiesRequest(BaseModel):
Expand Down
54 changes: 53 additions & 1 deletion open-api/rest-catalog-open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,38 @@ paths:

Common catalog configuration settings are documented at
https://iceberg.apache.org/docs/latest/configuration/#catalog-properties


The catalog configuration also holds an optional `endpoints` field that contains information about the endpoints
supported by the server. If a server does not send the `endpoints` field, a default set of endpoints is assumed:

- GET /v1/{prefix}/namespaces

- POST /v1/{prefix}/namespaces

- GET /v1/{prefix}/namespaces/{namespace}

- DELETE /v1/{prefix}/namespaces/{namespace}

- POST /v1/{prefix}/namespaces/{namespace}/properties

- GET /v1/{prefix}/namespaces/{namespace}/tables

- POST /v1/{prefix}/namespaces/{namespace}/tables

- GET /v1/{prefix}/namespaces/{namespace}/tables/{table}

- POST /v1/{prefix}/namespaces/{namespace}/tables/{table}

- DELETE /v1/{prefix}/namespaces/{namespace}/tables/{table}

- POST /v1/{prefix}/namespaces/{namespace}/register

- POST /v1/{prefix}/namespaces/{namespace}/tables/{table}/metrics

- POST /v1/{prefix}/tables/rename

- POST /v1/{prefix}/transactions/commit
"
responses:
200:
Expand All @@ -114,7 +146,14 @@ paths:
},
"defaults": {
"clients": "4"
}
},
"endpoints": [
"GET /v1/{prefix}/namespaces/{namespace}",
"GET /v1/{prefix}/namespaces",
"POST /v1/{prefix}/namespaces",
"GET /v1/{prefix}/namespaces/{namespace}/tables/{table}",
"GET /v1/{prefix}/namespaces/{namespace}/views/{view}"
]
}
400:
$ref: '#/components/responses/BadRequestErrorResponse'
Expand Down Expand Up @@ -1580,6 +1619,19 @@ components:
type: string
description:
Properties that should be used as default configuration; applied before client configuration.
endpoints:
type: array
items:
type: string
description: A list of endpoints that the server supports. The format of each endpoint must be "<HTTP verb> <resource path from OpenAPI REST spec>".
The HTTP verb and the resource path must be separated by a space character.
example: [
"GET /v1/{prefix}/namespaces/{namespace}",
"GET /v1/{prefix}/namespaces",
"POST /v1/{prefix}/namespaces",
"GET /v1/{prefix}/namespaces/{namespace}/tables/{table}",
"GET /v1/{prefix}/namespaces/{namespace}/views/{view}"
]

CreateNamespaceRequest:
type: object
Expand Down