Dereference file¶
Dereference a set of files. All files must belong to the same root volume.
POST $CLOUDSIGMA_API_BASE/catalog/file/delete_ref
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 file ID to be dereferenced.
Set the operation-specific values used in the request:
$FILE_ID: The file ID to be dereferenced.
All files must belong to the same root volume.
Request¶
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/file/delete_ref" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"file_ids": ["'"$FILE_ID"'"]
}'
Request body
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
array[string] |
Yes |
One or more file IDs to dereference. |
|
integer |
No |
The declaration must be consistent with the resolved root volume. |
Successful response¶
Returns 200 on success, data is null. This operation disassociates the file from the volume and does not mean deleting the file itself.
{
"code": "OK",
"msg": "OK",
"data": null
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
Fixed to |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "文件必须属于同一根卷",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
|
Pass in a valid file ID from the same root volume. |
|
|
The current identity does not have write permissions to the root volume. |
Use credentials with write access, or contact your administrator for authorization. |
|
|
A file does not exist. |
Check all file IDs. |
|
|
The destination volume is not writable. |
Select a writable volume. |
|
|
The service cannot disassociate the file. |
Record the request time and error message and try again; if it continues to fail, contact support. |
Follow-up operations¶
After completion, Query Catalog details confirms the result.