Skip to main content
Version: 5.7.0

GetPageOffset

Method to retrieve previous or next pages after having called the GetPage method.

ServiceOperation
entityGET_PAGE_BY_OFFSET

Usage

http://localhost:3000
string context = "eyJzZWFyY2hDcml0ZXJpYSI6eyJlbnRpdHlUeXBlIjp7IiRyZWdleCI6Ii4qaWxkLioiLCIkb3B0";
int pageOffset = 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.GetPageOffset(context, pageOffset, 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": 2,
"moreAfter": false
},
"context": "eyJzZWFyY2hDcml0ZXJpYSI6eyJlbnRpdHlUeXBlIjoiYnVpbGRpbmciLCJnYW
1lSWQiOiIxMDI4NyIsIiRvciI6W3sib3duZXJJZCI6Ijk5MjM4ZmFiLTkxYTItNDdiYy1
iMDExLWJjMThhN2IyOWY3NiJ9LHsiYWNsLm90aGVyIjp7IiRuZSI6MH19XX0sInNvcnRD
cml0ZXJpYSI6eyJjcmVhdGVkQXQiOjEsInVwZGF0ZWRBdCI6LTF9LCJwYWdpbmF0aW9uI
jp7InJvd3NQZXJQYWdlIjo1MCwicGFnZU51bWJlciI6NH0sIm9wdGlvbnMiOm51bGx9"
}
}
Common Error Code

Status Codes

CodeNameDescription
40383DECODE_CONTEXTUnable to decode context

Method Parameters

ParameterDescription
contextThe context string returned from the server from a previous call to GetPage or GetPageOffset
pageOffsetThe positive or negative page offset to fetch. Uses the last page retrieved using the context string to determine a starting point.