Query the full path of the volume¶
Gets the full path of the volume in the catalog hierarchy.
POST https://moi.matrixorigin.cn/newmoi/catalog/volume/full_path
Preparation before calling¶
First query the object in the database to obtain the target volume ID. Prepare the personal access token, target workspace ID, and volume ID that have access to the target workspace.
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: Target workspace ID, passed throughX-Workspace-IDHeader.$VOLUME_ID: The volume ID of the path to be queried.
Request example¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/catalog/volume/full_path" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"id": '"$VOLUME_ID"'
}'
Request body¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
Volume ID. |
Successful response¶
On success, returns 200 and the hierarchical path to the volume.
{
"code": "OK",
"msg": "OK",
"data": {
"path": "sales/catalog_a/db_a/sales_files"
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
string |
The full path of the volume in the Catalog hierarchy. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "id 无效",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
|
Pass in a valid volume ID. |
|
|
The current identity does not have read permission for the volume. |
Use credentials with read access, or contact your administrator for authorization. |
|
|
The service cannot resolve the volume path. |
Record the request time and error message and try again; if it continues to fail, contact support. |
Follow-up operations¶
When modifications are needed Update database. When returning the list Query file products.