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

Deleting a File

Function

Delete useless files from the storage.

URI

DELETE Huawei Cloud Astro Zero domain name/u-route/baas/sys/v1.1/connectors/{connector_type}/{connector_name}/delobject?object=X

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

object

Yes

String

Explanation

Full path of the file in the bucket, including the file name.

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 1.txt file exists in the a/b/c directory of the OBS bucket. Run the following request to delete the file:

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

Example Response

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

Status Code

See Status Codes.

Error Code

See Error Codes.