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

Querying All Custom Objects

Function

This API is used to query all custom objects.

URI

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

Request Parameters

None

Response Parameters

Table 1 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, all defined objects under the account are returned and displayed in a list. Each item in the list is an object.

Example Request

To query all object instances, send the following request:
GET https://Huawei Cloud Astro Zero domain name/u-route/baas/metadata/v1.0/Object

Example Response

{
  "resCode": "0",
  "resMsg": "Success",
  "result": [
    {
      "id": "cust000000aKtFZpERvc",
      "keyPrefix": "c02W",
      "name": "SmartCampus__OperatorOrganization__CST",
      "category": 3,
      "label": "OperatorOrganization",
      "pluralLabel": "OperatorOrganizations",
      "version": 7,
      "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-03-12 15:14:56",
      "lastModifiedBy": "10gd000000SDyqaQW6uu",
      "lastModifiedDate": "2020-03-12 15:15:00",
      "description": "",
      "objectType": 0,
      "protectMode": 1,
      "installedPackage": "003L000000YGxJbahwps",
      "createdBy.name": "test0xx",
      "lastModifiedBy.name": "test0xx",
      "childObjects": null,
      "parentObjects": [
        {
          "parentObject": "cust000000PeSg3hYOOG",
          "cascadeDelete": true
        },
        {
          "parentObject": "stad00000000000000GD",
          "cascadeDelete": false
        },
        {
          "parentObject": "stad00000000000000GG",
          "cascadeDelete": false
        },
        {
          "parentObject": "stup000000000000002I",
          "cascadeDelete": false
        },
        {
          "parentObject": "stup000000000000003L",
          "cascadeDelete": false
        }
      ]
},
    {
      "id": "cust000000aKoa6I4E6K",
      "keyPrefix": "cE6K",
      "name": "test__qw__CST",
      "category": 3,
      "label": "qw",
      "pluralLabel": "qws",
      "version": 3,
      "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 15:55:42",
      "lastModifiedBy": "10gd000000SDyqaQW6uu",
      "lastModifiedDate": "2020-05-28 17:47:03",
      "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.