# API тестовых устройств

## createTestDevice

Регистрирует тестовое устройство для приложения.

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

#### Тело запроса

| Параметр | Тип | Описание |
| :--- | :--- | :--- |
| application\* | string | [Pushwoosh Application code](/ru/developer/api-reference/api-identifiers/#application-code) |
| push\_token\* | string | [Push token](/ru/developer/api-reference/api-identifiers/#push-token) устройства. |
| device\_type\* | integer | [Device type](/ru/developer/api-reference/api-identifiers/#device-type). См. возможные значения в методе `/registerDevice`. |
| name\* | string | Имя тестового устройства. |
| description | string | Описание тестового устройства. |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": null
}
```
</TabItem>
</Tabs>

```json title="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

Возвращает все тестовые устройства для указанного приложения.

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

#### Тело запроса

| Параметр | Тип | Описание |
| :--- | :--- | :--- |
| auth\* | string | [API access token](/ru/developer/api-reference/api-identifiers/#api-access-token) из Pushwoosh Control Panel. |
| application\* | string | [Pushwoosh Application code](/ru/developer/api-reference/api-identifiers/#application-code) |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": {
    "TestDevices": [{
      "name": "iosDevice",
      "type": "1",
      "pushtoken": "token",
      "description": "ios device"
    }]
  }
}
```
</TabItem>
</Tabs>

```json title="Example"
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H", // обязательно. API access token из Pushwoosh Control Panel
    "application": "XXXXX-XXXXX"    // обязательно. Pushwoosh Application code
  }
}
```

Типы устройств см. в [`/registerDevice`](/ru/developer/api-reference/device-api/#registerdevice).