Updated on 2025-08-28 GMT+08:00

Querying Picklist Instances by Condition

Function

This API is used to query Picklist instances that meet specific conditions.

URI

GET Huawei Cloud Astro Zero domain name/u-route/baas/metadata/v1.0/picklist

Request Parameters

Table 1 Request parameters

Parameter

Mandatory

Type

Description

flag

No

String

Explanation

Specifies the method of querying the value set list of a picklist.

Constraints

None

Value

  • flag=A indicates that all Picklist instances are queried, including the global Picklist and field-level Picklist instances.
  • If flag is not passed, a condition-based query will be performed.

Default value

None

project

No

String

Explanation

Name of the project to which the Picklist instance belongs.

Constraints

None

Value

None

Default value

None

type

No

String

Explanation

Type of the project to which the Picklist instance belongs.

Constraints

None

Value

  • app: The project type is application.
  • bo: The project type is BO, that is, a service that encapsulates a complete scenario.

Default value

None

name

No

String

Explanation

Name of the picklist instance.

Constraints

None

Value

None

Default value

None

isGlobal

No

String

Explanation

Whether the picklist instance is a global Picklist.

Constraints

isGlobal=true can be transferred only when project and type are transferred to filter the global picklist related to the application. Otherwise, isGlobal does not take effect.

Value

true

Default value

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.

result

Array

Explanation

If the request is successful, the Picklist instances that meet the conditions are returned.

Example Request

To query Picklist instances by condition, send the following request:
GET https://Huawei Cloud Astro Zero domain name/u-route/baas/metadata/v1.0/Picklist?name=testName&isGlobal=false

Example Response

{
    "resCode": "0",
    "resMsg": "Success",
    "result": [
        {
            "controlField": null,
            "createdBy": "testUserId",
            "createdBy.__objectType": "User",
            "createdBy.name": "test0xx",
            "createdDate": "2019-08-05 20:38:24",
            "custom": true,
            "description": "",
            "id": "testListId",
            "installedPackage": null,
            "isGlobal": true,
            "isRestricted": false,
            "isSorted": false,
            "lastModifiedBy": "testUserId",
            "lastModifiedBy.__objectType": "User",
            "lastModifiedBy.name": "test0xx",
            "lastModifiedDate": "2019-08-05 20:38:24",
            "masterLabel": "testLabel",
            "name": "testName",
            "owner": "testUserId",
            "owner.__objectType": "User",
            "owner.name": "test0xx",
            "protectMode": 0
        }
    ]
}

Status Code

See Status Codes.

Error Code

See Error Codes.