# Set

## Function

This API is used to region focusing.

## Request Message

### Parameter Description

##### Table 1

Parameter | Range | Type | Description
--- | --- | --- | ---
channel | "CH1"…"CHx", "IP_CH1"…" IP_CHx", "WIFI_CH1"…",WIFI_CHx", The number of channels depends on the capabilities of the device. | string | The channel name.
info |  | Json object | For details on the focus region, see Table 2 for more information.

##### Table 2

Parameter | Range | Type | Description
--- | --- | --- | ---
x1 | 0~704 | int | Region x1 coordinate.
y1 | 0~576 | int | Region y1 coordinate.
x2 | 0~704 | int | Region x2 coordinate.
y2 | 0~576 | int | Region y2 coordinate.
image_w | 0~704 | int | Region width.
image_h | 0~576 | int | Region height.

Sample:

    POST /API/PreviewChannel/RegionFocus/Set HTTP/1.1

    {
      "version": "1.0",
      "data": {
        "channel": "CH1",
        "info": {
          "x1": 103,
          "y1": 134,
          "x2": 211,
          "y2": 261,
          "image_w": 108,
          "image_h": 128
        }
      }
    }

## Response Message

None.

Sample:

    HTTP/1.1 200 OK
    Content-Type: application/json

    {
        "result":"success",
        "data":{
        }
    }

## Error Code

See Response Messages Body and Common error_code for more information.