Skip to main content
Version: 5.7.0

GetPage

Method uses a paging system to iterate through user entities.

After retrieving a page of entities with this method use getPageOffset to retrieve previous or next pages.

See the Generic Paged Queries documentation for creating the context object.

Context example:

{
"pagination": {
"rowsPerPage": 50,
"pageNumber": 1
},
"searchCriteria": {
"entityType": "address"
},
"sortCriteria": {
"createdAt": 1,
"updatedAt": -1
}
}
ServiceOperation
entityGET_PAGE

Usage

http://localhost:3000
string context = "{\"pagination\":{\"rowsPerPage\":50,\"pageNumber\":1},\"searchCriteria\":{\"entityType\":\"address\"},\"sortCriteria\":{\"createdAt\":1,\"updatedAt\":-1}}";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.EntityService.GetPage(context, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"_serverTime": 1637946319239,
"results": {
"moreBefore": false,
"count": 200,
"items": [{
"entityId": "00edfd8e-5028-45d5-95d4-b1869cf2afaa",
"entityType": "testEntity",
"version": 1,
"data": {
"testName": "Test Name 01"
},
"acl": {
"other": 2
},
"createdAt": 1437505537168,
"updatedAt": 1437505537168
}],
"page": 1,
"moreAfter": true
},
"context": "eyJzZWFyY2hDcml0ZXJpYSI6eyJlbnRpdHlUeXBlIjoiYnVpbGRpbmciLCJnYW
1lSWQiOiIxMDI4NyIsIiRvciI6W3sib3duZXJJZCI6Ijk5MjM4ZmFiLTkxYTItNDdiYy1
iMDExLWJjMThhN2IyOWY3NiJ9LHsiYWNsLm90aGVyIjp7IiRuZSI6MH19XX0sInNvcnRD
cml0ZXJpYSI6eyJjcmVhdGVkQXQiOjEsInVwZGF0ZWRBdCI6LTF9LCJwYWdpbmF0aW9uI
jp7InJvd3NQZXJQYWdlIjo1MCwicGFnZU51bWJlciI6NH0sIm9wdGlvbnMiOm51bGx9"
}
}
Common Error Code

Status Codes

CodeNameDescription
40384INVALID_QUERY_CONTEXTInvalid query context

Method Parameters

ParameterDescription
contextThe JSON context for the page request.