Query table full path

The full path of the query table in the catalog hierarchy.

POST https://moi.matrixorigin.cn/newmoi/catalog/table/full_path

Preparation before calling

First query the object in the database to obtain the table ID. Prepare the personal access token, target workspace ID, and table ID that have access to the target workspace.

The example below uses:

  • $AI_STUDIO_API_KEY: The actual personal access token, passed through the X-API-Key Header.

  • $WORKSPACE_ID: Target workspace ID, passed through X-Workspace-ID Header.

  • $TABLE_ID: The table ID to be queried.

Request example

curl -X POST "https://moi.matrixorigin.cn/newmoi/catalog/table/full_path" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "id": '"$TABLE_ID"'
  }'

Request body

Parameter

Type

Required

Description

id

integer

Yes

Table ID.

Successful response

Returns 200 and the full path on success.

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "path": "catalog-a/database-a/orders"
  }
}

The response fields are as follows.

Field

Type

Description

data.path

string

The full path to the table in the Catalog hierarchy.

Error response

{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效",
  "data": null
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

400

ErrParamInvalid

The table ID is invalid.

Use a valid table ID.

403

ErrForbidden

The current identity does not have permission to read the table.

Use credentials with read permissions.

500

ErrServer

The server failed to resolve the table path.

Try again later.

Last updated on