Query folder references

Returns the current results of the folder reference query.

HTTP
POST $CLOUDSIGMA_API_BASE/catalog/folder/ref_list

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

First query the file list to obtain the target folder ID.

Set the operation-specific values used in the request:

  • $FOLDER_ID: The referenced folder ID is to be queried.

The caller needs read permissions on the root volume.

Request

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/folder/ref_list" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d '{
    "id": '"$FOLDER_ID"'
  }'

Request body

Parameter

Type

Required

Description

id

integer

Yes

Folder ID.

Successful response

Returns 200 on success. The current implementation returns an empty array, and this result cannot be used to confirm that the folder has no references.

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "list": []
  }
}

The response fields are as follows.

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.list

array

It is currently fixed to an empty array and cannot be used to determine whether a reference exists.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "id 无效",
  "data": null
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

400

ErrParamInvalid

id is missing or the requested format is invalid.

Pass in a valid folder ID.

403

ErrForbidden

The current identity does not have read permissions on the root volume.

Use credentials with read access, or contact your administrator for authorization.

500

ErrServer

The service cannot read the reference information.

Record the request time and error message and try again; if it continues to fail, contact support.

Follow-up operations

When you need to delete a folder, use the folder ID to call Delete folder and process the result according to its response.

Last updated on