Set

Function

This API is used to region focusing.

Request Message

Parameter Description

Table 1
ParameterRangeTypeDescription
channel"CH1"…"CHx",
"IP_CH1"…" IP_CHx",
"WIFI_CH1"…",WIFI_CHx",
The number of channels depends on the capabilities of the device.
stringThe channel name.
infoJson objectFor details on the focus region, see Table 2 for more information.
Table 2
ParameterRangeTypeDescription
x10~704intRegion x1 coordinate.
y10~576intRegion y1 coordinate.
x20~704intRegion x2 coordinate.
y20~576intRegion y2 coordinate.
image_w0~704intRegion width.
image_h0~576intRegion 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.