Querying Data by Record ID List
Function
This API is used to query data by record ID list. It is a synchronous API. (Invocation result is returned only after the function execution is complete.)
Before calling this API, you must create an object and data records.
URI
GET Huawei Cloud Astro Zero domain name/u-route/baas/data/v1.0/bobject/{objectName}?fields={f1,f2}&records={id1,id2}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
objectName |
Yes |
String |
Explanation Object name. For details, see Logging In to the Application Designer. You can access the application designer and choose Data > Object to view object names. Constraints None Value 1–80 characters Default value None |
records |
Yes |
Array |
Explanation Record ID list. This parameter must contain at least one record ID. {id1,id2} can be queried by calling the API of Querying Data by Condition (id in the response message). Constraints None |
fields |
No |
Array |
Explanation Fields in the object. Multiple fields are separated by commas (,). If this parameter is specified, only the specified fields and necessary information (for example, data record owner and the owner ID) are returned. If this parameter is left unspecified, the entire data record is returned. Constraints None |
Request Parameters
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 |
Array |
Explanation An array of the queried records. |
Example Request
GET https://Huawei Cloud Astro Zero domain name/u-route/baas/data/v1.0/bobject/TestProject__testForObject__CST?records=cfw0000000aKin6AQgfQ,cfw0000000aKlMSFn7vk
Example Response
{ "resCode": "0", "resMsg": "Success", "result": [ { "TestProject__address__CST": null, "createdBy": "10gd000000SDzgxNSckK", "createdBy.__objectType": "User", "createdBy.name": "test", "createdDate": "2020-05-28 14:34:40", "currencyIsoCode": "", "id": "cfw0000000aKin6AQgfQ", "installedPackage": null, "lastModifiedBy": "10gd000000SDzgxNSckK", "lastModifiedBy.__objectType": "User", "lastModifiedBy.name": "test", "lastModifiedDate": "2020-05-28 15:03:15", "name": "newName", "owner": "10gd000000SDzgxNSckK", "owner.__objectType": "User", "owner.name": "test" }, { "TestProject__address__CST": null, "createdBy": "10gd000000SDzgxNSckK", "createdBy.__objectType": "User", "createdBy.name": "test", "createdDate": "2020-05-28 15:10:38", "currencyIsoCode": "", "id": "cfw0000000aKlMSFn7vk", "installedPackage": null, "lastModifiedBy": "10gd000000SDzgxNSckK", "lastModifiedBy.__objectType": "User", "lastModifiedBy.name": "test", "lastModifiedDate": "2020-05-28 15:10:38", "name": "test2", "owner": "10gd000000SDzgxNSckK", "owner.__objectType": "User", "owner.name": "test" } ] }
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