The Apache® Gravitino Lance REST Catalog (hereinafter referred to as "Lance REST service") provides a set of HTTP APIs compatible with the Lance Namespace REST specification for managing the metadata of namespaces and tables.
Apache Gravitino, the names of other Apache projects, and the ASF logo are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries.
Typical scenarios include:
tip
This feature is currently in the allowlist phase and is only supported in North China 2 (Beijing) and East China 2 (Shanghai) regions. To use this feature, please submit a ticket to apply. After activation, you will receive the service access endpoint (Endpoint). With the Volcano Engine access key (AK/SK), you can configure and use it in the compute engine.
The REST root path of the service always includes /lance, and the API path starts with /lance/v1:
https://{endpoint}/lance/lance/v1/...Lance REST uses the string id in the path to represent a namespace or table, with the default delimiter $:
namespaceId:
{catalog}{catalog}${schema}tableId:{catalog}${schema}${table}The delimiter can be passed in via the query parameter delimiter (default is $).
Characters such as $, @, and # in the URL path must be percent-encoded:
$ → %24@ → %40# → %23For example: demo_catalog$demo_schema should be processed as: demo_catalog%24demo_schema
tip
catalog$schema$table.You need to obtain:
cn-beijing, cn-shanghai)In the Volcano Engine managed environment, the Lance REST service uses the Volcano Engine standard AK/SK signature authentication mechanism. Requests typically need to include:
Authorization: HMAC-SHA256 ...X-Date: YYYYMMDD'T'HHMMSS'Z'X-Expire: -1 | 0 | N (controls signature validity period)Region: {region}For details on the signature algorithm and implementation, please refer to the official documentation: https://www.volcengine.com/docs/6369/67269
Environment variables (example)
export LANCE_HOST='https://{endpoint}' export LANCE_BASE="${LANCE_HOST}/lance" export REGION='cn-beijing'
Common headers (recommended for production)
Header | Required | Example | Description |
|---|---|---|---|
| Yes |
| Service Region |
| Yes |
| Volcano Engine signature timestamp (UTC) |
| Yes |
| Volcano Engine AK/SK signature |
| Depends on the API |
| Required for JSON APIs; Arrow table creation requires |
Common query parameters
Parameter | Required | Default value | Description |
|---|---|---|---|
| No |
| Delimiter for multi-level namespace/table ID |
| No | (empty) | Pagination token |
| No | (empty) | Number of items per page |
Error response (example)
On failure, an error structure in application/json format is usually returned (field names are subject to actual response):
{ "code": 404, "error": "Table not found", "type": "NoSuchTableException", "instance": "demo_catalog$demo_schema$demo_table", "detail": "..." }
GET/lance/v1/namespace/{id}/listInput parameters
Location | Parameter | Required | Example | Description |
|---|---|---|---|---|
path |
| Yes |
| Parent namespace ID; commonly, |
query |
| No |
| Delimiter |
query |
| No |
| Pagination token |
query |
| No |
| Number of items per page |
Request example
curl --location "${LANCE_BASE}/v1/namespace/root/list" \ --header "Region: ${REGION}" \ --header "X-Date: {ts}" \ --header "Authorization: {auth}"
Response example (200)
{ "namespaces": ["demo_catalog", "demo_catalog2"], "page_token": null }
POST/lance/v1/namespace/{id}/createInput parameters
Location | Parameter | Required | Example | Description |
|---|---|---|---|---|
path |
| Yes |
| Namespace ID; secondary namespaces must be URL-encoded ( |
query |
| No |
| Delimiter |
body |
| No |
| `create | |
body |
| No |
| Pass-through properties |
Request example: Create a level 1 namespace (catalog)
curl --location --request POST "${LANCE_BASE}/v1/namespace/demo_catalog/create" \ --header "Region: ${REGION}" \ --header "X-Date: {ts}" \ --header "Authorization: {auth}" \ --header 'Content-Type: application/json' \ --data '{ "mode": "create", "properties": { "comment": "created-by-demo" } }'
Request example: Create a level 2 namespace (schema)
curl --location --request POST "${LANCE_BASE}/v1/namespace/demo_catalog%24demo_schema/create" \ --header "Region: ${REGION}" \ --header "X-Date: {ts}" \ --header "Authorization: {auth}" \ --header 'Content-Type: application/json' \ --data '{ "mode": "create", "properties": { "location": "tos://{bucket}/{prefix}/" } }'
Response example (200)
{ "properties": { "key": "value" } }
POST/lance/v1/namespace/{id}/describeInput parameters
Location | Parameter | Required | Example | Description |
|---|---|---|---|---|
path |
| Yes |
| Namespace ID |
query |
| No |
| Delimiter |
Request example
curl --location --request POST "${LANCE_BASE}/v1/namespace/demo_catalog%24demo_schema/describe" \ --header "Region: ${REGION}" \ --header "X-Date: {ts}" \ --header "Authorization: {auth}" \ --header 'Content-Type: application/json' \ --data '{}'
Response example (200)
{ "properties": { "location": "tos://{bucket}/{prefix}/" } }
POST/lance/v1/namespace/{id}/existsInput parameters
Location | Parameter | Required | Example | Description |
|---|---|---|---|---|
path |
| Yes |
| Namespace ID |
query |
| No |
| Delimiter |
Response
200 OK (usually no response body)404 Not Found (returns error structure)POST/lance/v1/namespace/{id}/dropCaution: Deleting a namespace is typically recursive and irreversible. It is recommended to verify in a test environment first.
Input parameters
Location | Parameter | Required | Example | Description |
|---|---|---|---|---|
path |
| Yes |
| Namespace ID |
query |
| No |
| Delimiter |
body |
| No |
| If not specified, defaults to |
body |
| No |
| If not specified, defaults to |
Request example
curl --location --request POST "${LANCE_BASE}/v1/namespace/demo_catalog%24demo_schema/drop" \ --header "Region: ${REGION}" \ --header "X-Date: {ts}" \ --header "Authorization: {auth}" \ --header 'Content-Type: application/json' \ --data '{"mode":"FAIL","behavior":"RESTRICT"}'
Response example (200)
{}
GET/lance/v1/namespace/{id}/table/listInput parameters
Location | Parameter | Required | Example | Description |
|---|---|---|---|---|
path |
| Yes |
| Secondary namespace (catalog + schema) |
query |
| No |
| Delimiter |
query |
| No |
| Pagination token |
query |
| No |
| Number of items per page |
Request example
curl --location "${LANCE_BASE}/v1/namespace/demo_catalog%24demo_schema/table/list" \ --header "Region: ${REGION}" \ --header "X-Date: {ts}" \ --header "Authorization: {auth}"
Response example (200)
{ "tables": ["demo_catalog$demo_schema$demo_table"], "page_token": null }
POST/lance/v1/table/{id}/create-emptyInput parameters
Location | Parameter | Required | Example | Description |
|---|---|---|---|---|
path |
| Yes |
| Table ID |
query |
| No |
| Delimiter |
body |
| Yes |
| Table data directory |
body |
| No |
| Pass-through properties |
Request example
curl --location --request POST "${LANCE_BASE}/v1/table/demo_catalog%24demo_schema%24demo_table0/create-empty" \ --header "Region: ${REGION}" \ --header "X-Date: {ts}" \ --header "Authorization: {auth}" \ --header 'Content-Type: application/json' \ --data '{ "location": "tos://{bucket}/{prefix}/demo_table0.lance", "properties": {"k": "v"} }'
Response example (200)
{ "location": "tos://{bucket}/{prefix}/demo_table0.lance", "properties": {"key": "value"} }
POST/lance/v1/table/{id}/registerInput parameters
Location | Parameter | Required | Example | Description |
|---|---|---|---|---|
path |
| Yes |
| Table ID |
query |
| No |
| Delimiter |
body |
| Yes |
| Table data directory |
body |
| No |
| Commonly used: |
body |
| No |
| Pass-through properties; the server will supplement |
Request example
curl --location --request POST "${LANCE_BASE}/v1/table/demo_catalog%24demo_schema%24demo_table/register" \ --header "Region: ${REGION}" \ --header "X-Date: {ts}" \ --header "Authorization: {auth}" \ --header 'Content-Type: application/json' \ --data '{ "location": "tos://{bucket}/{prefix}/demo_table.lance", "mode": "CREATE", "properties": { "desc": "demo", "lance.hms.write-schema": true } }'
Response example (200)
{ "location": "tos://{bucket}/{prefix}/demo_table.lance", "properties": { "location": "tos://{bucket}/{prefix}/demo_table.lance", "lance.register": "true", "desc": "demo" } }
POST/lance/v1/table/{id}/deregisterInput parameters
Location | Parameter | Required | Example | Description |
|---|---|---|---|---|
path |
| Yes |
| Table ID |
query |
| No |
| Delimiter |
Request example
curl --location --request POST "${LANCE_BASE}/v1/table/demo_catalog%24demo_schema%24demo_table/deregister" \ --header "Region: ${REGION}" \ --header "X-Date: {ts}" \ --header "Authorization: {auth}" \ --header 'Content-Type: application/json' \ --data '{}'
Response example (200)
{ "location": "tos://{bucket}/{prefix}/demo_table.lance", "properties": {"key": "value"} }
POST/lance/v1/table/{id}/existsInput parameters
Location | Parameter | Required | Example | Description |
|---|---|---|---|---|
path |
| Yes |
| Table ID |
query |
| No |
| Delimiter |
Response
200 OK (usually no response body)404 Not Found (returns error structure)POST/lance/v1/table/{id}/describeInput parameters
Location | Parameter | Required | Example | Description |
|---|---|---|---|---|
path |
| Yes |
| Table ID |
query |
| No |
| Delimiter |
body |
| No |
| If not specified/ |
Request example
curl --location --request POST "${LANCE_BASE}/v1/table/demo_catalog%24demo_schema%24demo_table/describe" \ --header "Region: ${REGION}" \ --header "X-Date: {ts}" \ --header "Authorization: {auth}" \ --header 'Content-Type: application/json' \ --data '{}'
Response example (200)
{ "location": "tos://{bucket}/{prefix}/demo_table.lance", "properties": {"key": "value"} }
POST/lance/v1/table/{id}/dropCaution: This operation may delete both metadata and underlying data files. Please make sure to confirm the scope of impact. LAS Catalog does not delete actual data by default.
Input parameters
Location | Parameter | Required | Example | Description |
|---|---|---|---|---|
path |
| Yes |
| Table ID |
query |
| No |
| Delimiter |
Request example
curl --location --request POST "${LANCE_BASE}/v1/table/demo_catalog%24demo_schema%24demo_table/drop" \ --header "Region: ${REGION}" \ --header "X-Date: {ts}" \ --header "Authorization: {auth}"
Response example (200)
{ "id": ["demo_catalog", "demo_schema", "demo_table"], "location": "tos://{bucket}/{prefix}/demo_table.lance", "properties": {"key": "value"} }
Authorization/X-Date is correctly generated according to the Volcano Engine signature algorithmRegion matches the server Regionhost in the signature matches the actual request host{id} is correctly concatenated and URL encoded (especially $, @, #)/gravitino-lance is needed)