# Equipment related

## 1.Get device list

### Calling <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type   | illustrate       | Remark                                                                                                                   |
| --------- | ------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------ |
| fun       | String | /device/get      | Request function name                                                                                                    |
| id        | String | Device unique ID | Get the specified device. Multiple devices are separated by commas. Without this parameter, all devices can be obtained. |

* **httpGet request example**

Get a list of all devices

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/get'
```

Get the specified device

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/get?id=9A:97:4E:C9:54:71,5C:1D:D9:ED:D9:52'
```

* **httpPost request example**

Get a list of all devices

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/get
```

Get the specified device

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/get \
  --form id=9A:97:4E:C9:54:71,5C:1D:D9:ED:D9:52
```

* **httpPost json request example \[websocket can also send the same json request]**

Get a list of all devices

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/get",
    "data": {
    }
}'
```

Get the specified device

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/get",
    "data": {
        "id": "9A:97:4E:C9:54:71,5C:1D:D9:ED:D9:52"
    }
}'
```

### Response <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
  {
  "data": {
    "list": [
      {
        "air_handle": 121092144,
        "air_pid": 10952,
        "rotate": 0,
        "state": 0,
        "imgw": 750,
        "imgh": 1334,
        "gid": 0,
        "air_ratio": 0,
        "air_fps": 0,
        "air_refresh": 0,
        "air_img_fps": 0,
        "air_audio": 0,
        "name": "",
        "srv_name": "`iMouseXP-7827",
        "width": "375",
        "height": "667",
        "ip": "192.168.9.118",
        "mac": "00:E0:99:D9:92:82",
        "user_name": "iPhone",
        "version": "15.7.3",
        "model": "iPhone8,1",
        "deviceid": "48:3B:38:CD:02:F0",
        "device_name": "iPhone 6s",
        "location": "",
        "location_crc": "B0DBD800",
        "vid": "720D",
        "pid": "6E22",
        "uid": "6E2224BD",
        "gname": "Ungrouped",
        "uver": "4.4"
      }
    ],
    "code": 0,
    "id": "",
    "message": "success"
  },
  "status": 200,
  "message": "success",
  "msgid": 0,
  "fun": "\/device\/get"
}
```

* **Response data data field description**\
  list array records the acquired devices.

| Fields        | illustrate                       | Remark                                                           |
| ------------- | -------------------------------- | ---------------------------------------------------------------- |
| rotate        | Screen angle                     | 0 vertical screen, 1 horizontal screen                           |
| state         | Device Status                    | 0 is not online, non-0 is online                                 |
| gid           | Group id                         | -                                                                |
| name          | Custom name                      | -                                                                |
| srv\_name     | Current connection screen name   | -                                                                |
| width         | Screen width                     | Physical size                                                    |
| height        | Screen height                    | Physical size                                                    |
| ip            | The device's own IP address      | -                                                                |
| Mac           | The device's own MAC address     | -                                                                |
| user\_name    | Username                         | The name of the phone's settings                                 |
| version       | System version                   | -                                                                |
| model         | Internal Model                   | -                                                                |
| deviceid      | Device unique id                 | -                                                                |
| device\_name  | Device Name                      | -                                                                |
| location      | Mouse parameters                 | -                                                                |
| location\_crc | Mouse parameters crc             | Point to the crc of the parameter in the mouse parameter library |
| vid           | im hardware vid                  | -                                                                |
| pid           | im hardware pid                  | -                                                                |
| uid           | im hardware id                   | -                                                                |
| gname         | Group Name                       | -                                                                |
| imgw          | Actual image width               | -                                                                |
| imgh          | Actual picture height            | -                                                                |
| air\_ratio    | Screen projection resolution     | 0Use global settings                                             |
| air\_refresh  | Screen refresh rate              | 0Use global settings                                             |
| air\_fps      | Screen projection frame rate     | 0Use global settings                                             |
| air\_img\_fps | Cast image conversion frame rate | 0Use global settings                                             |
| air\_audio    | Screen projection sound status   | 0Use global settings                                             |
| uver          | Hardware version                 | -                                                                |

## 2.Get group list

### Calling <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type   | illustrate        | Remark                                                                                                                |
| --------- | ------ | ----------------- | --------------------------------------------------------------------------------------------------------------------- |
| fun       | String | /device/group/get | Request function name                                                                                                 |
| id        | String | Group ID          | Get the specified group. Multiple groups are separated by commas. Without this parameter, all groups can be obtained. |

* **httpGet request example**

Get a list of all groupings

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/group/get'
```

Get the specified group

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/group/get?id=1012519501'
```

* **httpPost request example**

Get a list of all groupings

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/group/get
```

Get the specified group

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/group/get \
  --form id=1012519501
```

* **httpPost json request example \[websocket can also send the same json request]**

Get a list of all groupings

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/group/get",
    "data": {
       
    }
}'
```

Get the specified group

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/group/get",
    "data": {
         "id": "1012519501"
    }
}'
```

### Response <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
  {
  "data": {
    "list": [
      {
        "id": "223347827",
        "name": "test0"
      },
      {
        "id": "223347853",
        "name": "test1"
      },
      {
        "id": "223347870",
        "name": "test2"
      }
    ],
    "code": 0,
    "id": "",
    "message": "success"
  },
  "status": 200,
  "message": "success",
  "msgid": 0,
  "fun": "/device/group/get"
}
```

* **Response data data field description**\
  list array records the obtained groups.

| Fields | illustrate | Remark |
| ------ | ---------- | ------ |
| id     | Group id   | -      |
| name   | Group Name | -      |

## 3.Get the devices in the group

### Calling  <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type   | illustrate            | Remark                   |
| --------- | ------ | --------------------- | ------------------------ |
| fun       | String | /device/group/get-dev | Request function name    |
| id        | String | Group id              | 0 is an ungrouped device |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/group/get-dev?id=0'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/group/get-dev \
  --form id=1000630707
```

* **httpPost json request example \[websocket can also send the same json request]**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/group/get-dev",
    "data": {
    "id":"0"
    }
}'
```

### Response <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
  {
  "data": {
    "list": [
      {
        "air_handle": 0,
        "air_pid": 0,
        "rotate": 0,
        "state": 0,
        "imgw": 460,
        "imgh": 818,
        "gid": 0,
        "name": "01号机",
        "srv_name": "投屏1",
        "width": "375",
        "height": "667",
        "ip": "192.168.0.27",
        "mac": "4A:E7:E4:DA:45:13",
        "user_name": "iPhone",
        "version": "15.7.2",
        "model": "iPhone8,1",
        "deviceid": "DC:2B:2A:14:2A:F6",
        "device_name": "iPhone 6s",
        "location": "",
        "location_crc": "B0DBD800",
        "vid": "720A",
        "pid": "239E",
        "uid": "1F22C3BD",
        "gname": "未分组"
      }
    ],
    "code": 0,
    "id": "DC:2B:2A:14:2A:F6",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/group/get-dev"
}
```

* **Response data data field description**\
  list array records the acquired devices.

| Fields        | illustrate                     | Remark                                                           |
| ------------- | ------------------------------ | ---------------------------------------------------------------- |
| rotate        | Screen angle                   | 0 vertical screen, 1 horizontal screen                           |
| state         | Device Status                  | 0 is not online, non-0 is online                                 |
| gid           | Group id                       | -                                                                |
| name          | Custom name                    | -                                                                |
| srv\_name     | Current connection screen name | -                                                                |
| width         | Screen width                   | Physical size                                                    |
| height        | Screen height                  | Physical size                                                    |
| ip            | The device's own IP address    | -                                                                |
| Mac           | The device's own MAC address   | -                                                                |
| user\_name    | Username                       | The name of the phone's settings                                 |
| version       | System version                 | -                                                                |
| model         | Internal Model                 | -                                                                |
| deviceid      | Device unique id               | -                                                                |
| device\_name  | Device Name                    | -                                                                |
| location      | Mouse parameters               | -                                                                |
| location\_crc | Mouse parameters crc           | Point to the crc of the parameter in the mouse parameter library |
| vid           | im hardware vid                | -                                                                |
| pid           | im hardware pid                | -                                                                |
| uid           | im hardware id                 | -                                                                |
| gname         | Group Name                     | -                                                                |

## 4.Setting up the device

### Calling

* **Request Parameters**

| parameter     | type   | illustrate           | Remark                                                                                                      |
| ------------- | ------ | -------------------- | ----------------------------------------------------------------------------------------------------------- |
| fun           | String | /device/set          | Request function name                                                                                       |
| id            | String | Device unique ID     | You need to set the device id, separate multiple devices with commas                                        |
| name          | String | Custom Name          | -                                                                                                           |
| vid           | String | im hardware vid      | The pid and hardware id must be set at the same time. Setting the hardware id can only set a single device. |
| pid           | String | im hardware pid      | and vid must be set at the same time                                                                        |
| location      | String | Mouse parameters     | -                                                                                                           |
| location\_crc | String | Mouse parameters crc | -                                                                                                           |
| gid           | String | Group id             | -                                                                                                           |

There are two parameters: mouse parameter and mouse parameter crc. Only one of them is needed. It is recommended to use location\_crc

Mouse parameters\
iMouse hardware adapts to different models of mobile phones through different mouse parameters, and users can collect them themselves

The mouse parameter crc\
has collected the crc value of the corresponding parameter in the mouse parameter library

* **httpGet request example**

Set a custom device name

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/set?id=9A:97:4E:C9:54:71&name=test002'
```

Setting up custom device names and groups simultaneously

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/set?id=9A:97:4E:C9:54:71&name=test001&gid=0'
```

* **httpPost request example**

Set a custom device name

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/set \
    --form id=9A:97:4E:C9:54:71 \
    --form name=test002
```

Setting up custom device names and groups simultaneously

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/set \
  --form id=9A:97:4E:C9:54:71 \
    --form name=test001 \
    --form gid=0
```

* **httpPost json request example \[websocket can also send the same json request]**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/set",
    "data": {
    "id": "90:81:58:EE:D1:9E",
    "name": "test002"
    }
}'
```

Setting up custom device names and groups simultaneously

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/set",
    "data": {
        "id": "90:81:58:EE:D1:9E",
        "name": "test002",
        "gid": "0"
    }
}'
```

### Response <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
  {
  "data": {
    "list": [
      "90:81:58:EE:D1:9E"
    ],
    "code": 0,
    "id": "90:81:58:EE:D1:9E",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/set"
}
```

* **Response data Data field description**\
  list array Returns the unique ID of all successfully set devices

## 5.Deleting a device

### Calling <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type   | illustrate       | Remark                                                                       |
| --------- | ------ | ---------------- | ---------------------------------------------------------------------------- |
| fun       | String | /device/del      | Request function name                                                        |
| id        | String | Device unique ID | The device ID needs to be deleted. Multiple devices are separated by commas. |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/del?id=90:81:58:EE:D1:9E,DC:2B:2A:14:2A:F6'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/del \
    --form id=90:81:58:EE:D1:9E,DC:2B:2A:14:2A:F6
```

* **httpPost json request example \[websocket can also send the same json request]**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/del",
    "data": {
    "id": "90:81:58:EE:D1:9E,DC:2B:2A:14:2A:F6"
    }
}'
```

### Response  <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
  {
  "data": {
    "list": [
      "90:81:58:EE:D1:9E"
    ],
    "code": 0,
    "id": "90:81:58:EE:D1:9E,DC:2B:2A:14:2A:F6",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/del"
}
```

* **Response data Data field description**\
  list array Returns the unique ID of all successfully deleted devices

## 6.Set up grouping

### Calling <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type   | illustrate        | Remark                                   |
| --------- | ------ | ----------------- | ---------------------------------------- |
| fun       | String | /device/group/set | Request function name                    |
| id        | String | Group id          | Filling 0 in id means adding a new group |
| name      | String | Group Name        | -                                        |

* **httpGet request example**

Add a new group

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/group/set?id=0&name=g1'
```

Set the specified id group name

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/group/set?id=1000630707&name=g3'
```

* **httpPost request example**

Add a new group

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/group/set \
    --form id=0 \
    --form name=g2
```

Set the specified id group name

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/group/set \
  --form id=222440499 \
    --form name=test001 
```

* **httpPost json request example \[websocket can also send the same json request]**

Add a new group

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/group/set",
    "data": {
    "id": "0",
    "name": "xxx"
    }
}'
```

Set the specified id group name

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/group/set",
    "data": {
        "id": "222440499",
        "name": "test002"
    }
}'
```

### Response <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
 {
  "data": {
    "list": [
      {
        "id": "1194219924",
        "name": "1111"
      }
    ],
    "code": 0,
    "id": "0",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "\/device\/group\/set"
}
```

* **Response data field description**

| Fields | illustrate | Remark |
| ------ | ---------- | ------ |
| id     | Group id   | -      |
| name   | Group Name | -      |

## 7.Delete a group

### Calling <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type   | illustrate        | Remark                                   |
| --------- | ------ | ----------------- | ---------------------------------------- |
| fun       | String | /device/group/del | Request function name                    |
| id        | String | Group ID          | Multiple groups are separated by commas. |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/group/del?id=1145527833,1145533497'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/group/del \
    --form id=34343488,2323233
```

* **httpPost json request example \[websocket can also send the same json request]**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/group/del",
    "data": {
    "id": "34343488,2323233"
    }
}'
```

### Response <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
{
  "data": {
    "list": [
      "1145527833",
      "1145533497"
    ],
    "code": 0,
    "id": "1145527833,1145533497",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/group/del"
}
```

* **Response data Data field description**\
  list array returns the IDs of all groups that have been successfully deleted

## 8.Set device screen projection configuration

### Calling <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter     | type    | illustrate                       | Remark                                                               |
| ------------- | ------- | -------------------------------- | -------------------------------------------------------------------- |
| fun           | String  | /device/airplay/set              | Request function name                                                |
| id            | String  | Device unique ID                 | You need to set the device id, separate multiple devices with commas |
| air\_ratio    | Integer | Screen projection resolution     | -                                                                    |
| air\_refresh  | Integer | Screen refresh rate              | -                                                                    |
| air\_fps      | Integer | Screen projection frame rate     | -                                                                    |
| air\_audio    | Integer | Screen projection sound          | -                                                                    |
| air\_img\_fps | Integer | Cast image conversion frame rate | -                                                                    |

If not set or set to 0, the screen projection will be disconnected immediately after the global parameter setting is used, and will take effect after the next screen projection.

* **httpGet request example**

Set the screen mirroring frame rate

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/airplay/set?id=9A:97:4E:C9:54:71&air_fps=0'
```

* **httpPost request example**

Set the screen mirroring frame rate

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/airplay/set \
    --form id=9A:97:4E:C9:54:71 \
    --form air_fps=15
```

* **httpPost json request example \[websocket can also send the same json request]**

Set the screen mirroring frame rate

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/airplay/set",
    "data": {
    "id": "90:81:58:EE:D1:9E",
    "air_fps":15
    }
}'
```

### Response <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
  {
  "data": {
    "code": 0,
    "id": "90:81:58:EE:D1:9E",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/airplay/set"
}
```

* **Response data data field description**\
  None

## 9.Connect to screen projection

### Calling <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type   | illustrate              | Remark                                                                |
| --------- | ------ | ----------------------- | --------------------------------------------------------------------- |
| fun       | String | /device/airplay/connect | Request function name                                                 |
| id        | String | Device unique ID        | Screen projection device id, multiple devices are separated by commas |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/airplay/connect?id=1C:5C:F2:E9:AB:3C'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/airplay/connect \
    --form id=1C:5C:F2:E9:AB:3C
```

* **httpPost json request example \[websocket can also send the same json request]**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/airplay/connect",
    "data": {
    "id": "1C:5C:F2:E9:AB:3C"
    }
}'
```

### Response <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
  {
  "data": {
    "code": 0,
    "id": "90:81:58:EE:D1:9E",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/airplay/connect"
}
```

* **Response data data field description**\
  None

## 10.Cast All

### Calling <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type   | illustrate                  | Remark                |
| --------- | ------ | --------------------------- | --------------------- |
| fun       | String | /device/airplay/connect/all | Request function name |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/airplay/connect/all'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/airplay/connect/all
```

* **httpPost json request example \[websocket can also send the same json request]**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/airplay/connect/all",
    "data": {
    }
}'
```

### Response <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
  {
  "data": {
    "code": 0,
    "id": "90:81:58:EE:D1:9E",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/airplay/connect/all"
}
```

* **Response data data field description**\
  None

## 11.Disconnect Screen Mirroring

### Calling <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type   | illustrate                 | Remark                                              |
| --------- | ------ | -------------------------- | --------------------------------------------------- |
| fun       | String | /device/airplay/disconnect | Request function name                               |
| id        | String | Device unique ID           | Device id, multiple devices are separated by commas |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/airplay/disconnect?id=1C:5C:F2:BC:D0:CC'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/airplay/disconnect \
    --form id=90:81:58:EE:D1:9E
```

* **httpPost json request example \[websocket can also send the same json request]**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/airplay/disconnect",
    "data": {
    "id": "90:81:58:EE:D1:9E"
    }
}'
```

### Response <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
  {
  "data": {
    "code": 0,
    "id": "90:81:58:EE:D1:9E",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/airplay/disconnect"
}
```

* **Response data data field description**\
  None

## 12.Mouse parameter collection

### Calling <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type    | illustrate               | Remark                                                              |
| --------- | ------- | ------------------------ | ------------------------------------------------------------------- |
| fun       | String  | /device/collection/mouse | Request function name                                               |
| id        | String  | Device unique ID         | Device id, multiple devices are separated by commas                 |
| cmd       | Integer | Order                    | 0 Query the collection status, 1 Start collection 2 Stop collection |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/collection/mouse?id=1C:5C:F2:BC:D0:CC&cmd=0'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/collection/mouse \
    --form id=90:81:58:EE:D1:9E \
    --form cmd=0
```

* **httpPost json request example \[websocket can also send the same json request]**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/collection/mouse",
    "data": {
    "id": "90:81:58:EE:D1:9E",
    "cmd": 0
    }
}'
```

### Response <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
  {
  "data": {
    "code": 0,
    "id": "90:81:58:EE:D1:9E",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/collection/mouse"
}
```

* **Response data data field description**\
  None

## 13.Save mouse parameters to the public library

### Calling <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type   | illustrate                    | Remark                |
| --------- | ------ | ----------------------------- | --------------------- |
| fun       | String | /device/collection/mouse/save | Request function name |
| id        | String | Device unique ID              | Device ID             |
| describe  | String | Remark                        |                       |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/collection/mouse/save?id=1C:5C:F2:BC:D0:CC&describe=test'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/collection/mouse/save \
  --form id=90:81:58:EE:D1:9E \
  --form describe=test
```

* **httpPost json request example \[websocket can also send the same json request]**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/collection/mouse/save",
    "data": {
    “id”:“90:81:58:EE:D1:9E”,
    "describe": "test"
    }
}'
```

### Response <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
  {
  "data": {
    "code": 0,
    "id": "90:81:58:EE:D1:9E",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/collection/mouse"
}
```

* **Response data data field description**\
  None

## 14.Restart Device

### Calling  <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type   | illustrate       | Remark                                              |
| --------- | ------ | ---------------- | --------------------------------------------------- |
| fun       | String | /device/restart  | Request function name                               |
| id        | String | Device unique ID | Device id, multiple devices are separated by commas |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/collection/mouse/save?id=1C:5C:F2:BC:D0:CC'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/collection/mouse/save \
  --form id=90:81:58:EE:D1:9E
```

* **httpPost json request example \[websocket can also send the same json request]**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/collection/mouse/save",
    "data": {
    "id": "90:81:58:EE:D1:9E"
    }
}'
```

### Response  <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
    {
  "data": {
    "code": 0,
    "id": "90:81:58:EE:D1:9E",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/restart"
}
```

* **Response data data field description**\
  None

## 15.Restart usb

### Calling  <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type   | illustrate          | Remark                                                             |
| --------- | ------ | ------------------- | ------------------------------------------------------------------ |
| fun       | String | /device/usb/restart | Request function name                                              |
| id        | String | vid\|pid            | For example, 720D\|F735, multiple devices are separated by commas. |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/usb/restart?id=720D|F735'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/usb/restart \
  --form id=720D\|F735
```

* **httpPost json request example \[websocket can also send the same json request]**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/usb/restart,
    "data": {
    "id": "720D|F735"
    }
}'
```

### Response  <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
   {
  "data": {
    "code": 0,
    "id": "720D|F735",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/usb/restart"
}
```

* **Response data data field description**\
  None

## 16.Set the device list sorting

### Calling  <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter   | type    | illustrate       | Remark                                                                             |
| ----------- | ------- | ---------------- | ---------------------------------------------------------------------------------- |
| fun         | String  | /device/sort/set | The device list and console list you get will be sorted according to your settings |
| sort\_index | Integer | Sorting Index    | This id corresponds to the console header list, starting from 1                    |
| sort\_value | Integer | Sort id values   | 0 unsorted, -1 up, 1 down                                                          |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/sort/set?sort_index=1&sort_value=-1'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/sort/set \
  --form sort_index=1
  --form sort_value=1
```

* **httpPost json request example \[websocket can also send the same json request]**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/sort/set",
    "data": {
        "sort_index": 1,
        "sort_value": 1
    }
}'
```

### Response  <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
{
  "data": {
    "code": 0,
    "id": "",
    "sort_index": 1,
    "sort_value": 1,
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/sort/set"
}
```

* **Response data field description**

| Fields      | illustrate     | Remark                                                          |
| ----------- | -------------- | --------------------------------------------------------------- |
| sort\_index | Sorting Index  | This id corresponds to the console header list, starting from 1 |
| sort\_value | Sort id values | 0 unsorted, -1 up, 1 down                                       |

## 17.Get the device list sort

### Calling  <a href="#diao-yong-shuo-ming" id="diao-yong-shuo-ming"></a>

* **Request Parameters**

| parameter | type   | illustrate       | Remark                                        |
| --------- | ------ | ---------------- | --------------------------------------------- |
| fun       | String | /device/sort/get | Get the sort order of the current device list |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/device/sort/get'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'content-type: multipart/form-data' \
  --form fun=/device/sort/get
```

* **httpPost json request example \[websocket can also send the same json request]**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header 'Content-Type: application/json' \
  --data '{
    "fun": "/device/sort/get",
    "data": {

    }
}'
```

### Response  <a href="#xiang-ying-jie-guo" id="xiang-ying-jie-guo"></a>

```
{
  "data": {
    "code": 0,
    "id": "",
    "sort_index": 1,
    "sort_value": 1,
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/device/sort/get"
}
```

* **Response data field description**

| Fields      | illustrate     | Remark                                                          |
| ----------- | -------------- | --------------------------------------------------------------- |
| sort\_index | Sorting Index  | This id corresponds to the console header list, starting from 1 |
| sort\_value | Sort id values | 0 unsorted, -1 up, 1 down                                       |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.some3c.com/iphone-farm-setup/xp-api-documentation/equipment-related.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
