# API أجهزة الاختبار

## createTestDevice

يقوم بتسجيل جهاز اختبار للتطبيق.

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

#### محتوى الطلب

| الاسم | النوع | الوصف |
| ---------------------------------------------- | ------- | ----------------------------------------------------------- |
| application\* | string | [Pushwoosh application code](/ar/developer/api-reference/api-identifiers/#application-code) |
| push\_token\* | string | [Push token](/ar/developer/api-reference/api-identifiers/#push-token) الخاص بالجهاز. |
| device\_type\* | integer | [Device type](/ar/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>


```text title="مثال"
{
  "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](/ar/developer/api-reference/api-identifiers/#api-access-token) من لوحة تحكم Pushwoosh. |
| application\* | string | [Pushwoosh application code](/ar/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>



```text title="مثال"
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H", // مطلوب. API access token من لوحة تحكم Pushwoosh
    "application": "XXXXX-XXXXX"    // مطلوب. Pushwoosh application code
  }
}
```

لمعرفة أنواع الأجهزة، راجع [`/registerDevice`](/ar/developer/api-reference/device-api/#registerdevice).