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

Querying a Button by button_id

Function

This API is used to query a button by button_id.

URI

GET Huawei Cloud Astro Zero domain name/u-route/baas/metadata/v1.0/object/{object_id}/{button_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

object_Id

Yes

String

Explanation

Custom object instance ID, which can be queried by calling the API of Querying All Custom Objects (id in the response message).

Constraints

None

Value

None

Default value

None

button_id

Yes

String

Explanation

Button ID, which can be queried by calling the API of 5.2.3.11 Querying a Button By object_id (id in the response message).

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.

result

Object

Explanation

If the request is successful, the detailed information about the button is returned.

Example Request

Query the button based on the object ID and button ID.
GET https://Huawei Cloud Astro Zero domain name/u-route/baas/metadata/v1.0/Object/cust000001Dgez2L19N2/Button/000q000001DobvdqMuVk

Example Response

{
  "resCode": "0",
  "resMsg": "Success",
  "result": {
        "actionId": "",
        "actionScript": "",
        "belongTo": "",
        "createdBy": "10gd000001DHHEwmE1NQ",
        "createdBy.name": "test00xx",
        "createdDate": "2024-06-11 11:17:13",
        "custom": true,
        "description": "",
        "id": "000q000001DobvdqMuVk",
        "isBaseline": false,
        "label": "testLabel",
        "lastModifiedBy": "10gd000001DHHEwmE1NQ",
        "lastModifiedBy.name": "test00xx",
        "lastModifiedDate": "2024-06-11 11:17:13",
        "name": "TestNameForButton",
        "objectId": "cust000001Dgez2L19N2",
        "owner": "10gd000001DHHEwmE1NQ",
        "owner.name": "test00xx",
        "properties": "",
        "protectMode": 0,
        "source": "",
        "type": "Button",
        "visibility": 0
    }
}   

Status Code

See Status Codes.

Error Code

See Error Codes.