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/{catalog}/schemas/{schema}/filesets:
parameters:
- $ref: "./openapi.yaml#/components/parameters/metalake"
- $ref: "./openapi.yaml#/components/parameters/catalog"
- $ref: "./openapi.yaml#/components/parameters/schema"
get:
tags:
- fileset
summary: List filesets
operationId: listFilesets
responses:
"200":
$ref: "./openapi.yaml#/components/responses/EntityListResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequestErrorResponse"
"403":
$ref: "./openapi.yaml#/components/responses/ForbiddenErrorResponse"
"406":
$ref: "./openapi.yaml#/components/responses/NotAcceptableErrorResponse"
"5XX":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
post:
tags:
- fileset
summary: Create fileset
operationId: createFileset
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/FilesetCreateRequest"
examples:
FilesetCreateRequest:
$ref: "#/components/examples/FilesetCreateRequest"
MultipleLocationsFilesetCreateRequest:
$ref: "#/components/examples/MultipleLocationsFilesetCreateRequest"
MixedLocationsFilesetCreateRequest:
$ref: "#/components/examples/MixedLocationsFilesetCreateRequest"
responses:
"200":
$ref: "#/components/responses/FilesetResponse"
"400":
$ref: "#/components/responses/FilesetCreateBadRequestResponse"
"403":
$ref: "./openapi.yaml#/components/responses/ForbiddenErrorResponse"
"406":
$ref: "./openapi.yaml#/components/responses/NotAcceptableErrorResponse"
"409":
description: Conflict - The target fileset already exists
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
FilesetAlreadyExistsErrorResponse:
$ref: "#/components/examples/FilesetAlreadyExistsException"
"5XX":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
/metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/filesets/{fileset}:
parameters:
- $ref: "./openapi.yaml#/components/parameters/metalake"
- $ref: "./openapi.yaml#/components/parameters/catalog"
- $ref: "./openapi.yaml#/components/parameters/schema"
- $ref: "./openapi.yaml#/components/parameters/fileset"
get:
tags:
- fileset
summary: Get fileset
operationId: loadFileset
description: Returns the specified fileset object.
responses:
"200":
$ref: "#/components/responses/FilesetResponse"
"403":
$ref: "./openapi.yaml#/components/responses/ForbiddenErrorResponse"
"404":
description: >-
Not Found - The fileset or its parent resource does not exist. When authorization
is enabled, a missing metalake returns 403 instead.
content:
application/json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
NoSuchMetalakeException:
$ref: "./metalakes.yaml#/components/examples/NoSuchMetalakeException"
NoSuchCatalogException:
$ref: "./catalogs.yaml#/components/examples/NoSuchCatalogException"
NoSuchSchemaException:
$ref: "./schemas.yaml#/components/examples/NoSuchSchemaException"
NoSuchFilesetException:
$ref: "#/components/examples/NoSuchFilesetException"
"406":
$ref: "./openapi.yaml#/components/responses/NotAcceptableErrorResponse"
"5XX":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
put:
tags:
- fileset
summary: Update fileset
operationId: alterFileset
description: Updates the specified fileset in a schema
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/FilesetUpdatesRequest"
responses:
"200":
$ref: "#/components/responses/FilesetResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequestErrorResponse"
"403":
$ref: "./openapi.yaml#/components/responses/ForbiddenErrorResponse"
"404":
description: >-
Not Found - The fileset or its parent resource does not exist. When authorization
is enabled, a missing metalake returns 403 instead.
content:
application/json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
NoSuchMetalakeException:
$ref: "./metalakes.yaml#/components/examples/NoSuchMetalakeException"
NoSuchCatalogException:
$ref: "./catalogs.yaml#/components/examples/NoSuchCatalogException"
NoSuchSchemaException:
$ref: "./schemas.yaml#/components/examples/NoSuchSchemaException"
NoSuchFilesetException:
$ref: "#/components/examples/NoSuchFilesetException"
"406":
$ref: "./openapi.yaml#/components/responses/NotAcceptableErrorResponse"
"409":
description: Conflict - The target fileset already exists
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
FilesetAlreadyExistsErrorResponse:
$ref: "#/components/examples/FilesetAlreadyExistsException"
"5XX":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
delete:
tags:
- fileset
summary: Drop fileset
operationId: dropFileset
responses:
"200":
$ref: "./openapi.yaml#/components/responses/DropResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequestErrorResponse"
"403":
$ref: "./openapi.yaml#/components/responses/ForbiddenErrorResponse"
"406":
$ref: "./openapi.yaml#/components/responses/NotAcceptableErrorResponse"
"5XX":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
/metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/filesets/{fileset}/location:
parameters:
- $ref: "./openapi.yaml#/components/parameters/metalake"
- $ref: "./openapi.yaml#/components/parameters/catalog"
- $ref: "./openapi.yaml#/components/parameters/schema"
- $ref: "./openapi.yaml#/components/parameters/fileset"
get:
tags:
- location
summary: Get file location
operationId: getFileLocation
description: >-
Returns the specified file location object by resolving the storage location and
sub path. This operation remains available when the catalog property
disable-filesystem-ops is true because it does not access the filesystem.
parameters:
- name: sub_path
in: query
required: true
schema:
type: string
description: >-
The sub path to the file or directory within the selected storage location.
Leading and trailing whitespace is trimmed. An empty path or `/` refers to
that location, and a leading slash is relative to it. Complete `..` path
segments and NUL characters (U+0000) are not allowed.
The normalized path must remain within the selected storage location.
- name: location_name
in: query
required: false
schema:
type: string
description: >-
The location name in the fileset. When omitted, the server uses the only storage
location, or properties.default-location-name if there are multiple locations.
An unknown name returns HTTP 404 with NoSuchLocationNameException.
responses:
"200":
$ref: "#/components/responses/FileLocationResponse"
"400":
$ref: "#/components/responses/InvalidSubPathErrorResponse"
"403":
$ref: "./openapi.yaml#/components/responses/ForbiddenErrorResponse"
"404":
description: >-
Not Found - The fileset, its parent resource, or the specified location name
does not exist. When authorization is enabled, a missing metalake returns 403 instead.
content:
application/json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
NoSuchMetalakeException:
$ref: "./metalakes.yaml#/components/examples/NoSuchMetalakeException"
NoSuchCatalogException:
$ref: "./catalogs.yaml#/components/examples/NoSuchCatalogException"
NoSuchSchemaException:
$ref: "./schemas.yaml#/components/examples/NoSuchSchemaException"
NoSuchFilesetException:
$ref: "#/components/examples/NoSuchFilesetException"
NoSuchLocationNameException:
$ref: "#/components/examples/NoSuchLocationNameException"
"406":
$ref: "./openapi.yaml#/components/responses/NotAcceptableErrorResponse"
"5XX":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
/metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/filesets/{fileset}/files:
parameters:
- $ref: "./openapi.yaml#/components/parameters/metalake"
- $ref: "./openapi.yaml#/components/parameters/catalog"
- $ref: "./openapi.yaml#/components/parameters/schema"
- $ref: "./openapi.yaml#/components/parameters/fileset"
get:
tags:
- fileset
summary: List files
operationId: listFilesetFiles
description: >-
Lists metadata of files and directories in a fileset. Returns HTTP 501 when the
catalog property disable-filesystem-ops is true. The getFileLocation operation
remains available in that configuration.
parameters:
- name: sub_path
in: query
required: false
schema:
type: string
default: "/"
description: >-
The sub path within the selected storage location to list files and directories
from. Leading and trailing whitespace is trimmed. An empty path or `/` refers
to that location, and a leading slash is relative to it. Complete `..` path
segments and NUL characters (U+0000) are not allowed.
The normalized path must remain within the selected storage location.
The path must exist; otherwise, this operation returns HTTP 400.
- name: location_name
in: query
required: false
schema:
type: string
description: >-
The location name in the fileset. When omitted, the server uses the only storage
location, or properties.default-location-name if there are multiple locations.
An unknown name returns HTTP 404 with NoSuchLocationNameException.
responses:
"200":
$ref: "#/components/responses/FileInfoListResponse"
"400":
$ref: "#/components/responses/InvalidSubPathErrorResponse"
"403":
$ref: "./openapi.yaml#/components/responses/ForbiddenErrorResponse"
"404":
description: >-
Not Found - The fileset, its parent resource, or the specified location name
does not exist. When authorization is enabled, a missing metalake returns 403 instead.
content:
application/json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
NoSuchMetalakeException:
$ref: "./metalakes.yaml#/components/examples/NoSuchMetalakeException"
NoSuchCatalogException:
$ref: "./catalogs.yaml#/components/examples/NoSuchCatalogException"
NoSuchSchemaException:
$ref: "./schemas.yaml#/components/examples/NoSuchSchemaException"
NoSuchFilesetException:
$ref: "#/components/examples/NoSuchFilesetException"
NoSuchLocationNameException:
$ref: "#/components/examples/NoSuchLocationNameException"
"406":
$ref: "./openapi.yaml#/components/responses/NotAcceptableErrorResponse"
"501":
$ref: "#/components/responses/FilesystemOperationsDisabledErrorResponse"
"5XX":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
components:
schemas:
Fileset:
type: object
required:
- name
properties:
name:
type: string
description: The name of the fileset
type:
type: string
description: The type of the fileset
nullable: true
comment:
type: string
description: The comment of the fileset
nullable: true
storageLocation:
type: string
description: The location of the fileset
nullable: true
properties:
type: object
description: The properties of the fileset
nullable: true
default: {}
additionalProperties:
type: string
FileInfo:
type: object
required:
- name
- isDir
- size
- lastModified
- path
properties:
name:
type: string
description: The name of the file/directory
isDir:
type: boolean
description: Whether this is a directory
size:
type: integer
format: int64
description: The file size in bytes (0 if directory)
lastModified:
type: integer
format: int64
description: The last modification time of the file/directory
path:
type: string
description: The gvfs path of the file/directory
FilesetCreateRequest:
type: object
required:
- name
properties:
name:
type: string
description: The name of the fileset. Can not be empty.
type:
type: string
description: The type of the fileset. The value of type should be EXTERNAL or MANAGED
nullable: true
comment:
type: string
description: The comment of the fileset. Can be empty.
nullable: true
storageLocation:
type: string
description: >-
When non-null, this field sets the reserved "unknown" location and takes precedence
over storageLocations["unknown"]. All other named locations are retained. A managed
fileset may inherit all its locations. An external fileset must supply at least one
location through storageLocation or storageLocations.
nullable: true
storageLocations:
type: object
description: >-
Locations are resolved by name. Request locations override schema locations, which
override catalog locations with the same name. Omitted names are inherited. When
there is more than one resolved name, properties must include default-location-name
with a value matching one of those names.
nullable: true
default: { }
additionalProperties:
type: string
properties:
type: object
description: >-
The properties of the fileset. When the resulting fileset has multiple storage locations,
default-location-name is required and must match one of the resolved location keys;
otherwise creation returns HTTP 400. Managed filesets may inherit locations from the
schema or catalog even when storageLocations is omitted.
nullable: true
default: {}
properties:
default-location-name:
type: string
description: >-
The default storage location key. Required when there is more than one resolved
storage location. For a single location, the server fills in that location's key when
this property is omitted; an explicit value must match that key.
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"
FilesetUpdatesRequest:
type: object
required:
- updates
properties:
updates:
type: array
items:
$ref: "#/components/schemas/FilesetUpdateRequest"
FilesetUpdateRequest:
oneOf:
- $ref: "#/components/schemas/RenameFilesetRequest"
- $ref: "#/components/schemas/SetFilesetPropertyRequest"
- $ref: "#/components/schemas/UpdateFilesetCommentRequest"
- $ref: "#/components/schemas/RemoveFilesetCommentRequest"
- $ref: "#/components/schemas/UpdateFilesetTypeRequest"
- $ref: "#/components/schemas/RemoveFilesetPropertyRequest"
- $ref: "#/components/schemas/SetFilesetSecretBindingRequest"
- $ref: "#/components/schemas/SetFilesetSecretReferenceRequest"
discriminator:
propertyName: "@type"
mapping:
rename: "#/components/schemas/RenameFilesetRequest"
setProperty: "#/components/schemas/SetFilesetPropertyRequest"
updateComment: "#/components/schemas/UpdateFilesetCommentRequest"
removeComment: "#/components/schemas/RemoveFilesetCommentRequest"
updateType: "#/components/schemas/UpdateFilesetTypeRequest"
removeProperty: "#/components/schemas/RemoveFilesetPropertyRequest"
setSecretBinding: "#/components/schemas/SetFilesetSecretBindingRequest"
setSecretReference: "#/components/schemas/SetFilesetSecretReferenceRequest"
RenameFilesetRequest:
type: object
required:
- "@type"
- newName
properties:
"@type":
type: string
description: The type of the update
enum:
- rename
newName:
type: string
description: The new name of the fileset
example: {
"@type": "rename",
"newName": "newName"
}
SetFilesetPropertyRequest:
type: object
required:
- "@type"
- property
- value
properties:
"@type":
type: string
description: The type of the update
enum:
- setProperty
property:
type: string
description: The name of the property to set
value:
type: string
description: >
The value of the property to set. If the property holds a write-through secret URN of
this fileset, 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": "key",
"value": "value"
}
UpdateFilesetCommentRequest:
type: object
required:
- "@type"
- newComment
properties:
"@type":
type: string
description: The type of the update
enum:
- updateComment
newComment:
type: string
description: The new comment of the fileset
example: {
"@type": "updateComment",
"newComment": "new comment"
}
UpdateFilesetTypeRequest:
type: object
description: >-
Changes the fileset type without changing its identity, storage locations, or files.
Changing to external retains data on drop. Changing to managed accepts management
of the data, including deleting it on drop. Setting the current type is allowed.
required:
- "@type"
- newType
properties:
"@type":
type: string
description: The type of the update
enum:
- updateType
newType:
type: string
description: The new type of the fileset
enum:
- managed
- external
example: {
"@type": "updateType",
"newType": "external"
}
RemoveFilesetPropertyRequest:
type: object
required:
- "@type"
- property
properties:
"@type":
type: string
description: The type of the update
enum:
- removeProperty
property:
type: string
description: The property to remove
example: {
"@type": "removeProperty",
"property": "key1"
}
SetFilesetSecretBindingRequest:
type: object
required:
- "@type"
- property
- provider
- plaintext
properties:
"@type":
type: string
description: The type of the update
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"
}
SetFilesetSecretReferenceRequest:
type: object
required:
- "@type"
- property
- provider
properties:
"@type":
type: string
description: The type of the update
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"
}
}
RemoveFilesetCommentRequest:
type: object
required:
- "@type"
properties:
"@type":
type: string
description: The type of the update
enum:
- removeComment
example: {
"@type": "removeComment"
}
responses:
FilesetCreateBadRequestResponse:
description: >-
Bad Request - The fileset creation request is invalid. For multiple storage
locations, properties.default-location-name must name one of the location keys.
content:
application/json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
example:
code: 1001
type: IllegalArgumentException
message: >-
The fileset property default-location-name must be set and must be one of
the fileset locations, location names: [primary, secondary], default location name: null
FilesystemOperationsDisabledErrorResponse:
description: Not Implemented - Filesystem operations are disabled by the catalog property disable-filesystem-ops
content:
application/json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
example:
code: 1006
type: UnsupportedOperationException
message: Filesystem operations are disabled on this server
InvalidSubPathErrorResponse:
description: >-
The sub path does not satisfy the fileset path requirements.
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
example:
code: 1001
type: IllegalArgumentException
message: subPath must not contain parent directory segments
FilesetResponse:
description: The response of fileset object
content:
application/vnd.gravitino.v1+json:
schema:
type: object
properties:
code:
type: integer
format: int32
description: Status code of the response
enum:
- 0
fileset:
$ref: "#/components/schemas/Fileset"
examples:
FilesetResponse:
$ref: "#/components/examples/FilesetResponse"
FileInfoListResponse:
description: The response containing a list of file/directory metadata
content:
application/vnd.gravitino.v1+json:
schema:
type: object
properties:
code:
type: integer
format: int32
description: Status code of the response
enum: [0]
files:
type: array
items:
$ref: "#/components/schemas/FileInfo"
examples:
FileInfoListResponse:
$ref: "#/components/examples/FileInfoListResponse"
FileLocationResponse:
description: The response of the file location object
content:
application/vnd.gravitino.v1+json:
schema:
type: object
properties:
code:
type: integer
format: int32
description: Status code of the response
enum:
- 0
fileLocation:
type: string
description: The actual file location
examples:
FileLocationResponse:
$ref: "#/components/examples/FileLocationResponse"
examples:
FilesetCreateRequest:
value: {
"name": "fileset1",
"type": "managed",
"comment": "This is a comment",
"storageLocation": "s3://bucket/path",
"properties": {
"key1": "value1",
"key2": "value2"
}
}
MultipleLocationsFilesetCreateRequest:
value:
name: fileset1
type: EXTERNAL
comment: A fileset with two storage locations
storageLocations:
primary: s3://bucket/path
secondary: s3://other-bucket/path
properties:
default-location-name: primary
MixedLocationsFilesetCreateRequest:
summary: Use both location fields and select a named default
value:
name: raw_events
type: MANAGED
storageLocation: s3a://example-bucket/imports/raw_events
storageLocations:
unknown: s3a://example-bucket/staging/raw_events
us: s3a://example-us/landing/raw_events
properties:
default-location-name: us
FilesetResponse:
value: {
"code": 0,
"fileset" : {
"name": "fileset1",
"type": "managed",
"comment": "This is a comment",
"storageLocation": "hdfs://host/user/s_fileset/schema/fileset1",
"properties": {
"key1": "value1",
"key2": "value2"
}
}
}
FileInfoListResponse:
value: {
"code": 0,
"files": [
{
"name": "file.txt",
"isDir": false,
"size": 5,
"lastModified": 1748875070123,
"path": "/fileset/catalog1/schema1/fileset1/file.txt"
},
{
"name": "sub_dir",
"isDir": true,
"size": 0,
"lastModified": 1748875070124,
"path": "/fileset/catalog1/schema1/fileset1/sub_dir"
}
]
}
FileLocationResponse:
value: {
"code": 0,
"fileLocation": "hdfs://host/user/fileset/schema/fileset1/test.parquet"
}
FilesetAlreadyExistsException:
value: {
"code": 1004,
"type": "FilesetAlreadyExistsException",
"message": "Fileset already exists",
"stack": [
"java.lang.FilesetAlreadyExistsException: Fileset already exists"
]
}
NoSuchFilesetException:
value: {
"code": 1003,
"type": "NoSuchFilesetException",
"message": "Fileset does not exist",
"stack": [
"java.lang.NoSuchFilesetException: Fileset does not exist"
]
}
NoSuchLocationNameException:
value:
code: 1003
type: NoSuchLocationNameException
message: Location name missing does not exist in fileset fileset1