Statistics API

post
/getMsgStats

https://cp.pushwoosh.com/json/1.3/getMsgStats
Gets messages statistics.
Request
Response
Request
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
message
required
string
Message code obtained in /createMessage request.
Response
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"request_id": "b3337d8ec78f67280a40a5b89050c0c0"
}
}

For Private Offering subscriptions only.

Example
{
"request":{
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"message": "xxxx-xxxxxxx-xxxxxx" // 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/getResults method for more information

Scheduled (/getResults) response:

Example
{
"status_code": 200,
"status_message": "OK",
"response": {
"formatter": "minutely",
"rows": [
{
"datetime": "2015-09-30 12:54:00",
"action": "send",
"count": "3"
},
{
"datetime": "2015-09-30 12:54:00",
"action": "open",
"count": "2"
},
{
"datetime": "2015-09-30 12:54:00",
"action": "send",
"count": "59"
}
],
// conversion (if goal tracking is allowed)
"conversion": {
"send": 10,
"open": 5,
"events": [
{"uid": 1, "event": "event name", "hits": 5, "conversion": "100%",
"revenue": 15.34}
]
}
}
}

post
/getMsgPlatformsStats

https://cp.pushwoosh.com/json/1.3/getMsgPlatformsStats
Gets messages statistics for one or several platforms.
Request
Response
Request
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
message
required
string
Message code obtained in /createMessage request.
platforms
required
array
List of platform types, array of integers. See /registerDevice for the complete list.
Response
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"request_id": "287870092dc23175af5dc48ba1dc7f3c"
}
}

For Private Offering subscriptions only.

Example
{
"request":{
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"message": "xxxx-xxxxxxx-xxxxxx", // message code or message ID
"platforms":[1,2,3,4,5] // list of platform types. Please see /registerDevice for the complete list of platform types
}
}

As every scheduled request, /getMsgPlatformsStats request requires an additional /getResults request.

Response body:

Field

Type

Description

request_id

string

Scheduled request Id. Please check/getResults method for more information

Scheduled (/getResults) response:

Example
{
"status_code": 200,
"status_message": "OK",
"response": {
"formatter": "minutely",
"rows": [
{
"datetime": "2015-09-30 12:54:00",
"action": "send",
"count": "3",
},
{
"datetime": "2015-09-30 12:54:00",
"action": "open",
"count": "2",
},
{
"datetime": "2015-09-30 12:54:00",
"action": "send",
"count": "59",
},
.................
]
}
}

post
/getApplicationSubscribersStats

https://cp.pushwoosh.com/json/1.3/getApplicationSubscribersStats
Displays the app's subscribers list grouped by the types of their devices.
Request
Response
Request
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
application
required
string
Pushwoosh application code.
Response
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"IOS": 1,
"BLACKBERRY": 0,
"ANDROID": 1,
"WINDOWS_PHONE": 0,
"OSX": 0,
"WINDOWS": 0,
"AMAZON": 0,
"SAFARI": 0,
"FIREFOX": 0
}
}

For Private Offering subscriptions only.

Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX" // Pushwoosh application code
}
}

post
/getAppStats

https://cp.pushwoosh.com/json/1.3/getAppStats
Gets the statistics of the app.
Request
Response
Request
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
application
required
string
Pushwoosh application code.
datefrom
required
string
Date and time, start of the reporting period. Formatted dare: Y-m-d H:i:s
dateto
required
string
Date and time, end of the reporting period. Formatted date: Y-m-d H:i:s
Response
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"request_id": "c93a202f439235f9adaaa06d651548ab"
}
}

For Private Offering subscriptions only.

Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // Pushwoosh application code
"datefrom": "2013-06-04 00:00:00", // date and time, start of the reporting period
"dateto": "2013-06-07 00:00:00" // date and time, end of the reporting period
}
}

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 /getResults method for more information.

Scheduled (/getResults) response body:

Field

Type

Description

applications

dictionary

statistics for applications

devices

dictionary

statistics for devices

messages

dictionary

statistics 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"
}, ...
]
}
}
}

post
/getCampaignStats

https://cp.pushwoosh.com/json/1.3/getCampaignStats
Displays statistics of a particular campaign.
Request
Response
Request
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
campaign
required
string
Campaign ID.
datefrom
required
string
Date and time, start of the reporting period. Formatted date: Y-m-d H:i:s
dateto
required
string
Date and time, end of the reporting period. Formatted date: Y-m-d H:i:s
Response
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"request_id": "a3ef436445abfdef6255cc2f65ce7614"
}
}

For Private Offering subscriptions only.

{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"campaign": "XXXXX-XXXXX", // campaign ID
"datefrom": "Y-m-d H:i:s", // date and time, start of the reporting period
"dateto": "Y-m-d H:i:s" // date and time, end of the reporting period
}
}

As every scheduled request, /getCampaignStats request requires an additional /getResults request.

/getResults response:

Example
{
"status_code": 200,
"status_message": "OK",
"response": {
"formatter": "hourly",
"rows": [
{
"count": 0,
"action": "open",
"datetime": "2018-05-09 00:00:00",
"platformid": 14
},
{
"count": 0,
"action": "send",
"datetime": "2018-05-09 00:00:00",
"platformid": 14
},
{
"count": 0,
"action": "send",
"datetime": "2018-05-11 00:00:00",
"platformid": 14
}
],
// conversion (if goal tracking is allowed)
"conversion": {
"send": 10,
"open": 5,
"events": [
{"uid": 1, "event": "event name", "hits": 5, "conversion": "100%",
"revenue": 15.34}
]
}
}
}

post
/getEventStatistics

https://cp.pushwoosh.com/json/1.3/getEventStatistics
Retrieves the number of times the Event was triggered during the specified period.
Request
Response
Request
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel
application
required
string
Pushwoosh application code
event
required
string
Event name exactly as created in Pushwoosh Control Panel
date_from
required
string
Start of the period to get stats for
date_to
required
string
End of the period to get stats for
attributes
optional
array
An array of the Event attributes
Response
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"request_id": "DC1_bc63f00c736696d75cea17aa6855ba19"
}
}

For Private Offering subscriptions only.

{
"request" : {
"auth":"yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // Pushwoosh application code
"event" : "Event name", // the name of Event exactly as created in Pushwoosh Control Panel
"date_from" : "2018-09-12",
"date_to" : "2018-09-12",
"attributes" : [ // optional
{
"name": "attributeName",
"operator" : "EQ",
"values": ["val"]
}
]
}
}

Like every scheduled request, /getEventStatistics request requires an additional /getResults request

Response body:

Field

Type

Description

request_id

string

Scheduled request Id. Please check/getResults method for more information

Scheduled (/getResults) response:

Example
{
"status_code": 200,
"status_message": "OK",
"response": [
{
"date": "2018-09-12 00:00",
"count": 12
},
{
"date": "2018-09-12 01:00",
"count": 2
},
{
"date": "2018-09-12 02:00",
"count": 4
},
{
"date": "2018-09-12 03:00",
"count": 8
},
{
"date": "2018-09-12 04:00",
"count": 9
},
{
"date": "2018-09-12 05:00",
"count": 2
},
{
"date": "2018-09-12 06:00",
"count": 0
},
{
"date": "2018-09-12 07:00",
"count": 0
},
{
"date": "2018-09-12 08:00",
"count": 0
},
{
"date": "2018-09-12 09:00",
"count": 0
},
{
"date": "2018-09-12 10:00",
"count": 0
},
{
"date": "2018-09-12 11:00",
"count": 0
},
{
"date": "2018-09-12 12:00",
"count": 0
},
{
"date": "2018-09-12 13:00",
"count": 0
},
{
"date": "2018-09-12 14:00",
"count": 0
},
{
"date": "2018-09-12 15:00",
"count": 0
},
{
"date": "2018-09-12 16:00",
"count": 0
},
{
"date": "2018-09-12 17:00",
"count": 0
},
{
"date": "2018-09-12 18:00",
"count": 0
},
{
"date": "2018-09-12 19:00",
"count": 0
},
{
"date": "2018-09-12 20:00",
"count": 0
},
{
"date": "2018-09-12 21:00",
"count": 0
},
{
"date": "2018-09-12 22:00",
"count": 0
},
{
"date": "2018-09-12 23:00",
"count": 0
}
]
}

post
/getTagStats

https://cp.pushwoosh.com/json/1.3/getTagStats
Displays statistics for the specified Tag.
Request
Response
Request
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
tag
required
string
Tag name.
applications
optional
array
List of applications. Specify only when the tag is application-specific.
Response
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"request_id": "2702dd59b826e4a23b2f1af24de53108" //request_id for /getResults method
}
}

For Private Offering subscriptions only.

Example
{
"request":{
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"tag": "TAG_NAME",
"applications": ["APPLICATION_1", "APPLICATION_2", "APPLICATION_3"] // optional. Specify only when the tag is app specific
}
}

As every scheduled request, getTagStats request requires an additional /getResults request.

/getResults response:

{
"status_code": 200,
"status_message": "OK",
"response": {
"fileName": "DIRECT_FILE_URL.csv" // direct link to the csv file
}
}

Received file is a csv file with a semicolon ";" separator.

csv file content example:

13C2B-72C62;ua_settingpushbod;3
13C2B-72C62;ua_settingpushhealth;3
13C2B-72C62;ua_settingpushstrength;3
13C2B-72C62;ua_settingpushupdate;2