Skip to content

Commit 6575166

Browse files
committed
OpenAPI: Express server capabilities via /config endpoint
1 parent f9f30f6 commit 6575166

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

open-api/rest-catalog-open-api.yaml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ info:
2828
description:
2929
Defines the specification for the first version of the REST Catalog API.
3030
Implementations should ideally support both Iceberg table specs v1 and v2, with priority given to v2.
31+
32+
This API uses capability tags to describe optional functionality.
33+
In order to support a particular capability, a server is required to implement all endpoints grouped under a particular tag.
34+
Servers can indicate supported capabilities via the /v1/config endpoint.
3135
servers:
3236
- url: "{scheme}://{host}/{basePath}"
3337
description: Server URL when the port can be inferred from the scheme
@@ -61,6 +65,16 @@ security:
6165
- OAuth2: [catalog]
6266
- BearerAuth: []
6367

68+
# Capability tags describe optional functionality and are used to group endpoints together.
69+
# In order to support a particular capability, a server is required to implement all endpoints grouped under a particular tag.
70+
tags:
71+
- name: views
72+
description: Required as part of view support
73+
- name: remote-signing
74+
description: Required as part of remote signing support
75+
- name: multi-table-commit
76+
description: Required as part of multi-table commit support
77+
6478
paths:
6579
/v1/config:
6680

@@ -86,6 +100,7 @@ paths:
86100
87101
- overrides - properties that should be used to override client configuration; applied after defaults and client configuration
88102
103+
- capabilities - list of capabilities that are supported by the server
89104
90105
Catalog configuration is constructed by setting the defaults, then client-
91106
provided configuration, and finally overrides. The final property set is then
@@ -114,7 +129,8 @@ paths:
114129
},
115130
"defaults": {
116131
"clients": "4"
117-
}
132+
},
133+
"capabilities": ["views", "remote_signing"]
118134
}
119135
400:
120136
$ref: '#/components/responses/BadRequestErrorResponse'
@@ -963,6 +979,7 @@ paths:
963979
post:
964980
tags:
965981
- Catalog API
982+
- multi-table-commit
966983
summary: Commit updates to multiple tables in an atomic operation
967984
operationId: commitTransaction
968985
requestBody:
@@ -1078,6 +1095,7 @@ paths:
10781095
get:
10791096
tags:
10801097
- Catalog API
1098+
- views
10811099
summary: List all view identifiers underneath a given namespace
10821100
description: Return all view identifiers under this namespace
10831101
operationId: listViews
@@ -1112,6 +1130,7 @@ paths:
11121130
post:
11131131
tags:
11141132
- Catalog API
1133+
- views
11151134
summary: Create a view in the given namespace
11161135
description:
11171136
Create a view in the given namespace.
@@ -1165,6 +1184,7 @@ paths:
11651184
get:
11661185
tags:
11671186
- Catalog API
1187+
- views
11681188
summary: Load a view from the catalog
11691189
operationId: loadView
11701190
description:
@@ -1211,6 +1231,7 @@ paths:
12111231
post:
12121232
tags:
12131233
- Catalog API
1234+
- views
12141235
summary: Replace a view
12151236
operationId: replaceView
12161237
description:
@@ -1311,6 +1332,7 @@ paths:
13111332
delete:
13121333
tags:
13131334
- Catalog API
1335+
- views
13141336
summary: Drop a view from the catalog
13151337
operationId: dropView
13161338
description: Remove a view from the catalog
@@ -1343,6 +1365,7 @@ paths:
13431365
head:
13441366
tags:
13451367
- Catalog API
1368+
- views
13461369
summary: Check if a view exists
13471370
operationId: viewExists
13481371
description:
@@ -1370,6 +1393,7 @@ paths:
13701393
post:
13711394
tags:
13721395
- Catalog API
1396+
- views
13731397
summary: Rename a view from its current name to a new name
13741398
description:
13751399
Rename a view from one identifier to another. It's valid to move a view
@@ -1567,6 +1591,18 @@ components:
15671591
type: string
15681592
description:
15691593
Properties that should be used as default configuration; applied before client configuration.
1594+
capabilities:
1595+
type: array
1596+
uniqueItems: true
1597+
items:
1598+
type: string
1599+
enum:
1600+
- views
1601+
- vended-credentials
1602+
- remote-signing
1603+
- multi-table-commit
1604+
description: Capabilities supported by the server
1605+
example: [ "views", "remote-signing" ]
15701606

15711607
CreateNamespaceRequest:
15721608
type: object

0 commit comments

Comments
 (0)