Querying the Number of Object Records by Condition
Function
This API is used to query the number of object records by condition.
URI
POST Huawei Cloud Astro Zero domain name/u-route/baas/data/v1.0/count/{objectName}?base=X
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
objectName |
Yes |
String |
Explanation Data object name. For details, see Logging In to the Application Designer. You can access the application designer and choose Data > Object to view data object names. Constraints None Value 1–80 characters Default value None |
base |
No |
String |
Explanation Query parameter, which is used to distinguish the data passed by objectName. Constraints None Value The options are as follows:
Default value None |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
condition |
Yes |
Object |
Explanation Query conditions. If this parameter is left unspecified, all object data is queried. This parameter contains the following elements:
Constraints None |
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 |
Number |
Explanation Number of records. Value None |
Example Request
POST https://Huawei Cloud Astro Zero domain name/u-route/baas/data/v1.0/count/TestProject__testForObject1__CST { "condition": { "conjunction": "AND", "conditions": [ { "field": "NAME", "operator": "eq", "value": "lisi" } ] } }
Example Response
{ "resCode": "0", "resMsg": "Success", "result": 8 }
Status Code
See Status Codes.
Error Code
See Error Codes.
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