Skip to main content
Version: 5.7.0

GetEntityPageOffset

Gets the page of custom entities from the server based on the encoded context and specified page offset.

ServiceOperation
customEntityGET_ENTITY_PAGE_OFFSET

Method Parameters

ParameterDescription
entityTypeThe type of custom entity being retrieved.
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.

Usage

http://localhost:3000
string entityType = "athletes";
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.CustomEntityService.GetEntityPageOffset(entityType, context, pageOffset, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"_serverTime": 1637946319239,
"context": "eyJzZWFyY2hDcml0ZXJpYSI6e30sInNvcnRDcml0ZXJpYSI6eyJjcmVhdGVkQXQiOjF9LCJwYWdpbmF0aW9uIjp7InJvd3NQZXJQYWdlIjoyMCwicGFnZU51bWJlciI6MSwiZG9DbXXXXXXXmFsc2V9LCJvcHRpb25zIjpudWxsfQ",
"results": {
"page": 2,
"items": [
{
"entityId": "781a5f97-1fa8-41e5-xxxx-7f648af19414",
"version": 1,
"acl": {
"other": 1
},
"ownerId": "b7e7116e-749d-444f-xxxx-13f1101512a3",
"expiresAt": null,
"timeToLive": null,
"createdAt": 1573534287525,
"updatedAt": 1573534287525,
"data": {
"level1": "complete",
"level2": "incomplete"
}
}
]
}
}
}