Example Queries
The
following are examples of queries to retrieve SAU and SAtU values.
Query the One Hour Intervals
Query URL:
http://<ip-address>/me/r/sau/active?interval_length=3600&start=1375221600&stop=1375232400
Response:
{
"data": [
{
"kpi_name": "sim_active_users",
"duration": 3600,
"start_interval": 1375221600,
"errors": {
"-1": []
},
"value": 310
},
{
"kpi_name": "sim_active_users",
"duration": 3600,
"start_interval": 1375225200,
"errors": {
"-1": []
},
"value": 422
},
{
"kpi_name": "sim_active_users",
"duration": 3600,
"start_interval": 1375228800,
"errors": {
"-1": []
},
"value": 731
}
]
}
Query the Three Hour Intervals from the Same Time Period
Query URL:
http://<ip-address>/me/r/sau/active?interval_length=10800&start=1375221600&stop=1375232400
Response:
{
"data": [
{
"kpi_name": "sim_active_users",
"duration": 10800,
"start_interval": 1375221600,
"errors": {
"-1": []
},
"value": 1463
},
{
"kpi_name": "sim_active_users",
"duration": 10800,
"start_interval": 1375225200,
"errors": {
"-1": []
},
"value": 1273
},
{
"kpi_name": "sim_active_users",
"duration": 10800,
"start_interval": 1375228800,
"errors": {
"-1": []
},
"value": 1101
}
],
"success": true
}
Note:
When querying intervals larger than one hour, the API returns one interval for each hour. For example, in the response above, the interval acts as a rolling window of 3 hours, moving in steps of an hour at a time. This is expected and meant to give the application more flexibility in selecting which hour boundaries to select.