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

Querying a Custom Object Instance by ID

Function

This API is used to query custom object instances by ID.

URI

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

Table 1 URI parameter

Parameter

Mandatory

Type

Description

object_Id

Yes

String

Explanation

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

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 details about each field in the object instance are returned, including information about the table, tables it depends on, and tables that depend on it.

Example Request

Query an object instance by ID.
GET https://Huawei Cloud Astro Zero domain name/u-route/baas/metadata/v1.0/Object/cust000000aKtFZpERvc

Example Response

{
  "resCode": "0",
  "resMsg": "Success",
  "result": {
    "tableInfo": {
      "id": "cust000000aKtFZpERvc",
      "keyPrefix": "cRvc",
      "name": "test__dfg__CST",
      "category": 3,
      "label": "dfg",
      "pluralLabel": "dfgs",
      "version": 0,
      "contextSetup": 0,
      "trackFieldHistory": false,
      "allowReports": false,
      "allowActivities": false,
      "allowChatter": false,
      "allowStreamingApiAccess": false,
      "allowBulkApiAccess": false,
      "allowSearch": false,
      "allowSharing": false,
      "sharingMode": 0,
      "deploymentStatus": 0,
      "properties": "",
      "status": 0,
      "createdBy": "10gd000000SDyqaQW6uu",
      "createdDate": "2020-05-28 17:01:02",
      "lastModifiedBy": "10gd000000SDyqaQW6uu",
      "lastModifiedDate": "2020-05-28 17:01:02",
      "description": "",
      "objectType": 0,
      "protectMode": 0,
      "installedPackage": "",
      "createdBy.name": "test0xx",
      "lastModifiedBy.name": "test0xx"
    },
    "childObjects": null,
    "parentObjects": [
      {
        "parentObject": "stad00000000000000GD",
        "cascadeDelete": false
      },
      {
        "parentObject": "stad00000000000000GG",
        "cascadeDelete": false
      },
      {
        "parentObject": "stup000000000000002I",
        "cascadeDelete": false
      },
      {
        "parentObject": "stup000000000000003L",
        "cascadeDelete": false
      }
    ]
  }
}   

Status Code

See Status Codes.

Error Code

See Error Codes.