Updated on 2024-11-13 GMT+08:00

Deleting a Directory

Function

This API is used to delete a directory.

Constraints

This API is only supported for file systems created after June 1, 2023.

Deleting a directory from a file system is a risky operation. Once deleted, the directory cannot be recovered. Ensure that the directory you specify is the one you want to delete.

URI

DELETE /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/dir

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

share_id

Yes

String

File system ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Account token

Content-Type

Yes

String

MIME type

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

path

Yes

String

Valid full path of an existing directory

Response Parameters

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

errCode

String

Error code

errMsg

String

Error description

Status code: 500

Table 5 Response body parameters

Parameter

Type

Description

errCode

String

Error code

errMsg

String

Error description

Example Requests

Deleting the /test directory

{
  "path" : "/test"
}

Example Responses

Status code: 500

Error response

{
  "errCode" : "SFS.TURBO.0005",
  "errMsg" : "Internal server error"
}

Status Codes

Status Code

Description

202

Deletion request accepted

400

Error response

500

Error response

Error Codes

See Error Codes.