---
orphan: true
---

# Query table full path

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

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

## Preparation before calling

First [query the object](list-database-objects.md) 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

```bash
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.

```json
{
  "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

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

### Common HTTP errors

```{list-table}
:header-rows: 1
:widths: 12 22 32 34

* - 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.
```
