Set

Function

This API is used to set CCt parameters.

Request Message

Parameter Description

Table 1

ParameterRangeTypeDescription
channel_infoJSON arraySingle Channel Information JSON show as follow Table Table 2
channel_maxintMaximum number of channels

Table 2

ParameterRangeTypeDescription
CH1Json ObjectWhen the URL is a Get request JSON show as follow Table Table 3
When the URL is a Get request JSON show as follow Table Table 4
Json Object
IP_CH1Json Object
Json Object
WIFI_CH1Json Object
Json Object

Table 3

ParameterRangeTypeDescription
status"Offline","Online",“Nonsupport”stringChannel online status, only for digital channels. Note: When the channel is online, there is no such field.
search_datestringQuery date
detection_type"Motion"
"Person"
"Vehicle"
"Non-Vehicle"
stringDetection type
cross_type"Cross In""Cross Out"stringWay to cross the line
ai_cross_countboolDistinguish between first-generation and second-generation CCs, here the default is true

Table 4

ParameterRangeTypeDescription
status"Offline","Online",“Nonsupport”stringChannel online status, only for digital channels. Note: When the channel is online, there is no such field
reportint arrayNumber of people crossing the line

Sample:

POST API/AI/FCCStatistics/Set HTTP/1.1
{
    "version": "1.0",
    "data": {"channel_info": {"CH1": {
        "search_date": "2023-07-20",
        "report_type": "Daily report",
        "cross_type": "Cross In",
        "detection_type": "Motion"
    }}}
}

Response Message

See AI > Statistics > Cross Counting Statistics > Set > Parameter Description > Table 1 for parameter description.

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {"channel_info": {"CH1": {"report": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        3,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
    ]}}}
}

Error Code

See Response Messages Body and Common error_code for more information.