ข้ามไปยังเนื้อหา

Test devices API

createTestDevice

Anchor link to

ลงทะเบียนอุปกรณ์ทดสอบสำหรับแอปพลิเคชัน

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

Request Body

Anchor link to
NameTypeDescription
application*stringPushwoosh application code
push_token*stringPush token ของอุปกรณ์
device_type*integerDevice type ดูค่าที่เป็นไปได้ในเมธอด /registerDevice
name*stringชื่ออุปกรณ์ทดสอบ
descriptionstringคำอธิบายอุปกรณ์ทดสอบ
{
"status_code": 200,
"status_message": "OK",
"response": null
}
Example
{
"request": {
"application": "XXXXX-XXXXX", // จำเป็นต้องมี Pushwoosh application code
"push_token": "DEVICE_PUSH_TOKEN", // จำเป็นต้องมี
"device_type": 1, // จำเป็นต้องมี ดูประเภทอุปกรณ์ที่ /registerDevice
"name": "TEST_DEVICE_1", // จำเป็นต้องมี ชื่ออุปกรณ์ทดสอบ
"description": "android test device" // ไม่จำเป็นต้องมี คำอธิบายอุปกรณ์ทดสอบ
}
}

listTestDevices

Anchor link to

ส่งคืนค่าอุปกรณ์ทดสอบทั้งหมดสำหรับแอปพลิเคชันที่ระบุ

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

Request Body

Anchor link to
NameTypeDescription
auth*stringAPI access token จาก Pushwoosh Control Panel
application*stringPushwoosh application code
{
"status_code": 200,
"status_message": "OK",
"response": {
"TestDevices": [{
"name": "iosDevice",
"type": "1",
"pushtoken": "token",
"description": "ios device"
}]
}
}
Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // จำเป็นต้องมี API access token จาก Pushwoosh Control Panel
"application": "XXXXX-XXXXX" // จำเป็นต้องมี Pushwoosh application code
}
}

สำหรับประเภทอุปกรณ์ ดูที่ /registerDevice