SysGetMilestonePage
Retrieves the first page of milestones.
Note that this call does not return milestones (i.e. tasks) that are embedded within Quests. Use the Quests API for those.
After retrieving a page of milestones with this method use sysGetMilestonePageOffset to retrieve previous or next pages.
See the Generic Paged Queries documentation for creating the context object.
Supported searchCriteria
fields include:
milestoneId
title
description
category
- and
extraData
fields (must be prefixed byextraData
) - i.e.extraData.actionIndex
Service | Operation |
---|---|
gamification | SYS_GET_MILESTONE_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
// 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": 2,
"pageNumber": 1
},
"searchCriteria": {},
"sortCriteria": {
"milestoneId": 1
}
};
var gameficationProxy = bridge.getGamificationServiceProxy();
var milestonePage = gameficationProxy.sysGetMilestonePage(context);
var context = {
"pagination": {
"rowsPerPage": 2,
"pageNumber": 1
},
"searchCriteria": {},
"sortCriteria": {
"milestoneId": 1
}
};
var gameficationProxy = bridge.getGamificationServiceProxy();
var milestonePage = gameficationProxy.sysGetMilestonePage(context);
JSON Response
{
"status": 200,
"data": {
"context": "eyJzZWFyY2hDcml0ZXJpYSI6ey...",
"results": {
"count": 3,
"page": 1,
"items": [
{
"milestoneId": "1",
"questId": null,
"title": "Egg Crusher",
"description": "Crushing Eggs lifetime milestone",
"category": "mission",
"extraData": {
"secretMission": false,
"actionIndex": 4
},
"rewards": {
"experiencePoints": 30,
"achievement": "ACH001",
"currency": {
"coins": 5
},
"globalStatistics": {
"globalxp": 30
},
"statistics": {
"a3": 1,
"secretMissions": 1
}
},
"thresholds": {
"playerStatistics": {
"experienceLevel": 1,
"experiencePoints": 10,
"statistics": {
"returningDay": 7
}
}
},
"unlockThresholds": {
"playerStatistics": {
"experienceLevel": 2,
"experiencePoints": 10,
"statistics": {
"foodc": 5
}
},
"globalStatistics": {
"food_unlock": 1
}
},
"createdAt": 1574792720983,
"updatedAt": 1574792720983,
"version": 1
},
{
"milestoneId": "2",
"questId": null,
"title": "Another milestone",
"description": "Not yet fully defined",
"category": "mission",
"extraData": null,
"createdAt": 1574111511152,
"updatedAt": 1574111511152,
"version": 1
}
],
"moreAfter": true,
"moreBefore": false
}
}
}