Obtaining an Object List
Scenarios
You can query all objects of an account.
The following describes how to call the API for querying the object list. For details, see Calling APIs.
Calling an API
- Determine the request based on the actual request URI and method.
GET https://Huawei Cloud Astro Zero domain name/u-route/baas/metadata/v1.0/object?flag=S&type=cst,std
Parameter description:
- flag=S: Queries object information. The query result does not contain any other associated information (default).
- flag=D: Queries objects that are not associated with tabs.
- type=cst: Queries custom objects. (If type is not specified, the value cst is the default value.)
- type=std: Queries standard objects.
- type=stp: Queries setup objects.
- type=cst,std: Queries custom and standard objects. Other combinations are similar. Multiple values are separated with a comma (,).
Objects in the list are sorted alphabetically.
- Set the request header.
Table 1 Request header Header Field
Description
Mandatory
Content-Type
Parameter defined in the HTTP protocol, which identifies the format for parsing the returned content. This parameter must be set to application/json, indicating that the browser parses the returned content into a JSON object.
Yes
access-token
When a user login request is authenticated, the backend generates a token, which is contained in the response and saved in the browser. When the user sends a request to Astro Zero, the token will be carried, indicating that the user has been authenticated.
Yes
The message body does not need to be constructed for this API. If the following response is returned, the object list is obtained:
{ "resCode": "0", "resMsg": "Success", "result": [ { "id": "stad00000000000000GH", "keyPrefix": "10gh", "name": "AttachFile", "category": 2, "label": "Attach File", "pluralLabel": "Attach Files", "version": 55834574848, "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": "", "createdDate": "", "lastModifiedBy": "", "lastModifiedDate": "", "description": "", "objectType": 0, "protectMode": 0, "installedPackage": "", "createdBy.name": "", "lastModifiedBy.name": "", "childObjects": null, "parentObjects": [ { "parentObject": "stad00000000000000GD", "cascadeDelete": false }, { "parentObject": "stad00000000000000GG", "cascadeDelete": false }, { "parentObject": "stup000000000000002I", "cascadeDelete": false }, { "parentObject": "stup000000000000003L", "cascadeDelete": false } ] } ] }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot