Skip to content

Application and subscriber statistics

getAppStats

Get the statistics of a specific app for a defined time period.

POST https://cp.pushwoosh.com/json/1.3/getAppStats

Request parameters
Name
RequiredTypeDescription
authYesstringAPI access token from Pushwoosh Control Panel.
applicationYesstringPushwoosh application code.
datefromYesstringStart date and time of the reporting period. Format: Y-m-d H:i:s.
datetoYesstringEnd date and time of the reporting period. Format: Y-m-d H:i:s.
Request example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // required. API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // required. Pushwoosh application code
"datefrom": "2013-06-04 00:00:00", // required. Date and time, start of the reporting period
"dateto": "2013-06-07 00:00:00" // required. Date and time, end of the reporting period
}
}
Response example
{
"status_code": 200,
"status_message": "OK",
"response": {
"request_id": "c93a202f439235f9adaaa06d651548ab"
}
}

Understanding the statistics

Statistics display registered actions for an application, device, or message within the specified timeframe.

Reports are automatically aggregated using the following rules:

  • Yearly: If the period is longer than one year.
  • Monthly: If the period is longer than one month.
  • Daily: If the period is longer than one day.
  • Hourly: If the period is longer than three hours.
  • Minutely: In all other cases.
Action types
  • Application Level: _open_, _install_
  • Device Level: _register_, _unregister_
  • Message Level: _send_, _open_
Response format

All statistics objects have the same format:

Field
TypeDescription
formatterstringReport scale: yearly, monthly, daily, hourly, minutely.
rowslistContains report data for each registered action.

Each report row contains:

Field
TypeDescription
countintNumber of registered actions.
actionstringThe type of registered action.
datetimestringFormatted date: Y-m-d H:i:s.

Retrieving scheduled request results

Response body
Field
TypeDescription
request_idstringScheduled request ID. Refer to /getResults for more details.
Scheduled (/getResults) response body
Field
TypeDescription
applicationsdictionaryStatistics for applications.
devicesdictionaryStatistics for devices.
messagesdictionaryStatistics for messages.
Example
{
"error": {
"code": 0,
"message": "OK"
},
"json_data": {
"applications": {
"formatter": "hourly",
"rows": [{
"count": 0,
"action": "open",
"datetime": "2013-06-06 00:00:00"
}, {
...
}]
}
}
}

getApplicationSubscribersStats

Displays the app’s subscribers list grouped by the types of their devices.

POST https://api.pushwoosh.com/json/1.3/getApplicationSubscribersStats

Request Body
Name
RequiredTypeDescription
authYesstringAPI access token from Pushwoosh Control Panel.
applicationYesstringPushwoosh application code.

Request example

{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // required. API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX" // required. Pushwoosh application code
}
}
{
"status_code": 200,
"status_message": "OK",
"response": {
"IOS": 1,
"ANDROID": 1,
"OSX": 0,
"WINDOWS": 0,
"AMAZON": 0,
"SAFARI": 0,
"FIREFOX": 0
}
}

getSubscribersStatistics

Retrieves app subscribers stats for a time period.

POST https://api.pushwoosh.com/api/v2/statistics/application/getSubscribersStatistics

Headers
Name
RequiredTypeDescription
AuthorizationYesstringAPI access token in the format: Key PKX.......NHg.
Content-TypeYesstringMust be set to application/json.
Request parameters
Name
RequiredTypeDescription
application_codeYesstringPushwoosh application code.
timestamp_fromYesstringStart date and time of the stats period (format: YYYY-MM-DD hh:mm:ss, UTC+0).
timestamp_toYesstringEnd date and time of the stats period (format: YYYY-MM-DD hh:mm:ss, UTC+0).

Example request

{
"application_code": "12345-67890",
"timestamp_from": "2022-08-01 00:00:00",
"timestamp_to": "2022-09-01 00:00:00"
}

Example response

{
"statistics": [{
"timestamp": "YYYY-MM-DD hh:mm:ss", // UTC+0
"platform": 1,
"push_enabled": 100,
"push_disabled": 100
}]
}

Response codes

{
"statistics": [{
"timestamp": "YYYY-MM-DD hh:mm:ss",
"platform": 1,
"push_enabled": 100,
"push_disabled": 100
}]
}

Explanation: The request was successful, and the statistics are returned.

Timestamp interval rules

Requested period
Interval in response
More than 1 year1 year
1 year1 month
1 month - 1 year1 day
Less than 1 month1 hour