# Range

## Function

This API is used to get the parameter range of Event Settings(cloud dedicated) > Plan.

> Note:

> The Range provides reference information for client UI input limits and API request limits. When sending Get and Set requests, the parameters must be strictly limited according to the Range, otherwise the request may be rejected by the device.

## Request Message

#### Table 1

Parameter | Range | Type | Description
--- | --- | --- | ---
channel | "CH1"... | string | Corresponding intelligent channel
abilities | "FaceDetection", "HumanVehicle", "LicensePlate", "LineCrossing", "Intrusion", "Intrusion", "ExitRegion", "ObjectDetection", "CrossCounting", "CrossCounting", "QueueLength", "CrowdDensity", "RareSound", "MotionDetection", "VideoTampering" | array | Current intelligence
oper_type | "get_default_data" | string | Whether to get the default value for smart

Sampel：

    POST /API/Event/Plan/Range HTTP/1.1

    {
        "version": "1.0",
        "data": {
            "channel": "CH1",
            "ability": "FaceDetection",
            "oper_type": "get_default_data"
        }
    }

## Response Message

### Parameter Description

#### Table 2

Parameter | Range | Type | Description
--- | --- | --- | ---
channel_info |  | JSON Object | Channel Info Object,see Table 3 for more information

#### Table 3

Channel Info Object

Parameter | Range | Type | Description
--- | --- | --- | ---
CH1 |  | Json Object | Channel Object,see Table 4 for more information
IP_CH1 |  | Json Object |
WIFI_CH1 |  | Json Object |

#### Table 4

Channel Object

Parameter | Range | Type | Description
--- | --- | --- | ---
schedule_list |  | array | see Table 5 for more information
btn_get_default_data |  | bool | Shows whether the Get Default button

#### Table 5

Parameter | Range | Type | Description
--- | --- | --- | ---
enable |  | bool | Indicates whether
start_time | 0~1439 | int | start time
end_time | 0~1440 | int | end time
weekday | "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" | string | number of days

> Tips:

> The response message of the Range request may not contain all the fields in the above table, and the fields not included indicate that the device does not support this parameter configuration.

Sample:

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

    {
        "result": "success",
        "data": {"channel_info": {
            "type": "object",
            "items": {"CH1": {
                "type": "object",
                "items": {
                    "schedule_list": {
                        "type": "array",
                        "min_size": 0,
                        "max_size": 8,
                        "items": [{
                            "enable": {"type": "bool"},
                            "start_time": {
                                "type": "int32",
                                "min": 0,
                                "max": 1439
                            },
                            "end_time": {
                                "type": "int32",
                                "min": 0,
                                "max": 1440
                            },
                            "weekday": {
                                "type": "array",
                                "min_size": 1,
                                "max_size": 7,
                                "items": [{
                                    "type": "string",
                                    "items": [
                                        "Sunday",
                                        "Monday",
                                        "Tuesday",
                                        "Wednesday",
                                        "Thursday",
                                        "Friday",
                                        "Saturday"
                                    ]
                                }]
                            }
                        }]
                    },
                    "btn_get_default_data": true
                }
            }}
        }}
    }

## Error Code

See Response Messages Body and Common error_code for more information.