Updated on 2025-05-13 GMT+08:00

Deleting a Directory

Function

Delete a directory from the storage. All files within it will be deleted along with the directory.

URI

DELETE Huawei Cloud Astro Zero domain name/u-route/baas/sys/v1.1/connectors/{connector_type}/{connector_name}/deldir?dir=path

Table 1 URI parameters

Parameter

Mandatory

Type

Description

connector_type

Yes

String

Explanation

Type of a connector.

Constraints

None

Value

  • obs: connector for interconnecting with OBS.
  • minio: connector for connecting to MINIO.
  • objectstorageproxy: object storage proxy type.

Default value

None

connector_name

Yes

String

Explanation

Name of the connector instance, that is, the connector instance name set when the connector is created.

Constraints

None

Value

None

Default value

None

dir

Yes

String

Explanation

Directory to be deleted. If the directory is empty or /, the root directory is deleted.

Constraints

None

Value

None

Default value

None

Request Parameters

None

Response Parameters

Table 2 Response parameters

Parameter

Type

Description

resCode

String

Explanation

Return code.

Value

If the request is successful, 0 is returned. For details about other error codes, see Error Codes.

resMsg

String

Explanation

Message returned.

Value

If the request is successful, "Success" is returned. In other cases, an error message is returned.

Example Request

An OBS connector has been created. The connector instance name is Namespace __TestOBS. The a/b directory exists in the OBS bucket. Run the following command to delete the directory:

DELETE https://Huawei Cloud Astro Zero domain name/u-route/baas/sys/v1.1/connectors/obs/Namespace __TestOBS/deldir?dir=a/b

Example Response

{
 "resCode": "0",
	"resMsg": "Success"
}

Status Code

See Status Codes.

Error Code

See Error Codes.