Help Center/ Huawei Cloud Astro Zero/ API Reference/ APIs/ Metadata/ Operations on Picklist Instances/ Deleting a Picklist Instance or the Value of a Picklist Instance
Updated on 2025-05-13 GMT+08:00

Deleting a Picklist Instance or the Value of a Picklist Instance

Function

This API is used to delete a Picklist instance or the value of a Picklist instance.

  • To delete a Picklist instance (the request does not carry the value parameter), ensure that the instance is not referenced by any object.
  • To delete a value of a Picklist instance (the request carries the value parameter), ensure that the value to delete is not the last activated value of the instance.

URI

DELETE Huawei Cloud Astro Zero domain name/u-route/baas/metadata/v1.0/Picklist/{Picklist_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

Picklist _id

Yes

String

Explanation

Picklist instance ID, which can be queried by invoking the API of Querying Picklist Instances by Condition (id in the response message).

Constraints

None

Value

None

Default value

None

Request Parameters

Table 2 Request parameter

Parameter

Mandatory

Type

Description

value

No

String

Explanation

ID of the value to delete. This parameter is used only when you want to delete a specific value.

Constraints

None

Value

None

Default value

None

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

string

Explanation

If the request is successful, 1 is returned.

Value

None

Example Request

To delete a Picklist instance, send the following request:
DELETE https://Huawei Cloud Astro Zero domain name/u-route/baas/metadata/v1.0/Picklist/000y000000aM92DCu6hU

Example Response

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

Status Code

See Status Codes.

Error Code

See Error Codes.