Range

Function

This API is used to get parameter range for Event > Http listening page.

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

None.

Sample:

POST /API/AlarmConfig/EventPush/Range HTTP/1.1
{
    "version": "1.0",
    "data": {}
}

Response Message

Parameter Description

Table 1

ParameterRangeTypeDescription
method"GET","POST"stringmethod of HTTP
paramsobjectSingle Channel Information JSON show as followTable 2
limit_character"?","&"," "stringlimit character

Table 2

ParameterRangeTypeDescription
name0,127stringchannel number
tableobjectSingle Channel Information JSON show as followTable 3

Table 3

ParameterRangeTypeDescription
push_wayHTTP,UDPstringPush way
username0,63stringusername
password0,63stringpassword.
password_empty0/1boolpassword empty
addr0,31stringserver address
addr_demo"192.168.1.168 or example.comstringserver address demo
port0,65535int32server port
url0,63stringServer api interface
enable0/1boolAlarm push function switch
alarm_precise0/1boolalarm precise
method"GET","POST"stringMode of pushing alarms
keep_alive_interval0,1,5,10stringKeepalive interval
udp_method"Unicast","Multicast","Broadcast"stringUDP Push type
udp_addr0,32stringUDP Server Address
udp_port1,65535int32UDP Server port

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": {
        "method": {
            "type": "string",
            "mode": "r",
            "items": [
                "GET",
                "POST"
            ]
        },
        "params": {
            "type": "object",
            "items": {
                "name": {
                    "type": "string",
                    "min_len": 0,
                    "max_len": 127
                },
                "table": {
                    "type": "object",
                    "items": {
                        "push_way": {
                            "type": "string",
                            "items": [
                                "HTTP",
                                "UDP"
                            ]
                        },
                        "username": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 63
                        },
                        "password": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 63
                        },
                        "password_empty": {"type": "bool"},
                        "addr": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 31
                        },
                        "addr_demo": {
                            "type": "string",
                            "items": ["192.168.1.168 or example.com"]
                        },
                        "port": {
                            "type": "int32",
                            "min": 1,
                            "max": 65535
                        },
                        "url": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 63
                        },
                        "enable": {"type": "bool"},
                        "method": {
                            "type": "string",
                            "items": [
                                "GET",
                                "POST"
                            ]
                        },
                        "keep_alive_interval": {
                            "type": "string",
                            "items": [
                                "0",
                                "1",
                                "5",
                                "10"
                            ]
                        },
                        "udp_method": {
                            "type": "string",
                            "items": [
                                "Unicast",
                                "Multicast",
                                "Broadcast"
                            ]
                        },
                        "udp_addr": {
                            "type": "string",
                            "min_len": 0,
                            "max_len": 32
                        },
                        "udp_port": {
                            "type": "int32",
                            "min": 1,
                            "max": 65535
                        }
                    }
                }
            }
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.