# Shortcuts

## 1.Get album list

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

* **Request Parameters**

| parameter   | type    | illustrate                | Remark                                                                     |
| ----------- | ------- | ------------------------- | -------------------------------------------------------------------------- |
| fun         | String  | /shortcut/album/get       | Request function name                                                      |
| id          | String  | Device ID                 | Multiple is not allowed                                                    |
| album\_name | String  | Album Name                | Leave it blank to get the photo album of the most recent project.          |
| num         | Integer | Get the number of entries | Default 10                                                                 |
| outtime     | Boolean | Timeout                   | The timeout for returning data, in milliseconds, the default is 15 seconds |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/album/get?id=6C:8D:C1:67:04:29'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/album/get" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "num=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": "/shortcut/album/get",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "num": 5,
          "outtime": 10000
     }
}'
```

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

```
{
  "data": {
    "list": [
      {
        "album_name": "",
        "name": "RPReplay_Final1718703292",
        "ext": "mp4",
        "size": "5.4 MB",
        "create_time": "2024-12-18 23:54:08"
      }
    ],
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/shortcut/album/get"
}
```

* **Response data Data field description**\
  list returns a list of all acquired photos

| Fields       | illustrate    | Remark                         |
| ------------ | ------------- | ------------------------------ |
| album\_name  | Album Name    | Which album does it belong to? |
| name         | file name     | -                              |
| ext          | Extension     | -                              |
| size         | File size     | -                              |
| create\_time | Creation time | -                              |

## 2.Upload photos and videos

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

* **Request Parameters**

| parameter   | type         | illustrate                        | Remark                                                                                                      |
| ----------- | ------------ | --------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| fun         | String       | /shortcut/album/upload            | Request function name                                                                                       |
| id          | String       | Device ID                         | Separate multiple devices with commas                                                                       |
| album\_name | String       | Album Name                        | If left blank, it means the most recent project                                                             |
| zip         | Integer      | 0: no compression, 1: compression | No compression by default. If you are transferring many small images at a time, compression is recommended. |
| files       | String Array | List of paths to upload files     | -                                                                                                           |
| outtime     | Boolean      | Timeout                           | The timeout for returning data, in milliseconds, the default is 15 seconds                                  |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/album/upload?id=6C:8D:C1:67:04:29&files=%5B%22D%3A%5C%5CiMouseXP%5C%5CScreenshot%5C%5C1.bmp%22%5D'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/album/upload" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "files=[\"D:\\\iMouseXP\\\Screenshot\\\1.bmp\"]"
```

* **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": "/shortcut/album/upload",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "files": [
               "D:\\iMouseXP\\Screenshot\\1.bmp"
          ]
     }
}'
```

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

```
{
  "data": {
    "list": [
      {
        "album_name": "",
        "name": "RPReplay_Final1718703292",
        "ext": "mp4",
        "size": "5.4 MB",
        "create_time": "2024-12-18 23:54:08"
      }
    ],
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/shortcut/album/upload"
}
```

* **Response data data field description**\
  Returns the 10 records of the latest album list

| Fields       | illustrate    | Remark                         |
| ------------ | ------------- | ------------------------------ |
| album\_name  | Album Name    | Which album does it belong to? |
| name         | file name     | -                              |
| ext          | Extension     | -                              |
| size         | File size     | -                              |
| create\_time | Creation time | -                              |

## 3.Download photos and videos

After successful download, the file is saved in the iMouse installation directory\Shortcut\Media

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

* **Request Parameters**

| parameter | type              | illustrate                        | Remark                                                                                                      |
| --------- | ----------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| fun       | String            | /shortcut/album/down              | Request function name                                                                                       |
| id        | String            | Device ID                         | Multiple is not allowed                                                                                     |
| zip       | Integer           | 0: no compression, 1: compression | No compression by default. If you are transferring many small images at a time, compression is recommended. |
| outtime   | Boolean           | Timeout                           | The timeout for returning data, in milliseconds, the default is 15 seconds                                  |
| list      | json object array | List to download                  | -                                                                                                           |

Parameter description of json object array in list:

| parameter   | type   | illustrate | Remark                                          |
| ----------- | ------ | ---------- | ----------------------------------------------- |
| album\_name | String | Album Name | If left blank, it means the most recent project |
| name        | String | file name  | -                                               |
| ext         | String | Extension  | -                                               |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/album/down?id=6C:8D:C1:67:04:29&list=%5B%7B%22album_name%22%3A%20%22%22%2C%20%22name%22%3A%20%221%22%2C%20%22ext%22%3A%20%22bmp%22%7D%5D'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/album/down" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "list=[{\"album_name\":\"\",\"name\":\"1\",\"ext\":\"bmp\"}]"
```

* **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": "/shortcut/album/down",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "list": [{"album_name": "","name": "1","ext": "bmp"}]
     }
}'
```

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

```
{
  "data": {
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 15,
  "fun": "/shortcut/album/down"
}
```

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

## 4.Delete photos and videos

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

* **Request Parameters**

| parameter | type              | illustrate          | Remark                                                                     |
| --------- | ----------------- | ------------------- | -------------------------------------------------------------------------- |
| fun       | String            | /shortcut/album/del | Request function name                                                      |
| id        | String            | Device ID           | Separate multiple devices with commas                                      |
| outtime   | Boolean           | Timeout             | The timeout for returning data, in milliseconds, the default is 15 seconds |
| list      | json object array | List to be deleted  | -                                                                          |

Parameter description of json object array in list:

| parameter   | type   | illustrate | Remark                                          |
| ----------- | ------ | ---------- | ----------------------------------------------- |
| album\_name | String | Album Name | If left blank, it means the most recent project |
| name        | String | file name  | -                                               |
| ext         | String | Extension  | -                                               |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/album/del?id=6C:8D:C1:67:04:29&list=%5B%7B%22album_name%22%3A%20%22%22%2C%20%22name%22%3A%20%221%22%2C%20%22ext%22%3A%20%22bmp%22%7D%5D'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/album/del" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "list=[{\"album_name\":\"\",\"name\":\"1\",\"ext\":\"bmp\"}]"
```

* **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": "/shortcut/album/del",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "list": [{"album_name": "","name": "1","ext": "bmp"}]
     }
}'
```

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

```
{
  "data": {
    "list": [
      {
        "album_name": "",
        "name": "RPReplay_Final1718703292",
        "ext": "mp4",
        "size": "5.4 MB",
        "create_time": "2024-12-18 23:54:08"
      }
    ],
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/shortcut/album/del"
}
```

* **Response data data field description**\
  Returns the 10 records of the latest album list

## 5.Clear photos and videos

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

* **Request Parameters**

| parameter   | type    | illustrate            | Remark                                                                     |
| ----------- | ------- | --------------------- | -------------------------------------------------------------------------- |
| fun         | String  | /shortcut/album/clear | Request function name                                                      |
| id          | String  | Device ID             | Separate multiple devices with commas                                      |
| album\_name | String  | Album Name            | If left blank, it means the most recent project                            |
| outtime     | Boolean | Timeout               | The timeout for returning data, in milliseconds, the default is 15 seconds |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/album/clear?id=6C:8D:C1:67:04:29'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/album/clear" \
  --form "id=6C:8D:C1:67:04:29"
```

* **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": "/shortcut/album/clear",
     "data": {
          "id": "6C:8D:C1:67:04:29"
     }
}'
```

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

```
{
  "data": {
    "list": [
      {
        "album_name": "",
        "name": "RPReplay_Final1718703292",
        "ext": "mp4",
        "size": "5.4 MB",
        "create_time": "2024-12-18 23:54:08"
      }
    ],
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/shortcut/album/clear"
}
```

* **Response data data field description**\
  Returns the 10 records of the latest album list

## 6.Get a list of files

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

The file function is only supported by iOS 15 and above

* **Request Parameters**

| parameter | type    | illustrate         | Remark                                                                     |
| --------- | ------- | ------------------ | -------------------------------------------------------------------------- |
| fun       | String  | /shortcut/file/get | Request function name                                                      |
| id        | String  | Device ID          | Multiple is not allowed                                                    |
| path      | String  | path               | The default is my iPhone root directory                                    |
| outtime   | Boolean | Timeout            | The timeout for returning data, in milliseconds, the default is 15 seconds |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/file/get?id=6C:8D:C1:67:04:29'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/file/get" \
  --form "id=6C:8D:C1:67:04:29"
```

* **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": "/shortcut/file/get",
     "data": {
          "id": "6C:8D:C1:67:04:29"
     }
}'
```

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

```
{
  "data": {
    "list": [
      {
        "name": "test",
        "ext": "bmp",
        "size": "7 KB",
        "create_time": "2024-10-07 15:12:09"
      }
    ],
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/shortcut/file/get"
}
```

* **Response data Data field description**\
  list returns a list of all acquired photos

| Fields       | illustrate    | Remark                         |
| ------------ | ------------- | ------------------------------ |
| album\_name  | Album Name    | Which album does it belong to? |
| name         | file name     | -                              |
| ext          | Extension     | -                              |
| size         | File size     | -                              |
| create\_time | Creation time | -                              |

## 7.Upload files

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

The file function is only supported by iOS 15 and above

* **Request Parameters**

| parameter | type         | illustrate                        | Remark                                                                                                     |
| --------- | ------------ | --------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| fun       | String       | /shortcut/file/upload             | Request function name                                                                                      |
| id        | String       | Device ID                         | Separate multiple devices with commas                                                                      |
| path      | String       | path                              | The default is my iPhone root directory                                                                    |
| zip       | Integer      | 0: no compression, 1: compression | No compression by default. If you are transferring many small files at a time, compression is recommended. |
| files     | String Array | List of uploaded files            | -                                                                                                          |
| outtime   | Boolean      | Timeout                           | The timeout for returning data, in milliseconds, the default is 15 seconds                                 |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/file/upload?id=6C:8D:C1:67:04:29&files=%5B%22D%3A%5C%5CiMouseXP%5C%5CScreenshot%5C%5C1.bmp%22%5D'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/file/upload" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "files=[\"D:\\\iMouseXP\\\Screenshot\\\1.bmp\"]"
```

* **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": "/shortcut/file/upload",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "files": [
               "D:\\iMouseXP\\Screenshot\\1.bmp"
          ]
     }
}'
```

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

```
{
  "data": {
    "list": [
      {
        "name": "1",
        "ext": "bmp",
        "size": "5.4 MB",
        "create_time": "2024-12-18 23:54:08"
      }
    ],
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/shortcut/file/upload"
}
```

* **Response data data field description**\
  Returns the 10 records of the latest file directory list

| Fields       | illustrate    | Remark |
| ------------ | ------------- | ------ |
| name         | file name     | -      |
| ext          | Extension     | -      |
| size         | File size     | -      |
| create\_time | Creation time | -      |

## 8.Download File

The file function is only supported by iOS 15 and above. After successful download, the file is saved in the iMouse installation directory\Shortcut\File

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

* **Request Parameters**

| parameter | type              | illustrate                        | Remark                                                                                                     |
| --------- | ----------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| fun       | String            | /shortcut/file/down               | Request function name                                                                                      |
| id        | String            | Device ID                         | Multiple is not allowed                                                                                    |
| path      | String            | path                              | The default is my iPhone root directory                                                                    |
| zip       | Integer           | 0: no compression, 1: compression | No compression by default. If you are transferring many small files at a time, compression is recommended. |
| list      | json object array | -                                 | -                                                                                                          |
| outtime   | Boolean           | Timeout                           | The timeout for returning data, in milliseconds, the default is 15 seconds                                 |

Parameter description of json object array in list:

| parameter | type   | illustrate | Remark |
| --------- | ------ | ---------- | ------ |
| name      | String | file name  | -      |
| ext       | String | Extension  | -      |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/file/down?id=6C:8D:C1:67:04:29&list=%5B%7B%22name%22%3A%221%22%2C%22ext%22%3A%22bmp%22%7D%5D'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/file/down" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "list=[{\"name\":\"1\",\"ext\":\"bmp\"}]"
```

* **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": "/shortcut/file/down",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "list":[{"name":"1","ext":"bmp"}]
     }
}'
```

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

```
{
  "data": {
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 36,
  "fun": "/shortcut/file/down"
}
```

* **Response data data field description**\
  Returns the 10 records of the latest album list

| Fields       | illustrate    | Remark                         |
| ------------ | ------------- | ------------------------------ |
| album\_name  | Album Name    | Which album does it belong to? |
| name         | file name     | -                              |
| ext          | Extension     | -                              |
| size         | File size     | -                              |
| create\_time | Creation time | -                              |

## 9.Deleting Files

The file function is only supported by iOS 15 and above

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

* **Request Parameters**

| parameter | type              | illustrate              | Remark                                                                     |
| --------- | ----------------- | ----------------------- | -------------------------------------------------------------------------- |
| fun       | String            | /shortcut/file/del      | Request function name                                                      |
| id        | String            | Device ID               | Separate multiple devices with commas                                      |
| path      | String            | path                    | The default is my iPhone root directory                                    |
| list      | json object array | List of files to delete | -                                                                          |
| outtime   | Boolean           | Timeout                 | The timeout for returning data, in milliseconds, the default is 15 seconds |

Parameter description of json object array in list:

| parameter | type   | illustrate | Remark |
| --------- | ------ | ---------- | ------ |
| name      | String | file name  | -      |
| ext       | String | Extension  | -      |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/file/del?id=6C:8D:C1:67:04:29&list=%5B%7B%22name%22%3A%221%22%2C%22ext%22%3A%22bmp%22%7D%5D'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/file/del" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "list=[{\"name\":\"1\",\"ext\":\"bmp\"}]"
```

* **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": "/shortcut/file/del",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "list":[{"name":"1","ext":"bmp"}]
     }
}'
```

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

```
{
  "data": {
    "list": [
      {
        "name": "2",
        "ext": "bmp",
        "size": "5.4 MB",
        "create_time": "2024-12-18 23:54:08"
      }
    ],
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 0,
  "fun": "/shortcut/file/del"
}
```

* **Response data data field description**\
  Returns the 10 records of the latest file directory list

| Fields       | illustrate    | Remark |
| ------------ | ------------- | ------ |
| name         | file name     | -      |
| ext          | Extension     | -      |
| size         | File size     | -      |
| create\_time | Creation time | -      |

## 10.To the phone clipboard

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

* **Request Parameters**

| parameter | type    | illustrate              | Remark                                                                                                                                        |
| --------- | ------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| fun       | String  | /shortcut/clipboard/set | Request function name                                                                                                                         |
| id        | String  | Device ID               | Separate multiple devices with commas                                                                                                         |
| sleep     | Integer | Delayed return          | The unit is seconds. Generally, there is no need to delay. However, on some mobile phones, it may take a while for the paste to be effective. |
| text      | String  | Text to send            |                                                                                                                                               |
| outtime   | Boolean | Timeout                 | The timeout for returning data, in milliseconds, the default is 15 seconds                                                                    |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/clipboard/set?id=6C:8D:C1:67:04:29&text=aaa'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/clipboard/set" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "text=aaa"
```

* **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": "/shortcut/clipboard/set",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "text":"aaa"
     }
}'
```

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

```
{
  "data": {
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 38,
  "fun": "/shortcut/clipboard/set"
}
```

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

## 11.Get the phone clipboard

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

* **Request Parameters**

| parameter | type    | illustrate              | Remark                                                                     |
| --------- | ------- | ----------------------- | -------------------------------------------------------------------------- |
| fun       | String  | /shortcut/clipboard/get | Request function name                                                      |
| id        | String  | Device ID               | Multiple is not allowed                                                    |
| outtime   | Boolean | Timeout                 | The timeout for returning data, in milliseconds, the default is 15 seconds |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/clipboard/get?id=6C:8D:C1:67:04:29'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/clipboard/get" \
  --form "id=6C:8D:C1:67:04:29"
```

* **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": "/shortcut/clipboard/get",
     "data": {
          "id": "6C:8D:C1:67:04:29"
     }
}'
```

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

```
{
  "data": {
    "text": "aaa",
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 38,
  "fun": "/shortcut/clipboard/get"
}
```

* **Response data field description**\
  text contains the obtained text

## 12.Open URL

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

* **Request Parameters**

| parameter | type    | illustrate         | Remark                                                                     |
| --------- | ------- | ------------------ | -------------------------------------------------------------------------- |
| fun       | String  | /shortcut/exec/url | Request function name                                                      |
| id        | String  | Device ID          | Separate multiple devices with commas                                      |
| url       | String  | -                  |                                                                            |
| outtime   | Boolean | Timeout            | The timeout for returning data, in milliseconds, the default is 15 seconds |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/exec/url?id=6C:8D:C1:67:04:29&url=www.baidu.com'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/exec/url" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "url=www.baidu.com"
```

* **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": "/shortcut/exec/url",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "url":"www.baidu.com"
     }
}'
```

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

```
{
  "data": {
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 38,
  "fun": "/shortcut/exec/url"
}
```

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

## 13.Turn off restart device

This feature is only supported on iOS 15 and above.

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

* **Request Parameters**

| parameter | type    | illustrate              | Remark                                                                     |
| --------- | ------- | ----------------------- | -------------------------------------------------------------------------- |
| fun       | String  | /shortcut/switch/device | Request function name                                                      |
| id        | String  | Device ID               | Separate multiple devices with commas                                      |
| state     | Integer | 0 shutdown, 1 restart   |                                                                            |
| outtime   | Boolean | Timeout                 | The timeout for returning data, in milliseconds, the default is 15 seconds |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/switch/device?id=6C:8D:C1:67:04:29&state=0'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/switch/device" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "state=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": "/shortcut/switch/device",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "state":"0"
     }
}'
```

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

```
{
  "data": {
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 38,
  "fun": "/shortcut/switch/device"
}
```

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

## 14.Brightness adjustment

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

* **Request Parameters**

| parameter | type                   | illustrate            | Remark                                                                     |
| --------- | ---------------------- | --------------------- | -------------------------------------------------------------------------- |
| fun       | String                 | /shortcut/switch/bril | Request function name                                                      |
| id        | String                 | Device ID             | Separate multiple devices with commas                                      |
| state     | Floating point numbers | Brightness value      | Greater than 0 and less than 1                                             |
| outtime   | Boolean                | Timeout               | The timeout for returning data, in milliseconds, the default is 15 seconds |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/switch/bril?id=6C:8D:C1:67:04:29&state=0.1'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/switch/bril" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "state=0.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": "/shortcut/switch/bril",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "state":0.1
     }
}'
```

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

```
{
  "data": {
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 38,
  "fun": "/shortcut/switch/bril"
}
```

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

## 15.Switch Flashlight

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

* **Request Parameters**

| parameter | type    | illustrate             | Remark                                                                     |
| --------- | ------- | ---------------------- | -------------------------------------------------------------------------- |
| fun       | String  | /shortcut/switch/torch | Request function name                                                      |
| id        | String  | Device ID              | Separate multiple devices with commas                                      |
| state     | Integer | 0 closed, 1 open       |                                                                            |
| outtime   | Boolean | Timeout                | The timeout for returning data, in milliseconds, the default is 15 seconds |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/switch/torch?id=6C:8D:C1:67:04:29&state=0'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/switch/torch" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "state=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": "/shortcut/switch/torch",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "state":0
     }
}'
```

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

```
{
  "data": {
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 38,
  "fun": "/shortcut/switch/torch"
}
```

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

## 16.Switch airplane mode

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

* **Request Parameters**

| parameter | type    | illustrate              | Remark                                                                     |
| --------- | ------- | ----------------------- | -------------------------------------------------------------------------- |
| fun       | String  | /shortcut/switch/flight | Request function name                                                      |
| id        | String  | Device ID               | Separate multiple devices with commas                                      |
| state     | Integer | 0 closed, 1 open        |                                                                            |
| outtime   | Boolean | Timeout                 | The timeout for returning data, in milliseconds, the default is 15 seconds |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/switch/flight?id=6C:8D:C1:67:04:29&state=0'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/switch/flight" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "state=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": "/shortcut/switch/flight",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "state":0
     }
}'
```

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

```
{
  "data": {
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 38,
  "fun": "/shortcut/switch/flight"
}
```

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

## 17.Switch Cellular Data On or Off

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

* **Request Parameters**

| parameter | type    | illustrate            | Remark                                                                     |
| --------- | ------- | --------------------- | -------------------------------------------------------------------------- |
| fun       | String  | /shortcut/switch/cdpd | Request function name                                                      |
| id        | String  | Device ID             | Separate multiple devices with commas                                      |
| state     | Integer | 0 closed, 1 open      |                                                                            |
| outtime   | Boolean | Timeout               | The timeout for returning data, in milliseconds, the default is 15 seconds |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/switch/cdpd?id=6C:8D:C1:67:04:29&state=0'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/switch/cdpd" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "state=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": "/shortcut/switch/cdpd",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "state":0
     }
}'
```

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

```
{
  "data": {
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 38,
  "fun": "/shortcut/switch/cdpd"
}
```

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

## 18.Switch wireless LAN on or off

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

* **Request Parameters**

| parameter | type    | illustrate            | Remark                                                                     |
| --------- | ------- | --------------------- | -------------------------------------------------------------------------- |
| fun       | String  | /shortcut/switch/wlan | Request function name                                                      |
| id        | String  | Device ID             | Separate multiple devices with commas                                      |
| state     | Integer | 0 closed, 1 open      |                                                                            |
| outtime   | Boolean | Timeout               | The timeout for returning data, in milliseconds, the default is 15 seconds |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/switch/wlan?id=6C:8D:C1:67:04:29&state=0'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/switch/wlan" \
  --form "id=6C:8D:C1:67:04:29" \
  --form "state=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": "/shortcut/switch/wlan",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "state":0
     }
}'
```

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

```
{
  "data": {
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 38,
  "fun": "/shortcut/switch/wlan"
}
```

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

## 19.Get phone IP

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

* **Request Parameters**

| parameter | type    | illustrate          | Remark                                                                     |
| --------- | ------- | ------------------- | -------------------------------------------------------------------------- |
| fun       | String  | /shortcut/device/ip | Request function name                                                      |
| id        | String  | Device ID           | Multiple is not allowed                                                    |
| state     | Integer | 0 LAN, 1 extranet   |                                                                            |
| outtime   | Boolean | Timeout             | The timeout for returning data, in milliseconds, the default is 15 seconds |

* **httpGet request example**

```
curl --request GET \
  --url 'http://192.168.9.9:9911/api/shortcut/device/ip?id=6C:8D:C1:67:04:29&state=0'
```

* **httpPost request example**

```
curl --request POST \
  --url http://192.168.9.9:9911/api \
  --header "content-type: multipart/form-data" \
  --form "fun=/shortcut/device/ip" \
  --form "id=6C:8D:C1:67:04:29"\
  --form "state=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": "/shortcut/device/ip",
     "data": {
          "id": "6C:8D:C1:67:04:29",
          "state":0
     }
}'
```

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

```
{
  "data": {
    "text": "192.168.0.100",
    "code": 0,
    "id": "6C:8D:C1:67:04:29",
    "message": "成功"
  },
  "status": 200,
  "message": "成功",
  "msgid": 38,
  "fun": "/shortcut/device/ip"
}
```

* **Response data field description**\
  text contains the obtained IP address
