跳到内容

测试设备 API

createTestDevice

Anchor link to

为应用程序注册一个测试设备。

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

请求正文

Anchor link to
名称类型描述
application*stringPushwoosh application code
push_tokenstring设备的 Push token。如果未提供 hwid,则此项为必需。
hwidstring设备的 Hardware ID (HWID)。如果未提供 push_token,则此项为必需。
device_type*integer设备类型。请参阅 /registerDevice 方法中的可能值。
name*string测试设备名称。
descriptionstring测试设备描述。
{
"status_code": 200,
"status_message": "OK",
"response": null
}
示例
{
"request": {
"application": "XXXXX-XXXXX", // 必需。Pushwoosh 应用程序代码
"push_token": "DEVICE_PUSH_TOKEN", // 如果未提供 hwid,则为必需。
"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

请求正文

Anchor link to
名称类型描述
auth*string来自 Pushwoosh Control Panel 的 API access token
application*stringPushwoosh application code
{
"status_code": 200,
"status_message": "OK",
"response": {
"TestDevices": [{
"name": "iosDevice",
"type": "1",
"pushtoken": "token",
"description": "ios device"
}]
}
}
示例
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // 必需。来自 Pushwoosh Control Panel 的 API access token
"application": "XXXXX-XXXXX" // 必需。Pushwoosh 应用程序代码
}
}

有关设备类型,请参阅 /registerDevice