Dereference file

Dereferences a set of files in the specified volume.

HTTP
POST $CLOUDSIGMA_API_BASE/catalog/file/delete_ref

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First query the file list to obtain the file ID to be dereferenced. Prepare the personal access token, target workspace ID, and file ID that can access the target workspace. All files must be mounted to the specified volume_id.

Request body

Shell
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"'"]
  }'

All files must be mounted to the volume specified by volume_id.

Field

Type

Required

Description

file_ids

array[string]

Yes

One or more file IDs to dereference.

volume_id

integer

Yes

The volume or folder ID where the association is actually mounted must be a positive integer. The root volume for permission verification cannot replace the mount ID.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": null
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

null

When the disassociation is successful, it is fixed to null.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "文件必须属于同一根卷"
}

Field

Type

Description

code

string

error code.

msg

string

error message.

Last updated on