i-PRO Active Guard server WebAPI (ver.1.1)

Introduction

i-PRO Active Guard server provide integration option via WEB API. The client can use following data stored in i-PRO Active Guard server.

  • Search face, people or vehicle Best shot images.
  • Search alarm history (ex. Resistered face detection, Registered people detection ,AI-VMD and so on.)
  • Control face or people watchlist
  • Get statistics data (ex. People/Vehicle counting, Face and gender statistics, people or vehicle attribute statistics.)

HTTP Common Definition

HTTP version

Execute the request using the method of HTTP /1.1

Request Header

Table Request Header

No. HTTP Header Value
Content-Type application/json; charset=UTF-8
Connection Close
Content-Length Send data size

Response Header

The HTTP status code is set to “200” unless the HTTP server normally accepts a message from the client and thereafter cannot respond from the application.

For other general HTTP communication errors, for examples, 404 or 403 will be responded In that case, no response body is set.

Content-Body

Request

JSON format is used. When the API needs image data, the data should be encoded with BASE64.

Response

The result related to the request is returned in the HTTP status code and response body in JSON format.

When the response includes the image data, they are encoded with BASE64.

Example of resonse

  {
    "status_body":
    {
        "status":true,
        "details": [
          {
            "srv_id":"9999",
            "code":"00000",
            "message":"OK"
          }         
        ]
    },
    "result_body":
    {
        *Depends on API
    }
  }

"status" is set to true when details.code includes "00000" and "00001".

When status is true, detail data exist in result_body. When status is false, detail data does not exist in result_body.

"srv_id" in "details" is 9999 (fixed value).

Authentication

Digest Authentication is used between the client and i-PRO Active Guard server.

SSL Communication

HTTPS communication is possible between the client and the i-PRO Active Guard server by configuring server setting.

Only TLS1.2 is supported. Self-signed certificate is installed as defalut when installing i-PRO Active Guard server.

To verify the certificate on client side, it is recoomennded to replace to CA certificate.

License

This document is generated using ReDoc.

About License

Device Information

Get System Information

Available AI analytics feature depends on extension software installed on cameras.
Client can get which AI feature is available now as whole system by using this API for Best shot image, Alarm history, respectively.

Responses

Response samples

Content type
application/json
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "multi_ai_soft_version": "1.3.2.4",
    • "bestshot_type_list": [
      • {
        • "section": "face",
        • "server_type": "local",
        • "search_item": [
          • "date&time",
          • "cameras"
          ]
        },
      • {
        • "section": "people",
        • "server_type": "local",
        • "search_item": [
          • "date&time",
          • "cameras",
          • "attribute",
          • "similarity"
          ]
        },
      • {
        • "section": "vehicle",
        • "server_type": "local",
        • "search_item": [
          • "date&time",
          • "cameras",
          • "attribute",
          • "similarity"
          ]
        }
      ],
    • "alarm_type_list": [
      • {
        • "section": "face",
        • "alarm_type": "(registered category)"
        },
      • {
        • "section": "people",
        • "alarm_type": "listed-alarm"
        },
      • {
        • "section": "sound",
        • "alarm_type": [
          • "gunshot",
          • "glass break",
          • "vehicle horn",
          • "yell",
          • "audio detection"
          ]
        },
      • {
        • "section": "aivmd",
        • "alarm_type": [
          • "intruder detection",
          • "loitering detection",
          • "cross line detection",
          • "direction detection"
          ]
        },
      • {
        • "section": "peopleCount",
        • "alarm_type": [
          • "occupancy"
          ]
        }
      ]
    }
}

Get Cameras Information

Client can get AI feature of the camera and Camera ID that is required for many API request to specify the camera.

Responses

Response samples

Content type
application/json
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "system_type_list": [
      • {
        • "system_type": "multi-AI",
        • "srv_id_list": [
          • {
            • "srv_id": "9999",
            • "cameras": [
              • {
                • "camera_id": "1557187868",
                • "camera_ip": "192.168.0.10",
                • "camera_model": "WV-X2571L",
                • "camera_name": "Entrance camera",
                • "ai_capability": [
                  • "face",
                  • "people",
                  • "sound"
                  ],
                • "is_enabled": "true"
                },
              • {
                • "camera_id": "1826478927",
                • "camera_ip": "192.168.0.11",
                • "camera_model": "WV-S2136",
                • "camera_name": "Parking lot",
                • "ai_capability": [
                  • "vehicle",
                  • "aivmd"
                  ],
                • "is_enabled": "true"
                },
              • {
                • "camera_id": "923264335",
                • "camera_ip": "192.168.0.12",
                • "camera_model": "WV-S4156",
                • "camera_name": "Exit",
                • "ai_capability": [
                  • "aivmd",
                  • "peopleCount"
                  ],
                • "is_enabled": "true"
                }
              ]
            }
          ]
        }
      ]
    }
}

Best shot Image

Face, people or vehilce Best shot images stored in i-PRO Active Guard server can be searched and get by API. Client need to send 'Start Search' with search condition and get the 'search_session_id' from the response at first.

Using 'Get Search Result Summary' with the 'search_session_id', client can get timestamp and 'thumbnail-key' which is used to get Best shot image binary data. The client can also request the specified number from the total number of all search results.

Finally, sending 'Get Best shot image' API for each 'thumbnail-key', image data will be get.

Start Search

By sending search condition, client can get 'search_session_id'.
It is possible to request for face, people and vehicle at the same time.

Request Body schema: application/json
Any of
required
object

Face search condition
'search_thumbnail_1' and 'matching_list_id' are exclusive.If neither is specified, all facial images for the specified date and time and camera will be searched.

date_from
required
string <YYYY-MM-DD hh:mm:ss>

Start date and time. (*UTC)

date_to
required
string <YYYY-MM-DD hh:mm:ss>

End date and time. (*UTC)

object

Sort

Responses

Request samples

Content type
application/json
Example
{
  • "section_face": {
    • "similarity": "50",
    • "cameras": [
      • {
        • "srv_id": "9999",
        • "camera_id": "1557187868"
        }
      ],
    • "matching_list_id": "7d6b8ce8-e51c-41bf-a382-f29e818f10b8"
    },
  • "date_from": "2022-01-01 01:00:00",
  • "date_to": "2022-01-10 23:59:59",
  • "sort": {
    • "sort-item": "shot-date-time",
    • "asc-desc": "desc"
    }
}

Response samples

Content type
application/json
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "search_session_id": "1620151537"
    }
}

Get Search Result Summary

Search result summary such as the number of result, timestamp for each image, and 'thumbnail_key' can be get for the specified 'search_session_id'.
The client can also request the specified number from the total number of all search results.

path Parameters
search_session_id
required
string
Example: 1620151537

Search session ID

query Parameters
result-from
integer
Example: result-from=1

Search result acquisition start number
When omitted, it is acquired from first number.

result-count
integer
Example: result-count=100

Set the get maximum number of results from 'result_from'.
When omitted, all search results are got but it may take time.

Responses

Response samples

Content type
application/json
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "search_session_id": "1620151537",
    • "result_count": "200",
    • "search_result": [
      • {
        • "shot_date_time": "2022-01-01 00:00:00.000",
        • "camera_id": "1557187868",
        • "system_type": "multi-AI",
        • "srv_id": "9999",
        • "source_type": "face",
        • "degree_of_similarity": "74",
        • "thumbnail_key": "SearchThumbnail\\\\multi-AI\\\\9999\\\\1557187868\\\\2022\\\\01\\\\01\\\\000000000_3D24F100A42311EC89B21557187868.jpg"
        },
      • {
        • "shot_date_time": "2022-01-01 00:00:30.000",
        • "camera_id": "1557187868",
        • "system_type": "multi-AI",
        • "srv_id": "9999",
        • "source_type": "face",
        • "degree_of_similarity": "56",
        • "thumbnail_key": "SearchThumbnail\\\\multi-AI\\\\9999\\\\1557187868\\\\2022\\\\01\\\\01\\\\000030000_4F102100A42311EC89B21557147321.jpg"
        }
      ]
    }
}

Get Best shot image

Best shot image data can be get for the specific 'thumbnail_key'.
When 'info=on' is added for the query, detail information such as analyzed attribute score and the size of image will be included.

query Parameters
thumbnail-key
required
string
Example: thumbnail-key=SearchThumbnail\\multi-AI\\9999\\1557187868\\2022\\03\\C15\\144618780_3D24F100A42311EC89B21557187868.jpg

Key of the Best shot image

info
string
Example: info=on

When on is set, analyzed attribute score and the size of image will be respond.

Responses

Response samples

Content type
application/json
Example
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "thumbnail_image": "(Base64 encoded image)",
    • "recommended_size": [
      • {
        • "recommended": "no",
        • "detect_pixel_width": "198",
        • "detect_pixel_height": "198"
        }
      ]
    }
}

Cancel Search

path Parameters
search_session_id
required
string
Example: 1620151537

Search session ID

Responses

Response samples

Content type
application/json
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    }
}

Alarm History

Start Search

Alarm history for Registered face detection, Registered people detection, sound alarm, AI-VMD and occupancy detection can be searched.
By sending search condition, client can get 'search_session_id'.
It is possible to request for multiple alarm kind at the same time.

Request Body schema: application/json
Any of
required
object

Search face matching alarm history Request

date_from
required
string <YYYY-MM-DD hh:mm:ss>

Start date and time(*UTC)

date_to
required
string <YYYY-MM-DD hh:mm:ss>

End date and time(*UTC)

object

Responses

Request samples

Content type
application/json
Example
{
  • "section_face": {
    • "alarm_type": "listed-alarm",
    • "matching_list_id": "7d6b8ce8-e51c-41bf-a382-f29e818f10b8",
    • "cameras": [
      • {
        • "srv_id": "9999",
        • "camera_id": "1557187868"
        }
      ]
    },
  • "date_from": "2022-01-01 00:00:00",
  • "date_to": "2022-01-01 23:59:59",
  • "sort": {
    • "sort-item": "shot-date-time",
    • "asc-desc": "desc"
    }
}

Response samples

Content type
application/json
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "search_session_id": "1620151537"
    }
}

Get Search Result Summary

Search result summary such as the number of result, timestamp for each alarm, and 'detected_thumbnail' can be get for the specified 'search_session_id'.
The client can also request the specified number from the total number of all search results.

path Parameters
search_session_id
required
string
Example: 1620151537

Search session ID

query Parameters
result-from
integer
Example: result-from=1

Search result acquisition start number
When omitted, it is acquired from first number.

result-count
integer
Example: result-count=100

Set the get maximum number of results from 'result_from'.
When omitted, all search results are got but it may take time.

Responses

Response samples

Content type
application/json
Example
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "search_session_id": "1620151537",
    • "result_count": "1",
    • "search_result": [
      • {
        • "alarm_date_time": "2022-01-01 01:00:00.000",
        • "system_type": "multi-AI",
        • "srv_id": 9999,
        • "camera_id": "1557187868",
        • "alarm_type": "listed-alarm",
        • "alarm_name": "Registered face detection",
        • "matching_list_id": "beae611e-8825-4ae5-a93f-f6c34c356102",
        • "degree_of_similarity": "96",
        • "detected_thumbnail": "SearchAlarm\\\\multi-AI\\\\9999\\\\1557187868\\\\2022\\\\01\\\\01\\\\010000000_received.jpg",
        • "registered_thumbnail": "SearchAlarm\\\\multi-AI\\\\9999\\\\1557187868\\\\2022\\\\01\\\\01\\\\010000000_registered.jpg",
        • "category": "Student"
        }
      ]
    }
}

Cancel Search

path Parameters
search_session_id
required
string
Example: 1620151537

Search session ID

Responses

Response samples

Content type
application/json
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    }
}

Watchlist

Get list

Registered face watchlist and registered people watchlist can be get.

Request Body schema: application/json
One of
required
object

Search condition for face watchlist

srv_id
required
string

9999

Responses

Request samples

Content type
application/json
Example
{
  • "section_face": {
    • "search_type": "list"
    },
  • "srv_id": "9999"
}

Response samples

Content type
application/json
Example
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "result_count": "1",
    • "system_type": "multi-AI",
    • "matching_list": [
      • {
        • "matching_list_id": "7d6b8ce8-e51c-41bf-a382-f29e818f10b8",
        • "delete_type": "stop-matching",
        • "matching_status": "enable",
        • "image_id_list": [
          • {
            • "image_id": "8d017138-b30a-49f6-81dd-0fad46553ef3",
            • "thumbnail_key": "ListMatchingList\\\\multi-AI\\\\9999\\\\Face\\\\7d6b8ce8-e51c-41bf-a382-f29e818f10b8_8d017138-b30a-49f6-81dd-0fad46553ef3.jpg",
            • "last_name": "Smith",
            • "age": "19",
            • "gender": "male",
            • "similarity": "50",
            • "category": "Student"
            }
          ]
        }
      ]
    }
}

New Registration

Request Body schema: application/json
One of
required
object

Register face watchlist
When executing this API, at least one camera on which AI Face detection is installed must be connected with i-PRO Active Guard server.

srv_id
required
string

9999

Responses

Request samples

Content type
application/json
Example
{
  • "section_face": {
    • "delete_type": "stop-matching",
    • "matching_status": "enable",
    • "image_id_list": [
      • {
        • "image_id": "8d017138-b30a-49f6-81dd-0fad46553ef3",
        • "image": "(Base64 encoded image)"
        }
      ],
    • "last_name": "Smith",
    • "age": "19",
    • "gender": "male",
    • "similarity": "50"
    },
  • "srv_id": "9999"
}

Response samples

Content type
application/json
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "matching_list_id": "996f77b8-cf2e-4ef3-a23d-3a738795a12f"
    }
}

Delete

path Parameters
type
required
string
Enum: "face" "people"

Watchlist kind

matching_list_id
required
string
Example: 996f77b8-cf2e-4ef3-a23d-3a738795a12f

Watchlist ID

Responses

Response samples

Content type
application/json
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "matching_list_id": "996f77b8-cf2e-4ef3-a23d-3a738795a12f"
    }
}

Update

path Parameters
matching_list_id
required
string
Example: 996f77b8-cf2e-4ef3-a23d-3a738795a12f

Watchlist ID

Request Body schema: application/json
One of
required
object

Update face watchlist
When executing this API, at least one camera on which AI Face detection is installed must be connected with i-PRO Active Guard server.

srv_id
required
string

9999

Responses

Request samples

Content type
application/json
Example
{
  • "section_face": {
    • "expire_date": "2022-04-20 10:52",
    • "delete_type": "physical",
    • "matching_status": "enable",
    • "image_id_list": [
      • {
        • "image_id": "f37ff383-5970-4a77-854f-6a55022acdeb",
        • "image": "(Base64 encoded image)"
        }
      ],
    • "last_name": "Smith",
    • "age": "19",
    • "gender": "male",
    • "similarity": "50"
    },
  • "srv_id": "9999"
}

Response samples

Content type
application/json
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    }
}

Statistics

Get People Counting Data

Acquires the information counted for conditions such as camera, date and time, line number, and passing direction. This API is available when AI-VMD, AI Occupancy detection or AI-VMD/AI People Counting for 360-degree fisheye camera is used.

When acquiring data within one day, the date and time will be aggregated for the period specified for date_from and date_to, and the period specified for time_from and time_to.

When acquiring data for one day or more, specify the date_from and date_to, and specify the start and end times for each day in time_from and time_to. If you want to aggregate 24 hours per day, set time_from and time_to to the same value.

If the aggregation period per day spans days such as 17:00 to 2:00 the next day, specify 17:00 for time_from and 2:00 for time_to. In this case, the response is aggregated as data for the day to which time_from belongs.

Request Body schema: application/json
date_from
required
string <YYYY-MM-DD hh:mm>

Aggregation start date and time. (*UTC)

date_to
required
string <YYYY-MM-DD hh:mm>

Aggregation end date and time. (*UTC)

time_from
required
integer <hh> [ 0 .. 23 ]

Aggregation start time of each day. (*UTC)

time_to
required
integer <hh> [ 0 .. 23 ]

Aggregation end time of each day. (*UTC)

current
string
Value: "on"

When on is set, the latest data in memory can be get

camera_id
required
Array of strings

Camera ID.
If you specify only one camera, you can get the aggregated values for each line or area set for that camera. If multiple cameras are specified, the data will be totaled for each camera.

object

Set when counting line crosses or areas.

Responses

Request samples

Content type
application/json
{
  • "date_from": "2021-10-12 00:00",
  • "date_to": "2021-10-12 02:00",
  • "time_from": "8",
  • "time_to": "20",
  • "camera_id": [
    • "1557187868",
    • "1826478927"
    ],
  • "line_area": {
    • "interval": "1H",
    • "people_count_type": "linecross",
    • "linecross_direction": "in+out"
    }
}

Response samples

Content type
application/json
Example
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "data_flag": "1",
    • "linecross_count": [
      • {
        • "camera_id": "1557187868",
        • "time_range": "2021-10-12 00:00:00",
        • "lineID": "1",
        • "inout_number": "13"
        },
      • {
        • "camera_id": "1557187868",
        • "time_range": "2021-10-12 01:00:00",
        • "lineID": "1",
        • "data_number": "13"
        },
      • {
        • "camera_id": "1557187868",
        • "time_range": "2021-10-12 02:00:00",
        • "lineID": "1",
        • "data_number": "32"
        }
      ]
    }
}

Get Vehicle Counting Data

Acquires the information counted for conditions such as camera, date and time, line number, and passing direction. This API is available when AI-VMD is used.

When acquiring data within one day, the date and time will be aggregated for the period specified for date_from and date_to, and the period specified for time_from and time_to.

When acquiring data for one day or more, specify the date_from and date_to, and specify the start and end times for each day in time_from and time_to. If you want to aggregate 24 hours per day, set time_from and time_to to the same value.

If the aggregation period per day spans days such as 17:00 to 2:00 the next day, specify 17:00 for time_from and 2:00 for time_to. In this case, the response is aggregated as data for the day to which time_from belongs.

Request Body schema: application/json
date_from
required
string <YYYY-MM-DD hh:mm>

Aggregation start date and time. (*UTC)

date_to
required
string <YYYY-MM-DD hh:mm>

Aggregation end date and time. (*UTC)

time_from
required
integer <hh> [ 0 .. 23 ]

Aggregation start time of each day. (*UTC)

time_to
required
integer <hh> [ 0 .. 23 ]

Aggregation end time of each day. (*UTC)

current
string
Value: "on"

When on is set, the latest data in memory can be get

camera_id
required
Array of strings

Camera ID.
If you specify only one camera, you can get the aggregated values for each line set for that camera. If multiple cameras are specified, the data will be totaled for each camera.

object

Set when counting line crosses.

Responses

Request samples

Content type
application/json
{
  • "date_from": "2021-10-12 00:00",
  • "date_to": "2021-10-12 02:00",
  • "time_from": "8",
  • "time_to": "20",
  • "camera_id": [
    • "1557187868",
    • "1826478927"
    ],
  • "line_area": {
    • "interval": "1H",
    • "vehicle_count_type": "linecross",
    • "linecross_direction": "in+out"
    }
}

Response samples

Content type
application/json
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "data_flag": "1",
    • "linecross_count": [
      • {
        • "camera_id": "1557187868",
        • "time_range": "2021-10-12 00:00:00",
        • "lineID": "1",
        • "vehicle_type": "vehicle",
        • "inout_number": "13"
        },
      • {
        • "camera_id": "1557187868",
        • "time_range": "2021-10-12 01:00:00",
        • "lineID": "1",
        • "vehicle_type": "vehicle",
        • "data_number": "13"
        },
      • {
        • "camera_id": "1557187868",
        • "time_range": "2021-10-12 02:00:00",
        • "lineID": "1",
        • "vehicle_type": "vehicle",
        • "data_number": "32"
        }
      ]
    }
}

Get Age and Gender Statistics

This API is available when AI Face detection is used.

Request Body schema: application/json
date_from
required
string <YYYY-MM-DD hh:mm>

Aggregation start date and time. (*UTC)

date_to
required
string <YYYY-MM-DD hh:mm>

Aggregation end date and time. (*UTC)

time_from
required
integer <hh> [ 0 .. 23 ]

Aggregation start time of each day. (*UTC)

time_to
required
integer <hh> [ 0 .. 23 ]

Aggregation end time of each day. (*UTC)

current
string
Value: "on"

When on is set, the latest data in memory can be get

data_mode
required
string
Enum: "by-camera" "by-time" "none"

Data display format
by-camera: Aggregated data by each camera,
by-time:Aggregated data by time,
none: Number per selected attribute combination

interval
string
Enum: "1H" "1D" "1W"

data_interval (by time only)
1H:1 hour,1D:1 day, 1W:1 week
Exmaple: 1H: Date: 2019-12-20 ~ 2019-12-21, Time: 16 ~ 18
 2019/12/20 16:00-17:00
 2019/12/20 17:00-18:00
 2019/12/21 16:00-17:00
 2019/12/21 17:00-18:00

camera_id
required
Array of strings

Camera ID

required
Array of objects

Data type
Multiple items can be specified. The top 10 with the specified combination of attributes will be returned. If no one is specified, only the cumulative value will be returned.

Responses

Request samples

Content type
application/json
Example
{
  • "date_from": "2021-10-12 00:00",
  • "date_to": "2021-10-12 03:00",
  • "time_from": "8",
  • "time_to": "20",
  • "data_mode": "by-camera",
  • "camera_id": [
    • "1557187868",
    • "1826478927"
    ],
  • "statistics_item": [
    • {
      • "gender": "all"
      }
    ]
}

Response samples

Content type
application/json
Example
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "data_mode": "by-camera",
    • "data_flag": "1",
    • "face_count": [
      • {
        • "rank": "1",
        • "gender": "0",
        • "data_number": [
          • {
            • "camera_id": "1557187868",
            • "data_number": "42"
            },
          • {
            • "camera_id": "1826478927",
            • "data_number": "27"
            }
          ]
        },
      • {
        • "rank": "2",
        • "gender": "1",
        • "data_number": [
          • {
            • "camera_id": "1557187868",
            • "data_number": "30"
            },
          • {
            • "camera_id": "1826478927",
            • "data_number": "6"
            }
          ]
        }
      ]
    }
}

Get People Attribute Statistics

This API is available when AI People detection is used.

Request Body schema: application/json
date_from
required
string <YYYY-MM-DD hh:mm>

Aggregation start date and time. (*UTC)

date_to
required
string <YYYY-MM-DD hh:mm>

Aggregation end date and time. (*UTC)

time_from
required
integer <hh> [ 0 .. 23 ]

Aggregation start time of each day. (*UTC)

time_to
required
integer <hh> [ 0 .. 23 ]

Aggregation end time of each day. (*UTC)

current
string
Value: "on"

When on is set, the latest data in memory can be get

data_mode
required
string
Enum: "by-camera" "by-time" "none"

Data display format
by-camera: Aggregated data by each camera
by-time:Aggregated data by time
none: Number per selected attribute combination

interval
string
Enum: "1H" "1D" "1W"

Data interval (by time only)
1H:1 hour,1D:1 day, 1W:1 week

camera_id
required
Array of strings

Camera ID

required
object

Up to 3 attributes can be specified.
The top 10 with the specified combination of attributes will be returned. If no one is specified, only the cumulative value will be returned.

Responses

Request samples

Content type
application/json
{
  • "date_from": "2021-10-12 00:00",
  • "date_to": "2021-10-12 23:00",
  • "time_from": "8",
  • "time_to": "20",
  • "data_mode": "by-camera",
  • "camera_id": [
    • "1557187868",
    • "1826478927"
    ],
  • "statistics_item": {
    • "attribute": [
      • "upper_garment",
      • "upper_color"
      ]
    }
}

Response samples

Content type
application/json
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "data_mode": "by-camera",
    • "data_flag": "1",
    • "people_count": [
      • {
        • "rank": "1",
        • "attribute": {
          • "upper_garment": "long_sleeves",
          • "upper_color": "gray"
          },
        • "data_number": [
          • {
            • "camera_id": "1557187868",
            • "data_number": "150"
            },
          • {
            • "camera_id": "1826478927",
            • "data_number": "234"
            }
          ]
        },
      • {
        • "rank": "2",
        • "attribute": {
          • "upper_garment": "long_sleeves",
          • "upper_color": "brown"
          },
        • "data_number": [
          • {
            • "camera_id": "1557187868",
            • "data_number": "80"
            },
          • {
            • "camera_id": "1826478927",
            • "data_number": "34"
            }
          ]
        }
      ]
    }
}

Get Vehicle Attribute Statistics

This API is available when AI Vehicle detection is used.

Request Body schema: application/json
date_from
required
string <YYYY-MM-DD hh:mm>

Aggregation start date and time. (*UTC)

date_to
required
string <YYYY-MM-DD hh:mm>

Aggregation end date and time. (*UTC)

time_from
required
integer <hh> [ 0 .. 23 ]

Aggregation start time of each day. (*UTC)

time_to
required
integer <hh> [ 0 .. 23 ]

Aggregation end time of each day. (*UTC)

current
string
Value: "on"

When on is set, the latest data in memory can be get

data_mode
required
string
Enum: "by-camera" "by-time" "none"

Data display format
by-camera: Aggregated data by each camera
by-time:Aggregated data by time
none: Number per selected attribute combination

interval
string
Enum: "1H" "1D" "1W"

data interval (by time only)
1H:1 hour,1D:1 day, 1W:1 week

camera_id
required
Array of strings

Camera ID

required
Array of objects

Data type
Multiple items can be specified. The top 10 with the specified combination of attributes will be returned. If no one is specified, only the cumulative value will be returned.

Responses

Request samples

Content type
application/json
{
  • "date_from": "2022-01-01 00:00",
  • "date_to": "2022-01-01 02:00",
  • "time_from": "8",
  • "time_to": "20",
  • "data_mode": "by-time",
  • "interval": "1H",
  • "camera_id": [
    • "1557187868",
    • "1826478927"
    ],
  • "statistics_item": [
    • {
      • "type": "all",
      • "color": "all"
      }
    ]
}

Response samples

Content type
application/json
{
  • "status_body": {
    • "status": true,
    • "details": [
      • {
        • "srv_id": "9999",
        • "code": "00000",
        • "message": "OK"
        }
      ]
    },
  • "result_body": {
    • "data_mode": "by-time",
    • "data_flag": "1",
    • "vehicle_count": [
      • {
        • "rank": "1",
        • "type": "sedan",
        • "color": "black",
        • "data_number": [
          • {
            • "time_range": "2022-01-01 00:00:00",
            • "data_number": "150"
            },
          • {
            • "time_range": "2022-01-01 01:00:00",
            • "data_number": "134"
            },
          • {
            • "time_range": "2022-01-01 02:00:00",
            • "data_number": "250"
            }
          ]
        },
      • {
        • "rank": "2",
        • "type": "suv",
        • "color": "black",
        • "data_number": [
          • {
            • "time_range": "2022-01-01 00:00:00",
            • "data_number": "120"
            },
          • {
            • "time_range": "2022-01-01 01:00:00",
            • "data_number": "64"
            },
          • {
            • "time_range": "2022-01-01 02:00:00",
            • "data_number": "150"
            }
          ]
        },
      • {
        • "rank": "1",
        • "type": "sedan",
        • "color": "gray",
        • "data_number": [
          • {
            • "time_range": "2022-01-01 00:00:00",
            • "data_number": "50"
            },
          • {
            • "time_range": "2022-01-01 01:00:00",
            • "data_number": "34"
            },
          • {
            • "time_range": "2022-01-01 02:00:00",
            • "data_number": "50"
            }
          ]
        }
      ]
    }
}