Statistics API v1
List of methods for working with statistics
This is an old version of the Statistics API. You can still use these methods, but we recommend using the Statistics API v2 to get the most out of your statistics.
getMsgStats (deprecated)
This method is deprecated. Please use the totalsByIntervals method instead.
Retrieve stats for a specific message.
POST
https://go.pushwoosh.com/json/1.3/getMsgStats
Request Body
Name | Type | Description |
---|---|---|
auth* | string | API access token from Pushwoosh Control Panel. |
message* | string | Message code obtained in /createMessage request. |
Like every scheduled request, /getMsgStats request requires an additional /getResults
request
Response body:
Field | Type | Description |
request_id | string | Scheduled request Id. Please check |
Scheduled (/getResults) response:
getMsgPlatformsStats (deprecated)
This method is deprecated. Please use the totalsByIntervals method instead.
Retrieve specific message's statistics for one or several platforms only.
POST
https://api.pushwoosh.com/json/1.3/getMsgPlatformsStats
Request Body
Name | Type | Description |
---|---|---|
auth* | string | API access token from Pushwoosh Control Panel. |
message* | string | Message code obtained in /createMessage request. |
platforms | array | List of platform types, array of integers. See /registerDevice for the complete list. |
As every scheduled request, /getMsgPlatformsStats request requires an additional /getResults
request.
Response body:
Field | Type | Description |
request_id | string | Scheduled request Id. Please check |
Scheduled (/getResults) response:
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 | Type | Description |
---|---|---|
auth* | string | API access token from Pushwoosh Control Panel. |
application* | string | Pushwoosh application code. |
getAppStats
Get the statistics of the specific app for a specific time period.
POST
https://cp.pushwoosh.com/json/1.3/getAppStats
Request Body
Name | Type | Description |
---|---|---|
auth* | string | API access token from Pushwoosh Control Panel. |
application* | string | Pushwoosh application code. |
datefrom* | string | Date and time, start of the reporting period. Formatted dare: Y-m-d H:i:s |
dateto* | string | Date and time, end of the reporting period. Formatted date: Y-m-d H:i:s |
Statistic displays registered actions for application, device or message, for the timeframe specified.
Reports are automatically aggregated using the following rules: yearly > 1 year monthly > 1 month daily > 1 day hourly > 3 hours minutely in other cases.
Actions: Application Level: open, install
Device Level: register, unregister
Message level: send, open
All statistics objects have the same format:
Field | Type | Description |
formatter | string | report scale: yearly, monthly, daily, hourly, minutely |
rows | list | report rows |
Each of the report rows is a dictionary:
Field | Type | Description |
count | int | registered actions count |
action | string | registered action |
datetime | string | Formatted date: Y-m-d H:i:s |
As every scheduled request, /getAppStats
request requires an additional /getResults
request.
Response body:
Field | Type | Description |
request_id | string | Scheduled request ID. Please check |
Scheduled (/getResults) response body:
Field | Type | Description |
applications | dictionary | statistics for applications |
devices | dictionary | statistics for devices |
messages | dictionary | statistics for messages |
getCampaignStats
Retrieve statistics of a particular campaign for a specific time period.
POST
https://api.pushwoosh.com/json/1.3/getCampaignStats
Request Body
Name | Type | Description |
---|---|---|
auth* | string | API access token from Pushwoosh Control Panel. |
campaign* | string | Campaign ID. |
datefrom* | string | Date and time, start of the reporting period. Formatted date: Y-m-d H:i:s |
dateto* | string | Date and time, end of the reporting period. Formatted date: Y-m-d H:i:s |
As every scheduled request, /getCampaignStats
request requires an additional /getResults
request.
/getResults response:
getEventStatistics
Retrieves the number of times the Event was triggered during the specified period.
POST
https://cp.pushwoosh.com/json/1.3/getEventStatistics
Request Body
Name | Type | Description |
---|---|---|
auth* | string | API access token from Pushwoosh Control Panel |
application* | string | Pushwoosh application code |
event* | string | Event name exactly as created in Pushwoosh Control Panel |
date_from* | string | Start of the period to get stats for |
date_to* | string | End of the period to get stats for |
attributes | array | An array of the Event attributes |
Like every scheduled request, /getEventStatistics request requires an additional /getResults
request
Response body:
Field | Type | Description |
request_id | string | Scheduled request Id. Please check |
Scheduled (/getResults) response:
getTagStats
Retrieve statistics for the specified Tag.
POST
https://go.pushwoosh.com/json/1.3/getTagStats
Request Body
Name | Type | Description |
---|---|---|
auth* | string | API access token from Pushwoosh Control Panel. |
tag* | string | Tag name. |
applications | array | List of applications. Specify only when the tag is application-specific. |
As every scheduled request, getTagStats
request requires an additional /getResults
request.
/getResults
response:
Received file is a CSV file with a semicolon ";" separator.
CSV file content example:
getSubscribersStatistics
Retrieves app subscribers stats for a time period.
POST
https://api.pushwoosh.com/api/v2/statistics/application/getSubscribersStatistics
Retrieves app subscribers stats for a time period.
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | API access token in the following format: Key PKX.......NHg |
Content-Type* | string | application/json |
Request Body
Name | Type | Description |
---|---|---|
application_code* | string | Pushwoosh app code |
timestamp_from* | string | Timestamp of the stats period start date (YYYY-MM-DD hh:mm:ss, UTC+0) |
timestamp_to* | string | Timestamp of the stats period end date (YYYY-MM-DD hh:mm:ss, UTC+0) |
Please take into consideration that the intervals between timestamps in the response depend on the period you send in your request as follows:
if you request the stats for a period longer than one year, the stats timestamps interval will be a year;
if the stats period equals a year, the interval between response's timestamps equals a month;
for periods longer than a month but less than a year, stats for every day will be returned;
for periods less than a month, the response will include stats for every hour.
Period in your request | Interval in response |
---|---|
Over 1 year | 1 year |
1 year | 1 month |
1 month - 1 year | Every day |
Less than a month | Every hour |
Last updated