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
globalEntityGET_PAGE

Method Parameters

ParameterDescription
contextThe json context for the page request.

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.GlobalEntityService.GetPage(context, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"_serverTime": 1637946319239,
"results": {
"moreBefore": false,
"count": 200,
"items": [{
"gameId": "123456",
"entityId": "14281c38-abf6-4ca2-8436-b2bdwas8d5a9a",
"ownerId": "784cc6c6-4569-4d75-bd10-62dwa8ae0218",
"entityType": "test",
"entityIndexedId": "indexTest",
"version": 1,
"data": {
"testData": 1234
},
"acl": {
"other": 1
},
"expiresAt": 1449861422588,
"timeToLive": 0,
"createdAt": 1449861388021,
"updatedAt": 1449861388021
}],
"page": 1,
"moreAfter": true
},
"context": "eyJzZWFyY2hDcml0ZXJpYSI6eyJlbnRpdHlUeXBlIjoiYnVpbGRpbmciLCJnY"
}
}