Help Center/ Huawei Cloud Astro Zero/ API Reference/ APIs/ Data Modules/ Deleting Data by Record ID List
Updated on 2025-08-14 GMT+08:00

Deleting Data by Record ID List

Function

This API is used to delete data by record ID list. It is a synchronous API. (Invocation result is returned only after the function execution is complete.)

Before calling this API, you must create an object and data records.

URI

DELETE Huawei Cloud Astro Zero domain name/u-route/baas/data/v1.0/bobject/{objectName}

Table 1 URI parameter

Parameter

Mandatory

Type

Description

objectName

Yes

String

Explanation

Name of the data object to be deleted. For details, see Logging In to the Application Designer. You can access the application designer and choose Data > Object to view data object names.

Constraints

None

Value

1–80 characters

Default value

None

Request Parameters

Table 2 Request parameter

Parameter

Mandatory

Type

Description

records

Yes

Array

Explanation

Record ID list, which can be obtained by calling the API of Querying Data by Condition (id in the response message).

Constraints

A maximum of 100 record IDs are supported.

Response Parameters

Table 3 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.

result

Number

Explanation

Number of deleted records. This parameter is carried when the request is successful.

Value

0–100

Example Request

To delete records whose IDs are cfw0000000aKmGskAsDo and cfw0000000aKmGskAsDp in the TestProject__testForObject__CST object, send the following request:
DELETE https://Huawei Cloud Astro Zero domain name/u-route/baas/data/v1.0/bobject/TestProject__testForObject__CST?records=cfw0000000aKmGskAsDo,cfw0000000aKmGskAsDp

Example Response

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

Status Code

See Status Codes.

Error Code

See Error Codes.