Set

Function

This API is used to set AI > Cross Counting Scenario > RealTime Info configuration parameters.

Request Message

Parameter Description

Table 1

ParameterRangeTypeDescription
msgType"get_CCScenario_RTData"
"clear_CCScenario_RTData"
stringGet, clear CC RealTimeInfo
clear_type"Channel","Group","All Channels","All Groups"stringClearing Types for CC RealTimeInfo
chnIdintWhen clear_type selects Channel, the channel number needs to be passed
groupIdintWhen clear_type selects Group, the group number needs to be passed

Sample:

POST /API/AI/Scenario/CC/RealTime/Set HTTP/1.1
{
    "version": "1.0",
    "data": {
        "msgType": "clear_CCScenario_RTData",
	    "clear_type": "Group",
        "groupId": 1
    }
}

Response Message

Parameter Description

Table 2

ParameterRangeTypeDescription
CCScenarioRTInfo“Channels”,“Groups”Object arrayCross Counting RealTime Information JSON show as follow Table 3

Table 3

ParameterRangeTypeDescription
ChannelsObject arrayJSON show as follow Table 4
GroupsObject arrayJSON show as follow Table 5

Table 4

ParameterRangeTypeDescription
ChnIdintchannel number
EnterCntintnumber of people entering
ExitCntintnumber of people leaving
StayCntintnumber of people staying
AvailableCntintcurrent capacity
ObjTypeintHow to trigger counting:
0:Motion 1:Person 2:Vehicle

Table 5

ParameterRangeTypeDescription
GroupIdintgroup ID
EnterCntintnumber of people entering
ExitCntintnumber of people leaving
StayCntintnumber of people staying
AvailableCntintcurrent capacity
ObjTypeintHow to trigger counting:
0:Motion 1:Person 2:Vehicle
ChnDetailObject arrayReal-time data of channels in the group
JSON show as follow Table 6

Table 6

ParameterRangeTypeDescription
ChnIdintchannel number
EnterCntintNumber of people entering
ExitCntintnumber of people leaving

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "CCScenarioRTInfo": [
            {
                "Channels": [
                    {
                        "ChnId": 1,
                        "EnterCnt": 0,
                        "ExitCnt": 0,
                        "StayCnt": 0,
                        "AvailableCnt": 10,
                        "ObjType": 0
                    }
                ],
                "Groups": [
                    {
                        "GroupId": 0,
                        "EnterCnt": 0,
                        "ExitCnt": 0,
                        "StayCnt": 0,
                        "AvailableCnt": 10,
                        "ObjType": 1,
                        "ChnDetail": [
                            {
                                "ChnId": 0,
                                "EnterCnt": 0,
                                "ExitCnt": 0
                            }
                        ]
                    }
                ]
            }
        ]
    }
}

Error Code

See Response Messages Body and Common error_code for more information.