Events and tags statistics
getEventStatistics
Retrieves the number of times an event was triggered during a specified period.
POST
https://cp.pushwoosh.com/json/1.3/getEventStatistics
Request parameters
Name | Required | Type | Description |
---|---|---|---|
auth | Yes | string | API access token from Pushwoosh Control Panel. |
application | Yes | string | Pushwoosh application code. |
event | Yes | string | Event name, exactly as created in Pushwoosh Control Panel. |
date_from | Yes | string | Start of the period to retrieve statistics for. |
date_to | Yes | string | End of the period to retrieve statistics for. |
attributes | No | array | An array of event attributes for filtering results. |
Example request
{ "request": { "auth":"yxoPUlwqm…………pIyEX4H", // required. API access token from Pushwoosh Control Panel "application": "XXXXX-XXXXX", // required. Pushwoosh application code "event": "Event name", // required. The name of Event exactly as created in Pushwoosh Control Panel "date_from": "2024-09-12", // required. Start of the reporting period "date_to": "2024-09-12", // required. End of the reporting period "attributes": [{ // optional. "name": "attributeName", "operator": "EQ", "values": ["val"] }] }}
Example response
{ "status_code": 200, "status_message": "OK", "response": { "request_id": "DC1_bc63f00c736696d75cea17aa6855ba19" }}
Retrieving scheduled request results
Request parameters
Field | Type | Description |
---|---|---|
request_id | string | Scheduled request ID. Use /getResults to retrieve results. |
Scheduled (/getResults) response
{ "status_code": 200, "status_message": "OK", "response": [{ "date": "2024-09-12 00:00", "count": 12 }, { "date": "2024-09-12 01:00", "count": 2 }, { "date": "2024-09-12 02:00", "count": 4 }, { "date": "2024-09-12 03:00", "count": 8 }, { "date": "2024-09-12 04:00", "count": 9 }, { "date": "2024-09-12 05:00", "count": 2 }, { "date": "2024-09-12 06:00", "count": 0 }, { "date": "2024-09-12 07:00", "count": 0 }, { "date": "2024-09-12 08:00", "count": 0 }, { "date": "2024-09-12 09:00", "count": 0 }, { "date": "2024-09-12 10:00", "count": 0 }, { "date": "2024-09-12 11:00", "count": 0 }, { "date": "2024-09-12 12:00", "count": 0 }, { "date": "2024-09-12 13:00", "count": 0 }, { "date": "2024-09-12 14:00", "count": 0 }, { "date": "2024-09-12 15:00", "count": 0 }, { "date": "2024-09-12 16:00", "count": 0 }, { "date": "2024-09-12 17:00", "count": 0 }, { "date": "2024-09-12 18:00", "count": 0 }, { "date": "2024-09-12 19:00", "count": 0 }, { "date": "2024-09-12 20:00", "count": 0 }, { "date": "2024-09-12 21:00", "count": 0 }, { "date": "2024-09-12 22:00", "count": 0 }, { "date": "2024-09-12 23:00", "count": 0 }]}
getTagStats
Retrieves statistics for a specific tag.
POST
https://go.pushwoosh.com/json/1.3/getTagStats
Request parameters
Name | Required | Type | Description |
---|---|---|---|
auth | Yes | string | API access token from Pushwoosh Control Panel. |
tag | Yes | string | Tag name, exactly as in Pushwoosh Control Panel. |
applications | No | array | List of applications. Specify only if the tag is application-specific. |
Example request
{ "request": { "auth": "yxoPUlwqm…………pIyEX4H", "tag": "TAG_NAME", "applications": [ "APPLICATION_1", "APPLICATION_2", "APPLICATION_3" ] }}
Retrieving scheduled request results
/getResults
response
{ "status_code": 200, "status_message": "OK", "response": { "fileName": "DIRECT_FILE_URL.csv" }}
Example CSV content
13C2B-72C62;ua_settingpushbod;313C2B-72C62;ua_settingpushhealth;313C2B-72C62;ua_settingpushstrength;313C2B-72C62;ua_settingpushupdate;2