World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
---
paths:
/metalakes/{metalake}/catalogs:
parameters:
- $ref: "./openapi.yaml#/components/parameters/metalake"
get:
tags:
- catalog
summary: List catalogs (names)
operationId: listCatalogs
parameters:
- $ref: "#/components/parameters/details"
- $ref: "#/components/parameters/includeProperties"
responses:
"200":
description: Returns the list of catalog objects if {details} is true, otherwise returns the list of catalog identifiers
content:
application/vnd.gravitino.v1+json:
schema:
oneOf:
- $ref: "#/components/schemas/CatalogListResponse"
- $ref: "#/components/schemas/CatalogInfoListResponse"
examples:
CatalogListResponse:
$ref: "#/components/examples/CatalogListResponse"
CatalogInfoListResponse:
$ref: "#/components/examples/CatalogInfoListResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequestErrorResponse"
"403":
$ref: "./openapi.yaml#/components/responses/ForbiddenErrorResponse"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
post:
tags:
- catalog
summary: Create catalog
operationId: createCatalog
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CatalogCreateRequest"
examples:
CatalogCreate:
$ref: "#/components/examples/CatalogCreate"
CatalogCreateIcebergStorageBackend:
$ref: "#/components/examples/CatalogCreateIcebergStorageBackend"
CatalogCreateIcebergRestBackend:
$ref: "#/components/examples/CatalogCreateIcebergRestBackend"
responses:
"200":
$ref: "#/components/responses/CatalogResponse"
"403":
description: >-
Forbidden - The caller cannot create catalogs in the metalake, or the backend refuses
the credentials configured for the catalog at creation. When authorization is enabled,
a missing metalake also returns 403.
content:
application/json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
"409":
description: Conflict - The target catalog already exists in the specified metalake
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
CatalogAlreadyExistsException:
$ref: "#/components/examples/CatalogAlreadyExistsException"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
/metalakes/{metalake}/catalogs/testConnection:
parameters:
- $ref: "./openapi.yaml#/components/parameters/metalake"
post:
tags:
- catalog
summary: Test catalog connection
description: >-
Runs the provider's smallest meaningful, read-only catalog-level operation using the
supplied configuration and effective credentials. This fail-fast preflight surfaces
configuration and connectivity failures before regular catalog operations, but does not
guarantee that every object-level or mutating operation will succeed. Fileset catalogs
test all catalog-level `location` and `location-*` targets. Model and Generic catalogs do
not support connection testing.
operationId: testConnection
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CatalogCreateRequest"
examples:
CatalogCreate:
$ref: "#/components/examples/CatalogCreate"
CatalogCreateIcebergStorageBackend:
$ref: "#/components/examples/CatalogCreateIcebergStorageBackend"
CatalogCreateIcebergRestBackend:
$ref: "#/components/examples/CatalogCreateIcebergRestBackend"
responses:
"200":
description: Test connection completed
content:
application/vnd.gravitino.v1+json:
schema:
type: object
required:
- code
properties:
code:
type: integer
format: int32
description: Status code of the response
type:
type: string
description: Internal type definition of the exception
message:
type: string
description: The message of the exception
stack:
type: array
deprecated: true
description: >-
Deprecated diagnostic stack trace. Operators should disable it with
gravitino.server.webserver.includeErrorStackTrace=false because it can
expose internal implementation details. It remains enabled by default only
to avoid breaking legacy clients that expect this field. See
[OWASP REST Security: Error handling](https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html#error-handling)
and [CWE-209](https://cwe.mitre.org/data/definitions/209.html).
items:
type: string
examples:
TestConnectionSuccess:
value: {
"code": 0
}
TestConnectionFailed:
$ref: "#/components/examples/ConnectionFailedException"
CatalogAlreadyExists:
$ref: "#/components/examples/CatalogAlreadyExistsException"
MetalakeNotFound:
$ref: "./metalakes.yaml#/components/examples/NoSuchMetalakeException"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequestErrorResponse"
"403":
$ref: "./openapi.yaml#/components/responses/ForbiddenErrorResponse"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
/metalakes/{metalake}/catalogs/{catalog}/testConnection:
parameters:
- $ref: "./openapi.yaml#/components/parameters/metalake"
- $ref: "./openapi.yaml#/components/parameters/catalog"
post:
tags:
- catalog
summary: Test an existing catalog connection
description: >-
Runs the provider's smallest meaningful, read-only catalog-level operation using the
catalog's stored configuration and effective credentials. Optional proposed catalog
changes are applied to a temporary effective configuration for this probe and are not
persisted. This fail-fast preflight surfaces configuration and connectivity failures before
regular catalog operations, but does not guarantee that every object-level or mutating
operation will succeed. Fileset catalogs test all catalog-level `location` and `location-*`
targets. Model and Generic catalogs do not support connection testing. Expected test
failures are returned as application error codes in an HTTP 200 response. When
authorization is enabled, testing with the stored configuration requires the same access
as loading the catalog, and testing with proposed changes requires owning the metalake or
the catalog, the same as altering it. Callers without that access receive an HTTP 403
response.
operationId: testExistingCatalogConnection
requestBody:
required: false
description: Optional catalog changes to apply only to this connection test
content:
application/json:
schema:
$ref: "#/components/schemas/CatalogUpdatesRequest"
responses:
"200":
description: Connection test completed, including expected test failures
content:
application/vnd.gravitino.v1+json:
schema:
type: object
required:
- code
properties:
code:
type: integer
format: int32
description: Application status code; 0 indicates success
type:
type: string
description: Internal exception type when the test fails
message:
type: string
description: Sanitized failure message
examples:
TestConnectionSuccess:
value:
code: 0
TestConnectionFailed:
value:
code: 1007
type: ConnectionFailedException
message: "Failed to test Fileset catalog connection: location (access denied)"
InvalidProbeTarget:
value:
code: 1001
type: IllegalArgumentException
message: Fileset catalog has no catalog-level location to test
TestConnectionNotSupported:
value:
code: 1006
type: UnsupportedOperationException
message: Model catalogs do not define an external catalog-level connection probe
CatalogNotFound:
value:
code: 1003
type: NoSuchCatalogException
message: Catalog my_metalake.my_catalog does not exist
CatalogDisabled:
value:
code: 1009
type: CatalogNotInUseException
message: Catalog my_metalake.my_catalog is not in use
"400":
$ref: "./openapi.yaml#/components/responses/BadRequestErrorResponse"
"403":
description: >-
Forbidden - The caller cannot load the catalog, or tests proposed changes without
owning the metalake or the catalog. When authorization is enabled, a missing metalake
also returns 403.
content:
application/json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
/metalakes/{metalake}/catalogs/{catalog}:
parameters:
- $ref: "./openapi.yaml#/components/parameters/metalake"
- $ref: "./openapi.yaml#/components/parameters/catalog"
get:
tags:
- catalog
summary: Get catalog
operationId: loadCatalog
description: Returns the specified catalog information in the specified metalake.
responses:
"200":
$ref: "#/components/responses/CatalogResponse"
"403":
$ref: "./openapi.yaml#/components/responses/ForbiddenErrorResponse"
"404":
description: >-
Not Found - The specified catalog or its parent metalake does not exist. When
authorization is enabled, a missing metalake returns 403.
content:
application/json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
NoSuchMetalakeException:
$ref: "./metalakes.yaml#/components/examples/NoSuchMetalakeException"
NoSuchCatalogException:
$ref: "#/components/examples/NoSuchCatalogException"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
put:
tags:
- catalog
summary: Update catalog
operationId: alterCatalog
description: Alters the specified catalog information in the specified metalake
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CatalogUpdatesRequest"
responses:
"200":
$ref: "#/components/responses/CatalogResponse"
"403":
$ref: "./openapi.yaml#/components/responses/ForbiddenErrorResponse"
"404":
description: >-
Not Found - The specified catalog or its parent metalake does not exist. When
authorization is enabled, a missing metalake returns 403.
content:
application/json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
NoSuchMetalakeException:
$ref: "./metalakes.yaml#/components/examples/NoSuchMetalakeException"
NoSuchCatalogException:
$ref: "#/components/examples/NoSuchCatalogException"
"409":
description: >-
Conflict - The rename target already exists, or the catalog is disabled
(CatalogNotInUseException).
content:
application/json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
CatalogAlreadyExistsException:
$ref: "#/components/examples/CatalogAlreadyExistsException"
CatalogNotInUseException:
value:
code: 1009
type: CatalogNotInUseException
message: >-
Failed to operate catalog(s) [my_catalog] operation [ALTER] under metalake
[my_metalake], reason [The catalog my_catalog is not in use]
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
patch:
tags:
- catalog
summary: set catalog in-use
operationId: setCatalog
description: Set a specific catalog in-use or not in-use
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CatalogSetRequest"
responses:
"200":
$ref: "./openapi.yaml#/components/responses/BaseResponse"
"403":
$ref: "./openapi.yaml#/components/responses/ForbiddenErrorResponse"
"404":
description: >-
Not Found - The specified catalog or its parent metalake does not exist. When
authorization is enabled, a missing metalake returns 403.
content:
application/json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
NoSuchCatalogException:
$ref: "#/components/examples/NoSuchCatalogException"
"500":
description:
Internal server error. It is possible that the server
encountered a storage issue.
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
delete:
tags:
- catalog
summary: Drop catalog
operationId: dropCatalog
parameters:
- $ref: "./openapi.yaml#/components/parameters/force"
responses:
"200":
$ref: "./openapi.yaml#/components/responses/DropResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequestErrorResponse"
"403":
$ref: "./openapi.yaml#/components/responses/ForbiddenErrorResponse"
"409":
description: >-
Conflict - With force omitted or false, an active catalog raises CatalogInUseException.
Disable it before dropping it. If the disabled catalog still contains user-created
schemas, a non-forced drop raises NonEmptyCatalogException.
content:
application/json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
CatalogInUseException:
value:
code: 1010
type: CatalogInUseException
message: >-
Failed to operate catalog(s) [my_catalog] operation [DROP] under metalake
[my_metalake], reason [Catalog my_metalake.my_catalog is in use, please
disable it first or use force option]
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
components:
parameters:
details:
name: details
in: query
description: Include detailed information about the catalogs
required: false
schema:
type: boolean
default: false
includeProperties:
name: includeProperties
in: query
description: Include resolved catalog properties when details is true. When false, retain only in-use from stored metadata (defaults to "true").
required: false
schema:
type: boolean
default: true
schemas:
Catalog:
type: object
description: A catalog
required:
- name
- type
- provider
- audit
properties:
name:
type: string
description: The name of the catalog
type:
type: string
description: The type of the catalog
enum:
- relational
- fileset
- messaging
- model
provider:
type: string
description: The provider of the catalog
enum:
- hive
- lakehouse-iceberg
- lakehouse-paimon
- lakehouse-hudi
- jdbc-mysql
- jdbc-postgresql
- jdbc-doris
- fileset
- kafka
- model
comment:
type: string
description: A comment about the catalog
nullable: true
audit:
$ref: "./openapi.yaml#/components/schemas/Audit"
properties:
type: object
description: Configured string to string map of properties for the catalog
default: { }
additionalProperties:
type: string
CatalogListResponse:
type: object
properties:
code:
type: integer
format: int32
description: Status code of the response
enum:
- 0
identifiers:
type: array
items:
$ref: "./openapi.yaml#/components/schemas/NameIdentifier"
CatalogInfoListResponse:
type: object
properties:
code:
type: integer
format: int32
description: Status code of the response
enum:
- 0
catalogs:
type: array
description: A list of catalog objects
items:
$ref: "#/components/schemas/Catalog"
CatalogCreateRequest:
type: object
required:
- name
- type
properties:
name:
type: string
description: The name of the catalog
type:
type: string
description: The type of the catalog
enum:
- relational
- fileset
- messaging
- model
provider:
type: string
description: The provider of the catalog (provider is not required for fileset and model catalog)
enum:
- hive
- lakehouse-iceberg
- lakehouse-paimon
- lakehouse-hudi
- jdbc-mysql
- jdbc-postgresql
- jdbc-doris
- jdbc-oceanbase
- kafka
comment:
type: string
description: A comment for the catalog
nullable: true
properties:
type: object
description: A map of properties for the catalog
nullable: true
default: { }
additionalProperties:
type: string
secretBindings:
type: object
description: >
Optional map of property key to write-through binding. Persisted value
becomes a URN.
nullable: true
additionalProperties:
$ref: "./secrets.yaml#/components/schemas/SecretBinding"
secretReferences:
type: object
description: >
Optional map of property key to secret locator. Server builds and
persists the URN. Must not overlap with secretBindings.
nullable: true
additionalProperties:
$ref: "./secrets.yaml#/components/schemas/SecretReference"
CatalogSetRequest:
type: object
required:
- inUse
properties:
inUse:
type: boolean
description: The in-use status of the catalog to set
example: {
"inUse": true
}
CatalogUpdatesRequest:
type: object
required:
- updates
properties:
updates:
type: array
items:
$ref: "#/components/schemas/CatalogUpdateRequest"
CatalogUpdateRequest:
oneOf:
- $ref: "#/components/schemas/RenameCatalogRequest"
- $ref: "#/components/schemas/UpdateCatalogCommentRequest"
- $ref: "#/components/schemas/SetCatalogPropertyRequest"
- $ref: "#/components/schemas/RemoveCatalogPropertyRequest"
- $ref: "#/components/schemas/SetCatalogSecretBindingRequest"
- $ref: "#/components/schemas/SetCatalogSecretReferenceRequest"
discriminator:
propertyName: "@type"
mapping:
rename: "#/components/schemas/RenameCatalogRequest"
updateComment: "#/components/schemas/UpdateCatalogCommentRequest"
setProperty: "#/components/schemas/SetCatalogPropertyRequest"
removeProperty: "#/components/schemas/RemoveCatalogPropertyRequest"
setSecretBinding: "#/components/schemas/SetCatalogSecretBindingRequest"
setSecretReference: "#/components/schemas/SetCatalogSecretReferenceRequest"
RenameCatalogRequest:
type: object
required:
- "@type"
- newName
properties:
"@type":
type: string
enum:
- rename
newName:
type: string
description: The new name of the catalog
example: {
"@type": "rename",
"newName": "my_catalog_new"
}
UpdateCatalogCommentRequest:
type: object
required:
- "@type"
- newComment
properties:
"@type":
type: string
enum:
- updateComment
newComment:
type: string
description: The new comment of the catalog
example: {
"@type": "updateComment",
"newComment": "This is my new catalog comment"
}
SetCatalogPropertyRequest:
type: object
required:
- "@type"
- property
- value
properties:
"@type":
type: string
enum:
- setProperty
property:
type: string
description: The property to set
value:
type: string
description: >
The value to set. If the property holds a write-through secret URN of this catalog, the
value is written as a new version of that secret. If it holds another secret URN, the
value is written through that secret's provider right away, and a failed alter does not
undo it.
example: {
"@type": "setProperty",
"property": "key1",
"value": "value1"
}
RemoveCatalogPropertyRequest:
type: object
required:
- "@type"
- property
properties:
"@type":
type: string
enum:
- removeProperty
property:
type: string
description: The property to remove
example: {
"@type": "removeProperty",
"property": "key2"
}
SetCatalogSecretBindingRequest:
type: object
required:
- "@type"
- property
- provider
- plaintext
properties:
"@type":
type: string
enum:
- setSecretBinding
property:
type: string
description: The property to bind
provider:
type: string
description: Registered secrets-provider instance name
plaintext:
type: string
description: Plaintext secret to write through
format: password
example: {
"@type": "setSecretBinding",
"property": "password",
"provider": "env",
"plaintext": "secret-value"
}
SetCatalogSecretReferenceRequest:
type: object
required:
- "@type"
- property
- provider
properties:
"@type":
type: string
enum:
- setSecretReference
property:
type: string
description: The property to bind
provider:
type: string
description: Registered secrets-provider instance name
attributes:
type: object
description: Provider-specific locator keys (empty object if none)
additionalProperties:
type: string
default: {}
example: {
"@type": "setSecretReference",
"property": "password",
"provider": "vault",
"attributes": {
"path": "secret/data/my-password"
}
}
responses:
CatalogResponse:
description: Returns included catalog object
content:
application/vnd.gravitino.v1+json:
schema:
type: object
properties:
code:
type: integer
format: int32
description: Status code of the response
enum:
- 0
catalog:
$ref: "#/components/schemas/Catalog"
examples:
CatalogResponse:
$ref: "#/components/examples/CatalogResponse"
examples:
CatalogListResponse:
value: {
"code": 0,
"identifiers": [
{
"namespace": [
"my_metalake"
],
"name": "my_hive_catalog"
}
]
}
CatalogInfoListResponse:
value: {
"code": 0,
"catalogs": [
{
"name": "my_hive_catalog",
"type": "relational",
"provider": "hive",
"comment": "This is my hive catalog",
"properties": {
"key1": "value1",
"gravitino.bypass.hive.metastore.client.capability.check": "false",
"metastore.uris": "thrift://127.0.0.1:9083"
},
"audit": {
"creator": "gravitino",
"createTime": "2023-12-08T03:41:25.595Z"
}
},
{
"name": "my_hadoop_catalog",
"type": "fileset",
"provider": "fileset",
"comment": "This is my hadoop catalog",
"properties": {
"key2": "value2"
},
"audit": {
"creator": "gravitino",
"createTime": "2023-12-08T06:41:25.595Z"
}
}
]
}
CatalogCreate:
value: {
"name": "my_hive_catalog",
"type": "relational",
"provider": "hive",
"comment": "This is my hive catalog",
"properties": {
"metastore.uris": "thrift://127.0.0.1:9083",
"key1": "value1"
}
}
# Iceberg with a storage backend (hive/jdbc): `warehouse` is a physical storage LOCATION.
CatalogCreateIcebergStorageBackend:
summary: "Iceberg catalog (hive/jdbc backend): warehouse is a storage location"
description: >-
For the `lakehouse-iceberg` provider with `catalog-backend` set to `hive` or `jdbc`,
the `warehouse` property is a physical storage location (e.g. `s3a://bucket/path` or
`hdfs://ns/path`) and is required.
value: {
"name": "my_iceberg_catalog",
"type": "relational",
"provider": "lakehouse-iceberg",
"comment": "Iceberg catalog backed by a Hive metastore",
"properties": {
"catalog-backend": "hive",
"uri": "thrift://127.0.0.1:9083",
"warehouse": "s3a://my-bucket/warehouse"
}
}
# Iceberg with the REST backend: `warehouse` is a CATALOG SELECTOR, not a storage location.
CatalogCreateIcebergRestBackend:
summary: "Iceberg catalog (REST backend): warehouse selects a catalog, or omit for the default"
description: >-
For the `lakehouse-iceberg` provider with `catalog-backend` set to `rest`, the
`warehouse` property is NOT a storage location. It is forwarded to the Iceberg REST
server (`GET /v1/config?warehouse=...`) as a catalog selector: a catalog name for
Gravitino's Iceberg REST server (omit it to use the default catalog), or a
server-defined identifier such as an Amazon S3 Tables bucket ARN. A storage URI like
`s3://...` here is a common mistake copied from hive/jdbc examples and will fail to
resolve.
value: {
"name": "my_iceberg_rest_catalog",
"type": "relational",
"provider": "lakehouse-iceberg",
"comment": "Iceberg catalog backed by a remote Iceberg REST server",
"properties": {
"catalog-backend": "rest",
"uri": "http://127.0.0.1:9001/iceberg"
}
}
CatalogResponse:
value: {
"code": 0,
"catalog": {
"name": "my_hive_catalog",
"type": "relational",
"provider": "hive",
"comment": "This is my hive catalog",
"properties": {
"key1": "value1",
"gravitino.bypass.hive.metastore.client.capability.check": "false",
"metastore.uris": "thrift://127.0.0.1:9083"
},
"audit": {
"creator": "gravitino",
"createTime": "2023-12-08T03:41:25.595Z"
}
}
}
CatalogAlreadyExistsException:
value: {
"code": 1004,
"type": "CatalogAlreadyExistsException",
"message": "Failed to operate catalog(s) [my_catalog] operation [CREATE], reason [CatalogAlreadyExistsException]",
"stack": [
"org.apache.gravitino.exceptions.CatalogAlreadyExistsException: Catalog my_catalog already exists",
"..."
]
}
ConnectionFailedException:
value: {
"code": 1007,
"type": "ConnectionFailedException",
"message": "Failed to run getAllDatabases in Hive Metastore: Failed to connect to Hive Metastore",
"stack": [
"org.apache.gravitino.exceptions.ConnectionFailedException: Failed to run getAllDatabases in Hive Metastore: Failed to connect to Hive Metastore",
"..."
]
}
NoSuchCatalogException:
value: {
"code": 1003,
"type": "NoSuchCatalogException",
"message": "Failed to operate catalog(s) [test] operation [LOAD] under metalake [my_test_metalake], reason [NoSuchCatalogException]",
"stack": [
"org.apache.gravitino.exceptions.NoSuchCatalogException: Catalog my_test_metalake.test does not exist",
"..."
]
}