สถิติ Events และ Tags
getEventStatistics
Anchor link toดึงจำนวนครั้งที่ event ถูก trigger ในช่วงเวลาที่กำหนด
POST https://api.pushwoosh.com/json/1.3/getEventStatistics
พารามิเตอร์ใน Request body
Anchor link to| ชื่อ | จำเป็น | ประเภท | คำอธิบาย |
|---|---|---|---|
auth | ใช่ | string | API access token จาก Pushwoosh Control Panel |
application | ใช่ | string | Pushwoosh application code |
event | ใช่ | string | ชื่อ Event ตามที่สร้างไว้ใน Pushwoosh Control Panel |
date_from | ใช่ | string | จุดเริ่มต้นของช่วงเวลาที่จะดึงสถิติ |
date_to | ใช่ | string | จุดสิ้นสุดของช่วงเวลาที่จะดึงสถิติ |
attributes | ไม่ | array | อาร์เรย์ของ attributes ของ event สำหรับกรองผลลัพธ์ |
ตัวอย่าง request
Anchor link to{ "request": { "auth":"yxoPUlwqm…………pIyEX4H", // จำเป็น API access token จาก Pushwoosh Control Panel "application": "XXXXX-XXXXX", // จำเป็น Pushwoosh application code "event": "Event name", // จำเป็น ชื่อของ Event ตามที่สร้างไว้ใน Pushwoosh Control Panel "date_from": "2024-09-12", // จำเป็น วันเริ่มต้นของช่วงเวลารายงาน "date_to": "2024-09-12", // จำเป็น วันสิ้นสุดของช่วงเวลารายงาน "attributes": [{ // ไม่จำเป็น "name": "attributeName", "operator": "EQ", "values": ["val"] }] }}ตัวอย่าง response
Anchor link to{ "status_code": 200, "status_message": "OK", "response": { "request_id": "DC1_bc63f00c736696d75cea17aa6855ba19" }}การดึงผลลัพธ์ของ scheduled request
Anchor link toพารามิเตอร์ใน Request body
Anchor link to| ฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
request_id | string | ID ของ Scheduled request ใช้ /getResults เพื่อดึงผลลัพธ์ |
Response ของ Scheduled (/getResults)
{ "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
Anchor link toดึงสถิติสำหรับ tag ที่ระบุ
POST https://api.pushwoosh.com/json/1.3/getTagStats
พารามิเตอร์ใน Request body
Anchor link to| ชื่อ | จำเป็น | ประเภท | คำอธิบาย |
|---|---|---|---|
auth | ใช่ | string | API access token จาก Pushwoosh Control Panel |
tag | ใช่ | string | ชื่อ Tag ตามที่ระบุใน Pushwoosh Control Panel |
applications | ไม่ | array | รายการของ applications ระบุเฉพาะในกรณีที่ tag เป็นแบบ application-specific |
ตัวอย่าง request
Anchor link to{ "request": { "auth": "yxoPUlwqm…………pIyEX4H", "tag": "TAG_NAME", "applications": [ "APPLICATION_1", "APPLICATION_2", "APPLICATION_3" ] }}การดึงผลลัพธ์ของ scheduled request
Anchor link toResponse ของ /getResults
Anchor link to{ "status_code": 200, "status_message": "OK", "response": { "fileName": "DIRECT_FILE_URL.csv" }}ตัวอย่างเนื้อหา CSV
Anchor link to13C2B-72C62;ua_settingpushbod;313C2B-72C62;ua_settingpushhealth;313C2B-72C62;ua_settingpushstrength;313C2B-72C62;ua_settingpushupdate;2