SysGetPage
Retrieves first page of users from server based on the specified query context.
Note that for apps with > 10,000 users, it is recommended that doCount
be set to false for better performance.
Service | Operation |
---|---|
user | SYS_GET_PAGE |
Method Parameters
Parameter | Description |
---|---|
context | A context JSON object describing the pagination, searchCriteria and sortCriteria options |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var context = {
"pagination": {
"rowsPerPage": 20,
"pageNumber": 1,
"doCount": false
},
"searchCriteria": {
"playerName": {
"$regex": "^Bat"
}
},
"sortCriteria": {
}
}
var userProxy = bridge.getUserServiceProxy();
var postResult = userProxy.sysGetPage( context );
if (postResult.status == 200) {
// Success!
}
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"status": 200,
"data": {
"context": "eyJzZWFyY2hDcml0ZXJpYSI6eyJnYW1lSWQiOiIyMTc3NCxxx...",
"results": {
"count": 1,
"page": 1,
"items": [
{
"profileId": "0b53155b-1fc8-4916-XXXX-298379efc67a",
"playerName": "Bats",
"countryCode": "CA",
"timeZoneOffset": -5,
"summaryFriendData": {
"favColor": "black"
},
"emailAddress": "bruce@wayneent.com"
}
],
"moreAfter": false,
"moreBefore": false
}
}
}