GetSystemEntityPage
Method uses a paging system to iterate through global system 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.
Service | Operation |
---|---|
globalEntity | GET_SYSTEM_ENTITY_PAGE |
Method Parameters
Parameter | Description |
---|---|
context | The json context for the page request. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
var context = {
"pagination": {
"rowsPerPage": 50,
"pageNumber": 1
},
"searchCriteria": {
"entityType": "address"
},
"sortCriteria": {
"createdAt": 1,
"updatedAt": -1
}
};
var globalEntityProxy = bridge.getGlobalEntityServiceProxy();
var postResult = globalEntityProxy.getSystemEntityPage(context);
if (postResult.status == 200) {
// Success!
}
{
"service": "globalEntity",
"operation": "GET_SYSTEM_ENTITY_PAGE",
"data": {
"context": {
"pagination": {
"rowsPerPage": 50,
"pageNumber": 1
},
"searchCriteria": {
"entityType": "address"
},
"sortCriteria": {
"createdAt": 1,
"updatedAt": -1
}
}
}
}
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"
}
}