HikCentral Connect OpenAPI - Developer Guide - 20230714
HikCentral Connect OpenAPI - Developer Guide - 20230714
Developer Guide
HikCentral Connect OpenAPI Developer Guide
Legal Information
© 2023 Hangzhou Hikvision Digital Technology Co., Ltd. All rights reserved.
This Document (hereinafter referred to be "the Document") is the property of Hangzhou Hikvision
Digital Technology Co., Ltd. or its affiliates (hereinafter referred to as "Hikvision"), and it cannot be
reproduced, changed, translated, or distributed, partially or wholly, by any means, without the
prior written permission of Hikvision. Unless otherwise expressly stated herein, Hikvision does not
make any warranties, guarantees or representations, express or implied, regarding to the
Document, any information contained herein.
LEGAL DISCLAIMER
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE DOCUMENT IS PROVIDED "AS IS"
AND "WITH ALL FAULTS AND ERRORS". HIKVISION MAKES NO REPRESENTATIONS OR WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. IN NO EVENT WILL HIKVISION BE
LIABLE FOR ANY SPECIAL, CONSEQUENTIAL, INCIDENTAL, OR INDIRECT DAMAGES, INCLUDING,
AMONG OTHERS, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION OR LOSS
OF DATA, CORRUPTION OF SYSTEMS, OR LOSS OF DOCUMENTATION, WHETHER BASED ON BREACH
OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, IN CONNECTION WITH THE USE
OF THE DOCUMENT, EVEN IF HIKVISION HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES OR LOSS.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE DOCUMENT IS PROVIDED "AS IS"
AND "WITH ALL FAULTS AND ERRORS". OUR COMPANY MAKES NO REPRESENTATIONS OR
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. IN NO EVENT
WILL OUR COMPANY BE LIABLE FOR ANY SPECIAL, CONSEQUENTIAL, INCIDENTAL, OR INDIRECT
DAMAGES, INCLUDING, AMONG OTHERS, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS
INTERRUPTION OR LOSS OF DATA, CORRUPTION OF SYSTEMS, OR LOSS OF DOCUMENTATION,
WHETHER BASED ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, IN
CONNECTION WITH THE USE OF THE DOCUMENT, EVEN IF OUR COMPANY HAS BEEN ADVISED OF
THE POSSIBILITY OF SUCH DAMAGES OR LOSS.
i
HikCentral Connect OpenAPI Developer Guide
Contents
Chapter 1 Overview .................................................................................................................... 1
1.1 Introduction ........................................................................................................................... 1
1.2 Open Capabilities ................................................................................................................... 1
1.2.1 System Capabilities ....................................................................................................... 1
1.2.2 Alarm Capabilities ......................................................................................................... 2
1.2.3 Resource Capabilities .................................................................................................... 3
1.2.4 Video Capabilities ......................................................................................................... 4
1.2.5 Message Capabilities ..................................................................................................... 5
1.2.6 Person Management Capabilities ................................................................................. 5
1.2.7 Video Intercom Capabilities .......................................................................................... 5
1.2.8 Access Control Capabilities ........................................................................................... 6
1.2.9 On-Board Monitoring Capabilities ................................................................................ 6
1.3 Terms and Definitions ............................................................................................................ 7
1.4 Update History ....................................................................................................................... 8
Chapter 2 Getting Started ......................................................................................................... 12
Chapter 3 Protocol Summary .................................................................................................... 13
3.1 API Rules .............................................................................................................................. 13
3.2 Signature and Authentication .............................................................................................. 13
3.3 Response Rules .................................................................................................................... 14
Chapter 4 Typical Applications .................................................................................................. 16
4.1 Manage Resources ............................................................................................................... 16
4.2 Subscribe to and Get Alarms ................................................................................................ 16
4.3 Configure Alarm Rules ......................................................................................................... 18
4.4 Subscribe to and Get Messages ........................................................................................... 19
4.5 Start Live View / Playback Without Plug-in .......................................................................... 20
4.6 Receive Video Intercom Events ............................................................................................ 21
ii
HikCentral Connect OpenAPI Developer Guide
iii
HikCentral Connect OpenAPI Developer Guide
iv
HikCentral Connect OpenAPI Developer Guide
v
HikCentral Connect OpenAPI Developer Guide
vi
HikCentral Connect OpenAPI Developer Guide
vii
HikCentral Connect OpenAPI Developer Guide
viii
HikCentral Connect OpenAPI Developer Guide
Chapter 1 Overview
1.1 Introduction
HikCentral Connect, Hikvision's VSaaS (Video Security as a Service) platform for unified security
management, provides open capabilities and APIs for the management of user accounts,
resources, and alarms/events. Based on the open capabilities, the third-party manufacturers and
developers are able to fast integrate different applications. This document introduces the
application scenarios, APIs, and API calling methods in details.
Before starting integration, make sure you have acquired the following skills and knowledge.
● Master one or multiple common programming languages such as JAVA and C++.
● Gain the basic knowledge of video security, such as camera, PTZ control, and alarm.
For getting started, you are recommended to read this manual in the following order to help you
fast learn the available capabilities and APIs.
1. Take a glance at the terms and definitions in Terms and Definitions .
2. See open capabilities in Open Capabilities for reference.
3. See API calling flows and typical applications in Typical Applications .
4. Check the APIs to be used based on your service needs.
5. See API calling rules, signature and authentication, and response rules in Protocol Summary .
6. See API reference to get the request URI, request parameters, and response parameters in API
Reference .
1
HikCentral Connect OpenAPI Developer Guide
Note
For alarm types that can be received, see details in Alarm Type .
2
HikCentral Connect OpenAPI Developer Guide
Note
● If you get a message via POST /api/hccgw/alarm/v1/mq/messages and confirm that you have
received the message via POST /api/hccgw/alarm/v1/mq/messages/complete , you will no
longer be able to get the message even if you call the API again.
● The message can be stored for three days by default.
● It is recommended that you call the two APIs of getting alarm messages and confirming that you
have received the messages every 500ms. Make sure that you start to time the interval after you
have finished calling the API of confirming that you have received the messages.
3
HikCentral Connect OpenAPI Developer Guide
4
HikCentral Connect OpenAPI Developer Guide
Note
Currently no-plugin video playing is only supported in Singapore, North America, South America,
and Europe. It is not supported in India or Russia.
5
HikCentral Connect OpenAPI Developer Guide
6
HikCentral Connect OpenAPI Developer Guide
Note
● Each on-board device and each vehicle are in one-to-one correspondence. An on-board device
cannot be linked to multiple vehicles.
● Messages are raw information uploaded by device. Alarms are messages processed by alarm
rules on the platform.
● You can subscribe to and get alarms of vehicles linked to on-board devices ( Alarm Type ). See
details of API calling flow in Subscribe to and Get Alarms .
● You can subscribe to and get messages of vehicles linked to on-board devices ( Message Type ).
See details of API calling flow in Subscribe to and Get Messages .
● The information of a vehicle linked to an on-board device includes the license plate No., driver's
name, driver's phone No., vehicle type, annotations, and linked on-board device serial No.
● Live view, playback, and two-way audio without plug-in are all developed via the JSSDK toolkit.
For two-way audio with on-board devices, you should enter 1 as the camera channel No.
Term Description
OpenAPI The publicly available APIs (application programming
interfaces) that provide developers with programmatic access
to proprietary software applications or web services.
HikCentral Connect A video security management platform.
HTTP Method A set of request methods defined by HTTP to indicate the
desired action to be performed for a given resource. The
useful methods include GET (get resources), PUT (set or
7
HikCentral Connect OpenAPI Developer Guide
Term Description
update resources), POST (add or search resources), and
DELETE (delete resources).
header (Request Header) The supplemental data at the beginning of a request data
block, usually in key-value pairs. For example, "Accept:text/
plain".
path HTTP request path, which follows the domain name or IP
address (port No.). For example, if the request address is
"www.example.com/artemis/api", then the path refers to "/
artemis/api".
query The parameters in the request address. For example, in the
address "www.example.com/artemis/api?a=b&c=d", the
queries are "a" and "c" and their values are "b" and "d"
respectively.
bodyForm The parameters in key-value pairs in the request body sent by
POST method.
AK Access key, which relates with the secret access key. They are
used in pair to encrypt the signature in the request. It refers to
appKey in this manual.
SK Secret access key, which is used to mark the sender and
prevent the request from being modified during signature
encryption. It is used together with the access key and refers
to appSecret in this manual.
Message Refers to the content uploaded by the device actively when
there is no external trigger source.
Alarm Refers to the content uploaded by the device when the
configured alarm rules are triggered.
8
HikCentral Connect OpenAPI Developer Guide
9
HikCentral Connect OpenAPI Developer Guide
10
HikCentral Connect OpenAPI Developer Guide
11
HikCentral Connect OpenAPI Developer Guide
Note
Make sure you properly keep the AK and SK. Once they are leaked, contact the technical
support to get new AK and SK.
3. Request for the token by providing the AK and SK: POST /api/hccgw/platform/v1/token/get .
4. Call other APIs by providing the token and other parameters as needed.
12
HikCentral Connect OpenAPI Developer Guide
Name Description
Transmission Protocol HTTPS is adopted to ensure secure transmission.
Request URL Format of request URL: https://{ hostname }:hostname:{port}/{ uri }
● hostname: the IP address or domain name of HikCentral Connect.
13
HikCentral Connect OpenAPI Developer Guide
Response Message
The response message is in JSON format and encoded by UTF-8 rule. It consists of multiple output
parameters, and the parameters are named by camel case. Refer to the parameter description
below.
{
"errorCode": //Status/error code.
"message": //Error description (not returned for success).
"data"://Returned data in details.
}
Status/Error Code
The status or error code will be returned in the response message. The status code is 0 for success
and other values for failure. Refer to Status and Error Code for details.
Example
Success
{
"data": {
"accessToken": "hcc.vh5hb9q495qjjei71g3pdmrjslo5wyti",
14
HikCentral Connect OpenAPI Developer Guide
"expireTime": 1655193135,
"userId": "8a7485aa7f209dd5017f2141adff0019"
},
"errorCode": "0"
}
Example
Failure
{
"message": "SECRET_KEY_NOT_EQUALS{OPEN300002}",
"errorCode": "OPEN300002"
}
15
HikCentral Connect OpenAPI Developer Guide
Note
● By calling physical resource APIs, you can obtain the information of the physical devices,
including single-resource information and all-resource information.
● By calling logical resource APIs, you can obtain site information, root area information,
subordinate organization information of parent areas, single-area information, all-area
information, and detailed area information. Camera information, as a kind of logical resource
added to areas, is part of the area information.
16
HikCentral Connect OpenAPI Developer Guide
Note
● It is recommended that the interval of getting alarm information be 500ms.
● If messages are not pulled over within 2 days, the alarm subscription will be canceled.
● If the same alarm is uploaded for the second time, it will be uploaded with attachments (e.g.,
pictures or videos).
17
HikCentral Connect OpenAPI Developer Guide
18
HikCentral Connect OpenAPI Developer Guide
Note
● It is recommended that the interval of getting messages be 500 ms.
● If messages are not received within 2 days, the message subscription will be canceled.
19
HikCentral Connect OpenAPI Developer Guide
Figure 4-5 Sequence Diagram of Starting Live View / Playback Without Plug-in
20
HikCentral Connect OpenAPI Developer Guide
21
HikCentral Connect OpenAPI Developer Guide
5. With the JSSDK in the development kit , the caller can perform live view and video intercom
without plug-in.
6. Based on the received video intercom messages, the caller can call POST /api/hccgw/
devcall/v1/call/receive to respond to the received calls, and can then call POST /api/
hccgw/acs/v1/remote/control to open the door remotely.
22
HikCentral Connect OpenAPI Developer Guide
23
HikCentral Connect OpenAPI Developer Guide
24
HikCentral Connect OpenAPI Developer Guide
Note
- When linking the on-board device with an existing vehicle, make sure the device and vehicle
are in the same area.
- All logical resources of the added on-board devices will be imported to the area of linked
vehicles.
- Support separate management of on-board devices and linked vehicles. See details in Device
Information and On-Board Monitoring Services respectively.
2. Call POST /api/hccgw/resource/v1/picture/uploadparam/get to upload pictures and link them
with vehicles. Currently a vehicle can only be linked with one picture.
3. When you add vehicles, the corresponding vehicle area will be created by the platform. The
vehicle and its area share the same ID. If you delete a vehicle, its area will also be deleted. See
details of deleting vehicles in POST /api/hccgw/resource/v1/areas/resources/delete .
Note
The free package only supports adding 10 vehicles and 8 camera channels, and some functions
are limited. If you want to access more functions, please contact the service provider.
25
HikCentral Connect OpenAPI Developer Guide
Note
This manual lists all the available APIs provided by HikCentral Connect. However, some APIs may be
unavailable since it depends on the capabilities of different encoding devices. You can view the
available API list for the current Portal of HikCentral Connect in the developing environment.
POST /api/hccgw/platform/v1/token/get
Get the authentication token for calling the development platform via appkey(AK) and
appSecret(SK) verification.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/platform/v1/token/get
Request Parameters
Request Example
{
"appKey":"cewm9w0qjhv3i290uufnyxzp25l6ym7e",
"secretKey":"s77w0ckmlyetp2lhfqw8p8zgm23pkpw7"
}
26
HikCentral Connect OpenAPI Developer Guide
Response Parameters
Response Example
{
"data": {
"accessToken": "hcc.vh5hb9q495qjjei71g3pdmrjslo5wyti",
"expireTime": 1655193135,
"userId": "8a7485aa7f209dd5017f2141adff0019"
"areaDomain": "https://isgp.hikcentralconnect.com"
},
"errorCode": "0"
}
27
HikCentral Connect OpenAPI Developer Guide
GET /api/hccgw/platform/v1/systemproperties
Get the HikCentral Connect platform information.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/platform/v1/systemproperties
Request Parameters
Response Parameters
Response Example
{
"data": {
"systemGUID": "fe436da09dca4e46996c1178f06c7911"
},
28
HikCentral Connect OpenAPI Developer Guide
"errorCode": "0"
}
GET /api/hccgw/platform/v1/servicepackage
Get the package usage information (package type, total purchases, etc.) of the HikCentral Connect
platform where the current user is logged in.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/platform/v1/servicepackage
Request Parameters
Response Parameters
Response Example
{
"data": {
"packageOverview": {
"servicePackageOverview": [
29
HikCentral Connect OpenAPI Developer Guide
{
"serviceType": "serviceVideo",
"packageType": "3",
"usingAmount": "18",
"remainingAmount": "92",
"totalAmount": "110",
"lastExpiredTime": "1655697132000",
"packageStatus": 2,
"cloudStorage": {
"usingAmountFor7Days": "0",
"usingAmountFor30Days": "2",
"remainingAmount": "6"
}
},
{
"serviceType": "serviceVehicle",
"packageType": "1",
"usingAmount": "9",
"remainingAmount": "1",
"totalAmount": "10",
"lastExpiredTime": "4102329600000",
"packageStatus": 0
}
]
},
"packageDetails": {
"servicePackage": [
{
"serviceType": "serviceVideo",
"packageType": "3",
"activationTime": "1645243200000",
"expiredTime": "1655697132000",
"cloudStorage": []
},
{
"serviceType": "serviceVideo",
"packageType": "3",
"activationTime": "1647834732000",
"expiredTime": "1655783532000",
"cloudStorage": []
},
{
"serviceType": "serviceVideo",
"packageType": "1",
"activationTime": "1645530404870",
"expiredTime": "7257916800000",
"cloudStorage": []
},
{
"serviceType": "serviceVehicle",
"packageType": "1",
"activationTime": "1645530404870",
30
HikCentral Connect OpenAPI Developer Guide
"expiredTime": "7257916800000"
}
]
}
},
"errorCode": "0"
}
GET /api/hccgw/platform/v1/streamtoken/get
Get the Hik-Connect streaming token via the current account, and stream via Hik-Connect SDK
according to the information returned by the API.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/platform/v1/streamtoken/get
Request Parameters
Response Parameters
31
HikCentral Connect OpenAPI Developer Guide
Note
The validity period of the token is 7
days, within which you can call this
API repeatedly to refresh the token
so that the remaining validity period
will be restored to 7 days again.
Response Example
{
"data": {
"appKey": "ceec5568a64916c72dbeb75f2c6bb3ef",
"appToken": "at.5rmgt7658l535evhapzn3h4b370yxhft-4u9zipalvq-14f9b7j-vuvcag8hn",
"streamAreaDomain": "https://isgpopen.ezvizlife.com",
"expireTime": "1655719632454"
},
"errorCode": "0"
}
POST /api/hccgw/platform/v1/users/get
Get the system user list via the current account. The user list obtained can be used in alarm rule
configuration.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/platform/v1/users/get
32
HikCentral Connect OpenAPI Developer Guide
Request Parameters
Request Example
{
"pageIndex":1,
"pageSize":10
Response Parameters
33
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
"totalCount": 5,
"pageIndex": 1,
"pageSize": 10,
"user": [
{
"id": "8a74899f82157836018215dc643d037f",
"name": "22"
},
{
"id": "8a74899f82157836018215b5c7aa0377",
"name": "11"
},
{
"id": "8a748b0d82142e4f0182150971c10369",
"name": "222333"
},
{
"id": "8a748b3181a510aa0181a53fef2e1210",
"name": "lmklmk"
},
{
"id": "8a7489d68161eaf9018161f84bb70004",
"name": "abc"
}
]
},
"errorCode": "0"
}
Device Information
POST /api/hccgw/resource/v1/devices/add
Add device by specifying the device serial No., etc.
34
HikCentral Connect OpenAPI Developer Guide
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/devices/add
Request Parameters
Note
This node is required when the
device category is on-board
device.
Request Example
{
"deviceCategory": "encodingDevice",
"deviceInfo": {
"name": "ceshi",
"ezvizSerialNo": "G81652987",
"ezvizVerifyCode": "hcc12345",
"userName": "",
"password": "",
"streamSecretKey":""
},
"importToArea": {
"areaID": "",
"enable": "0"
},
"timeZone": {
"id": "26",
"applyToDevice": "1"
}
}
35
HikCentral Connect OpenAPI Developer Guide
Response Parameters
Response Example
{
"data": {
"addDeviceResponse": {
"failed": 1,
"succeeded": 0,
"total": 1,
"deviceList": [
{
"alias": "ceshi",
"deviceId": "",
"deviceSerial": "G81652987",
"errorCode": "EVZ20010"
}
]
}
},
"errorCode": "0"
}
POST /api/hccgw/resource/v1/devices/update
Edit device information.
36
HikCentral Connect OpenAPI Developer Guide
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/devices/update
Request Parameters
Request Example
{
"deviceInfo":{
"id":"4606458718594636bb0487029f759684",
"name":"NVR_test221",
"userName":"admin",
"password":"Abc12345"
},
"timeZone":{
"id":"19",
"applyToDevice":"1"
}
}
Response Parameters
Response Example
{
"errorCode": "0"
}
37
HikCentral Connect OpenAPI Developer Guide
POST /api/hccgw/resource/v1/devices/get
Get the device list by specifying device information.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/devices/get
Request Parameters
38
HikCentral Connect OpenAPI Developer Guide
Request Example
{
"pageIndex":1,
"pageSize":10,
"deviceCategory":"encodingDevice",
"areaID":"420be45bdeb2407c84dc58b3caf056c4",
"filter":{
"matchKey":"0",
"jobNumber":"0"
}
}
Response Parameters
Response Example
{
"data": {
"pageIndex": 1,
"pageSize": 10,
"totalCount": 2,
"device": [
{
"id": "037d62d6cf0744e39d2274b64fdd279c",
"name": "10.18.67.249",
"category": "encodingDevice",
39
HikCentral Connect OpenAPI Developer Guide
"type": "iDS-9664NXI-I8/X",
"serialNo": "J88106219",
"version": "V4.60.110 build 220303",
"timeZone": "30",
"onlineStatus": 1,
"addTime": "2022-06-20 11:12:10"
},
{
"id": "4481afd6a2ee425eaa9ad77e8fe491f0",
"name": "F68147103",
"category": "encodingDevice",
"type": "DS-9664NI-I8",
"serialNo": "F68147103",
"version": "V4.40.220 build 210125",
"timeZone": "30",
"onlineStatus": 1,
"addTime": "2022-06-20 01:35:10"
}
]
},
"errorCode": "0"
}
POST /api/hccgw/resource/v1/devicedetail/get
Search for and get the device information by device serial No.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/devicedetail/get
Request Parameters
Request Example
{
"deviceSerialNo":"F68147103 "
}
40
HikCentral Connect OpenAPI Developer Guide
Response Parameters
Response Example
{
"data": {
"device": {
"baseInfo": {
"id": "5c263e4293c84eae81720e9e481e33ad",
"name": "F68147103",
"category": "encodingDevice",
"serialNo": "F68147103",
"version": "V4.40.220 build 210125",
"type": "DS-9664NI-I8",
"streamEncryptEnable": "1",
"availableCameraChannelNum": "4",
"availableAlarmInputChannelNum": "10",
"availableAlarmOutputChannelNum": "14"
},
"cameraChannel": [
{
"id": "5b206babd3fd4439b4884acb86e8bd89",
"name": "IPCamera 01",
"no": "1",
"online": "0",
"area": {
"id": "",
"name": ""
}
},
{
41
HikCentral Connect OpenAPI Developer Guide
"id": "1c693dbf435e4e5ca048d4dd7efbb33b",
"name": "IPdome",
"no": "2",
"online": "1",
"area": {
"id": "",
"name": ""
}
}
],
"alarmInputChannel": [
{
"id": "1facb548c63746eb8c3eea5b510495d8",
"name": "D 201",
"no": "201",
"online": "1",
"area": {
"id": "",
"name": ""
}
},
{
"id": "dc7b7129f14a424fa8d04bfc846c0343",
"name": "D 202",
"no": "202",
"online": "1",
"area": {
"id": "",
"name": ""
}
}
],
"alarmOutputChannel": [
{
"id": "3a900e5c84b64ab9b0bb1e92089c8c23",
"name": "A 1",
"no": "1",
"online": "1",
"area": {
"id": "",
"name": ""
}
},
{
"id": "4c5fbf177a5c43efa265479e0f9fbb61",
"name": "A 2",
"no": "2",
"online": "1",
"area": {
"id": "",
"name": ""
}
42
HikCentral Connect OpenAPI Developer Guide
}
],
"onlineStatus": 1,
"timeZoneID": "30"
}
},
"errorCode": "0"
}
POST /api/hccgw/resource/v1/devices/delete
Delete device by the specifying device ID, etc.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/devices/delete
Request Parameters
Request Example
{
"deviceID":[
"4ab20c2f3ba54daea4e0f569b622c362"
],
"deviceCategory":"encodingDevice"
}
43
HikCentral Connect OpenAPI Developer Guide
Response Parameters
Response Example
{
"errorCode": "0"
}
POST /api/hccgw/resource/v1/device/capturePic
Capture pictures by camera channel.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/device/capturePic
Request Parameters
Request Example
{
"deviceSerial": "F68147103",
"channelNo": 1
}
44
HikCentral Connect OpenAPI Developer Guide
Response Parameters
Response Example
{
"data": {
"captureUrl":"http://10.19.215.172:31677/hcc-dev-2/hccopen/capture/2023-01-12/F68147103/1/29668554-
c828-44ed-b13c-faba96c3697c.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230112T024359Z&X-
Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=minio123%2F20230112%2Fap-
southeast-1%2Fs3%2Faws4_request&X-Amz-
Signature=64065497a8b887c1845f4443029096c12daf220533a8ae3bf4662d8f4414a6ff"
},
"errorCode": "0"
}
POST /api/hccgw/resource/v1/device/{deviceId}/refresh
Synchronously refresh device status.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/device/{deviceId}/refresh
Request Parameters
45
HikCentral Connect OpenAPI Developer Guide
Request Example
http://dev-3.hikcentralconnect.com/api/hccgw/resource/v1/device/
c6a91398ffeb46888ace8f4667483095 /refresh
Response Parameters
Response Example
{
"data": {
"deviceId": "1aed864a17214f4f8d43f258b9bb4d88",
"status": 1
},
"errorCode": "0"
}
Or
{
"data": {
"deviceId": "1aed864a17214f4f8d43f258b9bb4d88",
"errorCode": " CCF021307"
},
"errorCode": "0"
}
46
HikCentral Connect OpenAPI Developer Guide
Areas
POST /api/hccgw/resource/v1/areas/add
Add area by specifying area-related information.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/add
Request Parameters
Request Example
{
"parentAreaID":"-1",
"areaName":"test_mgz2"
}
Response Parameters
47
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
"areaID": "1aed864a17214f4f8d43f258b9bb4d88"
},
"errorCode": "0"
}
POST /api/hccgw/resource/v1/areas/get
Get the area list.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/get
Request Parameters
48
HikCentral Connect OpenAPI Developer Guide
Request Example
{
"pageIndex":"1",
"pageSize":"10",
"filter":{
"parentAreaID":"-1",
"includeSubArea":1
}
}
Response Parameters
49
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
"totalCount": 2,
"pageIndex": 1,
"pageSize": 10,
"area": [
{
"id": "1d3797d6f5c84b4c9720f2d1453b3516",
"name": "10.18.67.249",
"parentAreaID": "-1",
"existSubArea": "0"
},
{
"id": "d9eaa479588b48cb9f79a59ab5fb41b9",
"name": "F68147103",
"parentAreaID": "-1",
"existSubArea": "0"
}
]
},
"errorCode": "0"
}
50
HikCentral Connect OpenAPI Developer Guide
POST /api/hccgw/resource/v1/areadetail/get
Get area information by specifying area ID.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areadetail/get
Request Parameters
Request Example
{
"areaID":[
"1d3797d6f5c84b4c9720f2d1453b3516","d9eaa479588b48cb9f79a59ab5fb41b9","test"
]
}
Response Parameters
51
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
"area": [
{
"id": "1d3797d6f5c84b4c9720f2d1453b3516",
"name": "10.18.67.249",
"parentAreaID": "-1",
"existSubArea": 0,
"areaPath": "area0->area1->area2"
},
{
"id": "d9eaa479588b48cb9f79a59ab5fb41b9",
"name": "F68147103",
"parentAreaID": "-1",
"existSubArea": 0
},
{
"id": "test",
"message": "Area is not exist([id=test]){VMS021101}",
"errorCode": "VMS021101"
}
]
},
"errorCode": "0"
}
POST /api/hccgw/resource/v1/areas/resources/add
Add resource to area by specifying the resource information.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/resources/add
52
HikCentral Connect OpenAPI Developer Guide
Request Parameters
Request Example
{
"areaID":"1d3797d6f5c84b4c9720f2d1453b3516",
"devChannel":[
{
"resourceName":"D 201",
"resourceType":"alarmInput",
"channelID":"564138cd313d41dab82b41e73757edaa"
}
53
HikCentral Connect OpenAPI Developer Guide
]
}
Response Parameters
Response Example
{
"data": {
"areaID": "1d3797d6f5c84b4c9720f2d1453b3516",
"devChannel": [
{
"id": "239a3b48baf64f20bdce8aee4a84d917",
"name": "D 201",
"channelID": "564138cd313d41dab82b41e73757edaa",
"resourceType": "alarmInput",
"errorCode": "0"
}
]
},
"errorCode": "0"
}
POST /api/hccgw/resource/v1/areas/resources/delete
Delete resources from an area by resource IDs.
54
HikCentral Connect OpenAPI Developer Guide
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/resources/delete
Request Parameters
Request Example
{
"ids": ["1d3797d6f5c84b4c9720f2d1453b3516"]
}
Response Parameters
Response Example
{
"errorCode": "0"
}
POST /api/hccgw/resource/v1/areas/cameras/get
Get camera list by specifying the camera information.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/cameras/get
55
HikCentral Connect OpenAPI Developer Guide
Request Parameters
Request Example
{
"pageIndex":"1",
"pageSize":"10",
"filter":{
"areaID":"-1",
"includeSubArea":"1",
"deviceID":"",
"deviceSerialNo":"",
"cameraID":[
"ba1e16a1f1084a93a7dc72b21609c380","b6ddbebb36584a51858edbba30c7283c"
]
56
HikCentral Connect OpenAPI Developer Guide
}
}
Response Parameters
Response Example
{
"data": {
"totalCount": 2,
"pageIndex": 1,
"pageSize": 10,
"camera": [
{
"id": "ba1e16a1f1084a93a7dc72b21609c380",
"name": "Camera 13",
"abilitySet": "1,21,22,2002,2021,2022",
"online": "1",
"area": {
"id": "128bb54e279144b0a0d324b36b8f262b",
"name": "10.66.250.14"
},
"device": {
"devInfo": {
"id": "497c3301093b4678b32033a8dad10dab",
"category": "0",
57
HikCentral Connect OpenAPI Developer Guide
"serialNo": "J32355571",
"streamSecretKey": ""
},
"channelInfo": {
"id": "00889ceac8c44267904b2c500bc1420b",
"no": "13"
}
}
},
{
"id": "b6ddbebb36584a51858edbba30c7283c",
"name": "IPcamera1",
"abilitySet": "1,21,22,2002,2015,2016,2021,2022,2023,2024,2027,2029,2030",
"online": "1",
"area": {
"id": "b105274991b2460097a0cd5c83399cfe",
"name": "10.66.250.104"
},
"device": {
"devInfo": {
"id": "f401a9a6d4e743618ddd4b2dae9e3866",
"category": "0",
"serialNo": "J32353319",
"streamSecretKey": ""
},
"channelInfo": {
"id": "0090c1cd4bf44379b500cbbc67085217",
"no": "61"
}
}
}
]
},
"errorCode": "0"
}
POST /api/hccgw/resource/v1/areas/alarmoutputs/get
Get the information of alarm output resource.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/alarmoutputs/get
58
HikCentral Connect OpenAPI Developer Guide
Request Parameters
Request Example
{
"pageIndex":"1",
"pageSize":"10",
"filter":{
"areaID":"-1",
"includeSubArea":"1",
"deviceID":"",
"deviceSerialNo":""
59
HikCentral Connect OpenAPI Developer Guide
}
}
Response Parameters
Response Example
{
"data": {
"totalCount": 2,
"pageIndex": 1,
"pageSize": 10,
"alarmOutput": [
{
"id": "4944007e0a154eabaa8ee9c337f0525c",
"name": "A 1",
"abilitySet": "",
"online": "1",
"area": {
"id": "2174986f377c4a75a10e03e757be33f6",
"name": "10.66.8.48"
},
"device": {
"devInfo": {
"id": "2ee24be89de1467faaf4d9f33ddebb48",
60
HikCentral Connect OpenAPI Developer Guide
"category": "0",
"serialNo": "J72878604",
"streamSecretKey": ""
},
"channelInfo": {
"id": "b58a0172ab504c9f98060456a3c7069f",
"no": "1"
}
}
},
{
"id": "488615f2caa944b1b7507efd7bb08c23",
"name": "A 2",
"abilitySet": "",
"online": "1",
"area": {
"id": "2174986f377c4a75a10e03e757be33f6",
"name": "10.66.8.48"
},
"device": {
"devInfo": {
"id": "2ee24be89de1467faaf4d9f33ddebb48",
"category": "0",
"serialNo": "J72878604",
"streamSecretKey": ""
},
"channelInfo": {
"id": "373398c10ef3464d86ea850fcd2184e2",
"no": "2"
}
}
}
]
},
"errorCode": "0"
}
POST /api/hccgw/resource/v1/areas/alarminputs/get
Get information of alarm input resources.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/alarminputs/get
61
HikCentral Connect OpenAPI Developer Guide
Request Parameters
Request Example
{
"pageIndex":"1",
"pageSize":"10",
"filter":{
"areaID":"-1",
"includeSubArea":"1",
"deviceID":"",
"deviceSerialNo":""
62
HikCentral Connect OpenAPI Developer Guide
}
}
Response Parameters
Response Example
{
"data": {
"totalCount": 2,
"pageIndex": 1,
"pageSize": 10,
"alarmOutput": [
{
"id": "4944007e0a154eabaa8ee9c337f0525c",
"name": "A 1",
"abilitySet": "",
"online": "1",
"area": {
"id": "2174986f377c4a75a10e03e757be33f6",
"name": "10.66.8.48"
},
"device": {
"devInfo": {
"id": "2ee24be89de1467faaf4d9f33ddebb48",
63
HikCentral Connect OpenAPI Developer Guide
"category": "0",
"serialNo": "J72878604",
"streamSecretKey": ""
},
"channelInfo": {
"id": "b58a0172ab504c9f98060456a3c7069f",
"no": "1"
}
}
},
{
"id": "488615f2caa944b1b7507efd7bb08c23",
"name": "A 2",
"abilitySet": "",
"online": "1",
"area": {
"id": "2174986f377c4a75a10e03e757be33f6",
"name": "10.66.8.48"
},
"device": {
"devInfo": {
"id": "2ee24be89de1467faaf4d9f33ddebb48",
"category": "0",
"serialNo": "J72878604",
"streamSecretKey": ""
},
"channelInfo": {
"id": "373398c10ef3464d86ea850fcd2184e2",
"no": "2"
}
}
}
]
},
"errorCode": "0"
}
POST /api/hccgw/resource/v1/areas/alarminputs/status/get
Get the alarm input status.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/alarminputs/status/get
64
HikCentral Connect OpenAPI Developer Guide
Request Parameters
Request Example
{
"alarmInputID": [
"2c0a4ab9a2504de4842d95435f3a8620",
"b35b8e9a9326418ca2198ed45709b5bd"
]
}
Response Parameters
Response Example
{
"data": {
65
HikCentral Connect OpenAPI Developer Guide
"alarmInput": [
{
"id": "0da41f0ac59c4debade796914f874148",
"status": 2,
"errorCode": "0"
},
{
"id": "3d75a50c0ae84fc99c19581ef82d1b29",
"status": 1,
"errorCode": "0"
}
]
},
"errorCode": "0"
}
POST /api/hccgw/resource/v1/areas/alarmoutputs/control
Edit alarm output status.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/alarmoutputs/control
Request Parameters
Request Example
{
"alarmOutputOperation":[
{
66
HikCentral Connect OpenAPI Developer Guide
"alarmOutputID":"b58a0172ab504c9f98060456a3c7069f",
"operation":1
}
]
}
Response Parameters
Response Example
{
"data": {
"alarmOutputOperation": [
{
"alarmOutputID": "b58a0172ab504c9f98060456a3c7069f",
"alarmOutputState": 1,
"errorCode": "0"
}
]
},
"errorCode": "0"
}
POST /api/hccgw/resource/v1/areas/alarmoutputs/status/get
Get alarm output status.
67
HikCentral Connect OpenAPI Developer Guide
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/alarmoutputs/status/get
Request Parameters
Request Example
{
"alarmOutputID":[
"b58a0172ab504c9f98060456a3c7069f"
]
}
Response Parameters
Response Example
{
"data": {
"alarmOutput": [
68
HikCentral Connect OpenAPI Developer Guide
{
"id": "b58a0172ab504c9f98060456a3c7069f",
"status": 1,
"errorCode": "0"
}
]
},
"errorCode": "0"
}
POST /api/hccgw/resource/v1/areas/cameras/thumbnail/get
Get camera thumbnail by specifying camera information.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/cameras/thumbnail/get
Request Parameters
Request Example
{
"cameraID":"ba1e16a1f1084a93a7dc72b21609c380",
"refresh":1
}
Response Parameters
69
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
"pictureURL": "https://testuslite.ezvizlife.com:443/https://testuslite.ezvizlife.com/image/pic/
ad3fc9cb47854fceadcf27abe4da87b8?c=59c1da51"
},
"errorCode": "0"
}
Door
POST /api/hccgw/resource/v1/areas/doors/get
Get door information.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/doors/get
Request Parameters
70
HikCentral Connect OpenAPI Developer Guide
Request Example
{
"pageIndex":1,
"pageSize":10,
"filter":{
"areaID":"-1",
"includeSubArea":"1",
"deviceID":"",
"deviceSerialNo":""
}
}
71
HikCentral Connect OpenAPI Developer Guide
Response Parameters
Response Example
{
"data": {
"totalCount": 2,
"pageIndex": 1,
"pageSize": 10,
"door": [
{
"id": "9365880922bf49bd8df94cafccf9214c",
"name": "Door TEST 02",
"online": "1",
"area": {
"id": "e3c8840f789a4203ba45f9f106dc9da3",
"name": "APP video intercom testing"
},
"device": {
"devInfo": {
"id": "a4a7ba685065471bae03cf039f23d901",
"category": "0",
"serialNo": "K14891504",
"streamSecretKey": ""
},
72
HikCentral Connect OpenAPI Developer Guide
"channelInfo": {
"id": "288329024512665601",
"no": "2"
}
}
},
{
"id": "b1c47d5d318e438b910f0a38fcc0d54a",
"name": "Door TEST 01",
"online": "1",
"area": {
"id": "e3c8840f789a4203ba45f9f106dc9da3",
"name": "APP video intercom testing"
},
"device": {
"devInfo": {
"id": "a4a7ba685065471bae03cf039f23d901",
"category": "0",
"serialNo": "K14891504",
"streamSecretKey": ""
},
"channelInfo": {
"id": "288329024512665600",
"no": "1"
}
}
}
]
},
"errorCode": "0"
}
Time Zone
POST /api/hccgw/resource/v1/timezone/get
Get the time zone list.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/timezone/get
Request Parameters
73
HikCentral Connect OpenAPI Developer Guide
Response Parameters
Response Example
{
"data": {
"timeZone": [
{
"id": "19",
"standardName": "Central Asia Standard Time",
"displayName": "(UTC+06:00) Astana",
"bias": -360,
"dst": {
"daylightBias": "-60",
"daylightDate": "0:0:0:0:0",
"standardDate": "0:0:0:0:0",
"enable": 0
}
},
{
"id": "1",
"standardName": "Afghanistan Standard Time",
"displayName": "(UTC+04:30) Kabul",
"bias": -270,
"dst": {
74
HikCentral Connect OpenAPI Developer Guide
"daylightBias": "-60",
"daylightDate": "0:0:0:0:0",
"standardDate": "0:0:0:0:0",
"enable": 0
}
}
],
"systemTimeZoneID": "30"
},
"errorCode": "0"
POST /api/hccgw/alarm/v1/mq/subscribe
Subscribe to alarm information.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/alarm/v1/mq/subscribe
Request Parameters
Request Example
{
"subscribeType": 1,
75
HikCentral Connect OpenAPI Developer Guide
"subscribeMode": 1,
"eventType": [0,1]
}
Response Parameters
Response Example
{
"errorCode": "0"
}
POST /api/hccgw/alarm/v1/mq/messages
Get alarm information.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/alarm/v1/mq/messages
Request Parameters
Response Parameters
76
HikCentral Connect OpenAPI Developer Guide
77
HikCentral Connect OpenAPI Developer Guide
"areaName": "1",
"deviceInfo": {
"devID": "38a0c1e93feb4838bcb541cae43d14f6",
"devName": "G95721825"
}
},
"alarmRule": {
"id": "1640597519769669632",
"name": "People Queue Leave",
"description": ""
},
"alarmPriority": {
"id": "0545620a6ed24fdda0673188e334b561",
"level": "1",
"levelName": "1",
"color": "#F40B0B"
},
"markState": "0",
"affirmedState": "0",
"linkageTypes": [],
"linkageConfig": {},
"vehicleRelatedInfo": {},
"queueRelatedInfo": {
"queueInfo": {
"regionID": "123",
"regionName": "122-3232",
"queueThreshold": 15,
"peopleTargetId": 11,
"waitTime": 600,
"startTime": "2023-04-13T19:42:27+08:00",
"endTime": "2023-04-13T20:42:27+08:00"
}
}
}
]
},
"errorCode": "0"
}
POST /api/hccgw/alarm/v1/mq/messages/complete
Confirm that alarms are received by specifying the batchId.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/alarm/v1/mq/messages/complete
78
HikCentral Connect OpenAPI Developer Guide
Request Parameters
Request Example
{
"batchId":"5a32fddc6f5c01e067f7abdfe5348a6c98f64d1fe196b9d54c45b01b50a3a7b5946dbcd91f0a6eca6ec6cddf45
11a78f"
}
Response Parameters
Response Example
{
"errorCode": "0"
}
POST /api/hccgw/alarm/v1/alarmrules/add
Configure alarm rules.
79
HikCentral Connect OpenAPI Developer Guide
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/alarm/v1/alarmrules/add
Request Parameters
Request Example
{
"alarmRule": [
{
"name": "fjx-test",
80
HikCentral Connect OpenAPI Developer Guide
"color": "#ff0000",
"alarmMainCategory": "alarmCategoryVideo",
"alarmSubCategory": "alarmSubCategoryCamera",
"description": "fjx-test",
"enable": 1,
"priority": {
"id": "2f87acf0985e431d852bbaed10aba040"
},
"notification": {
"enable": 1,
"recipients": [
{
"userID": "8a7485aa7f209dd5017f2141adff0019",
"userName": "hccdd2 uat6"
}
]
},
"schedule": {
"type": "1",
"timeSchedule": {
"id": "161a03299fd94914b89accdf0844b0e6"
}
},
"ignoreRecurring": {
"enable": "1",
"timeValue": "15"
},
"eventSource": {
"sourceType": "camera",
"eventType": 10102,
"sourceID": "6a95b98ae34e4eac88f3af8a286bf47c",
"sourceName": "5546G0_191 Camera 01"
}
}
]
}
Response Parameters
81
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"errorCode": "0",
"data": {
"alarmRule": [
{
"name": "fjx-test",
"errorCode": "",
"id": "1658413372250656768"
}
]
}
}
POST /api/hccgw/alarm/v1/alarmrules/get
Get the list of alarm rules.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/alarm/v1/alarmrules/get
Request Parameters
82
HikCentral Connect OpenAPI Developer Guide
Request Example
{
"pageIndex":"1",
"pageSize":"10",
"filter":{
}
}
83
HikCentral Connect OpenAPI Developer Guide
Response Parameters
Response Example
{
"data": {
"totalCount": 1,
"pageIndex": 1,
"pageSize": 10,
"alarmRule": [
{
"id": "1542072136028524544",
"name": "Camera 01-Motion Detection",
"color": "#ff0000",
"enable": 1,
"state": "0",
"alarmMainCategory": "alarmCategoryVideo",
"alarmSubCategory": "alarmSubCategoryCamera",
"notification": {
"enable": 1,
"recipients": [
{
"userID": "8a7489d68161eaf9018161f84bb70004",
"userName": "abc abc"
},
{
"userID": "8a748b3181a510aa0181a53fef2e1210",
"userName": "lmk lmk"
84
HikCentral Connect OpenAPI Developer Guide
}
]
},
"schedule": {
"timeSchedule": {
"id": "8a748e7681618fea018161f847d70000",
"name": ""
},
"type": "1"
},
"priority": {
"id": "0db8cd1c85324e27a1f36c4f5a66e18",
"level": "1",
"levelName": "",
"color": "#F40B0B"
},
"ignoreRecurring": {
"enable": 0,
"timeValue": 15
},
"eventSource": {
"eventType": 10002,
"sourceID": "a1afc31e55af4960900fa6498d67399d",
"sourceType": "camera",
"sourceName": "Camera 01"
}
}
]
},
"errorCode": "0"
}
POST /api/hccgw/alarm/v1/alarmrules/update
Edit alarm rules.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/alarm/v1/alarmrules/update
Request Parameters
85
HikCentral Connect OpenAPI Developer Guide
Request Example
{
"alarmRule": [
{
"id": "1542072136028524544",
"name": "Camera 01-Motion Detection",
"color": "#ff0000",
"enable": 1,
"state": "0",
"alarmMainCategory": "alarmCategoryVideo",
"alarmSubCategory": "alarmSubCategoryCamera",
"notification": {
"enable": 1,
"recipients": [
{
"userID": "8a7489d68161eaf9018161f84bb70004",
"userName": "abc abc"
},
{
"userID": "8a748b3181a510aa0181a53fef2e1210",
"userName": "lmk lmk"
}
]
86
HikCentral Connect OpenAPI Developer Guide
},
"schedule": {
"timeSchedule": {
"id": "8a748e7681618fea018161f847d70000",
"name": ""
},
"type": "1"
},
"priority": {
"id": "0db8cd1c85324e27a1f36c4f5a66e18",
"level": "1",
"levelName": "",
"color": "#F40B0B"
},
"ignoreRecurring": {
"enable": 0,
"timeValue": 15
},
"eventSource": {
"eventType": 10002,
"sourceID": "a1afc31e55af4960900fa6498d67399d",
"sourceType": "camera",
"sourceName": "Camera 01"
}
}
]
}
Response Parameters
87
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"errorCode": "0",
"data": {
"alarmRule": [
{
"name": "fjx-test",
"id": "1658413372250656768"
}
]
}
}
POST /api/hccgw/alarm/v1/alarmpriorities/get
Get the alarm priority list.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/alarm/v1/alarmpriorities/get
Request Parameters
Request Example
{
"pageIndex":"1",
"pageSize":"10"
}
88
HikCentral Connect OpenAPI Developer Guide
Response Parameters
Response Example
{
"data": {
"totalCount": "3",
"pageIndex": "0",
"pageSize": "10",
"alarmpriorities": [
{
"id": "0db8cd1c85324e27a1f36c4f5a66e18",
"level": 1,
"levelName": "",
"color": "#F40B0B",
"audioURL": ""
},
{
"id": "0e17d83ee1b24f239aec7a1a9a69d66",
"level": 3,
"levelName": "",
"color": "#2D8B3D",
"audioURL": ""
},
{
89
HikCentral Connect OpenAPI Developer Guide
"id": "0e1f9742db0d48cea90b5c92b73806d",
"level": 2,
"levelName": "",
"color": "#D79931",
"audioURL": ""
}
]
},
"errorCode": "0"
}
POST /api/hccgw/alarm/v1/receivingschedules/get
Get the list of alarm arming schedule templates.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/alarm/v1/receivingschedules/get
Request Parameters
Request Example
{
"pageIndex":"1",
"pageSize":"10"
}
Response Parameters
90
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
"totalCount": "3",
"pageIndex": "1",
"pageSize": "10",
"alarmpriorities": [
{
"id": "0db8cd1c85324e27a1f36c4f5a66e18",
"level": 1,
"levelName": "",
"color": "#F40B0B",
"audioURL": ""
},
{
"id": "0e17d83ee1b24f239aec7a1a9a69d66",
"level": 3,
"levelName": "",
"color": "#2D8B3D",
"audioURL": ""
},
{
"id": "0e1f9742db0d48cea90b5c92b73806d",
"level": 2,
"levelName": "",
"color": "#D79931",
"audioURL": ""
91
HikCentral Connect OpenAPI Developer Guide
}
]
},
"errorCode": "0"
}
POST /api/hccgw/alarm/v1/alarmlinkage/add
Configure alarm linkage.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/alarm/v1/alarmlinkage/add
Request Parameters
Request Example
{
"alarmLinkage": [
{
"alarmRuleID": "b9619db8ee50475cbf8c6c89cbfb5dbd",
"linkageItem": [
{
"linkageType": "LinkCamera",
"linkageConfig": {
"linkCamera": {
"preRecordTime": 3,
"postRecordTime": 15,
"camera": [
{
92
HikCentral Connect OpenAPI Developer Guide
"id": "21f84da3f9604a30a3f5b6975fa0f38a",
"name": "5546G0_191 Camera 01",
"areaID": "450ac442bf4e4daf9f04e1af1bc90be7",
"areaName": "_2022-05-07T201804_0"
}
]
}
}
},
{
"linkageType": "LinkCapturePicture",
"linkageConfig": {
"linkCapturePicture": {
"captureInterval": 3,
"captureMode": 2,
"camera": [
{
"resourceType": "1001",
"id": "21f84da3f9604a30a3f5b6975fa0f38a",
"name": "5546G0_191 Camera 01",
"areaID": "450ac442bf4e4daf9f04e1af1bc90be7",
"areaName": "_2022-05-07T201804_0"
}
]
}
}
},
{
"linkageType": "LinkAlarmOutput",
"linkageConfig": {
"linkAlarmOutput": {
"autoClose": 0,
"autoCloseTime": 15,
"alarmOutput": [
{
"id": "d5418485784b44f79b52e24a64bf2574",
"name": "A 2",
"areaID": "1b65a68be27d41be9f2ed7ddc7045276",
"areaName": "111"
}
]
}
}
},
{
"linkageType": "LinkEMail",
"linkageConfig": {
"linkEmail": {
"emailTemplateId": "8a748675809d8e3901809d9c57370000",
"emailTemplateName": "test22"
}
}
93
HikCentral Connect OpenAPI Developer Guide
}
]
}
]
}
Response Parameters
Response Example
{
"data": {
"alarmLinkage": [
{
"alarmRuleID": "1651173299037802496",
"itemID": "5BE20D67677647EF8D448E67E4AFB411",
"linkageType": "LinkCamera",
"errorCode": "0"
}
]
},
"errorCode": "0"
}
94
HikCentral Connect OpenAPI Developer Guide
POST /api/hccgw/alarm/v1/alarmlog
Get the list of alarm logs.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/alarm/v1/alarmlog
Request Parameters
Request Example
{
"pageIndex":1,
"pageSize":5,
"timeRange":{
"beginTime":"2023-04-23 00:00:00",
"endTime":"2023-04-24 00:00:00"
},
"areaID":"565623256767",
"eventTypeList":["10061","10657"]
}
95
HikCentral Connect OpenAPI Developer Guide
Response Parameters
Response Example
{
"data": {
"pageIndex": 1,
"pageSize": 1,
"moreData": 0,
"alarmLogList": [
{
"guid": "9af74b16484d43eaaa64c833c05bcb3a",
"dataRetransmission": 1,
"alarmState": "0",
"pulseAlarm": "0",
"alarmMainCategory": "alarmCategoryVideo",
"alarmSubCategory": "alarmCategoryVideo",
"timeInfo": {
"startTime": "2023-04-26T04:00:00Z",
"endTime": "2023-04-26T04:00:15Z"
},
"eventSource": {
"eventType": "100657",
96
HikCentral Connect OpenAPI Developer Guide
"sourceID": "a333cd708cd542be975e8f1298cc8aa1",
"sourceName": "201",
"sourceType": "camera",
"areaID": "96c4b7293d4a4a30818c988d1a79b438",
"areaName": "11",
"deviceInfo": {
"devID": "8838bae9a94b4d0591a13bd16bcebe43",
"devName": "K44201853",
"devCategory": "2001"
}
},
"alarmRule": {
"id": "1650433180307689472",
"name": "201-Leaving Queue Detection",
"description": ""
},
"alarmPriority": {
"id": "1",
"level": "1",
"levelName": "1",
"color": "#ff1122"
},
"markState": "0",
"affirmedState": "0",
"fileInfo": {},
"queueRelatedInfo": {
"queueInfo": {
"regionID": "1",
"peopleTargetId": 3438,
"waitTime": 310,
"startTime": "2023-04-21T10:50:25+08:00",
"endTime": "2023-04-21T10:55:35+08:00",
"queueThreshold": 15
}
}
}
]
},
"errorCode": "0"
}
97
HikCentral Connect OpenAPI Developer Guide
POST /api/hccgw/rawmsg/v1/mq/subscribe
Subscribe to messages.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/rawmsg/v1/mq/subscribe
Request Parameters
Request Example
{
"subscribeType":1,
"msgType": ["Msg330001","Msg330002"]
}
Response Parameters
98
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"errorCode": "0"
}
POST /api/hccgw/rawmsg/v1/mq/messages
After you subscribe to messages, you can get messages manually from the device. It is
recommended that the interval of getting messages be 500 ms.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/rawmsg/v1/mq/messages
Request Parameters
Response Parameters
99
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
"batchId":
"5823e397664b41e677fab5c4ee6e8c3fc8f60012f480a6c94e40e60501b8b7f59468bcd91f0a6eca6ec6cddf4511a78f",
"remainingNumber": 0,
"event": [
{
"basicInfo": {
"occurrenceTime": "2023-05-08 11:15:26",
"systemId": "855362005e074fbba3f2400d7fba3670",
"msgType": "Msg330001",
"resource": {
"id": "25051e2467f44cf5947493a56921ca4c",
"name": "111",
"areaName": "333"
},
"device": {
"id": "0d961d4a05264d4b848522d3414eca3a",
"name": "K70728087",
"category": "mobileDevice"
}
},
"data": {
"vehicleRelatedInfo": {
"gpsInfo": {
"ew": "E",
"lng": "6.943345",
"ns": "N",
"lat": "50.331554",
"direction": 32759,
"height": 6090,
"speed": 33333
},
"vehicleInfo": {
"licensePlate": "111",
"driverName": " ",
"driverPhone": "",
"id": "25051e2467f44cf5947493a56921ca4c",
"speedLimit": 8200000
}
}
}
},
{
"basicInfo": {
"occurrenceTime": "2023-05-05 11:15:32",
"systemId": "855362005e074fbba3f2400d7fba3670",
"msgType": "Msg330502",
"resource": {
100
HikCentral Connect OpenAPI Developer Guide
"id": "25051e2467f44cf5947493a56921ca4c",
"name": "111",
"areaName": "333"
},
"device": {
"id": "0d961d4a05264d4b848522d3414eca3a",
"name": "K70728087",
"category": "mobileDevice"
}
},
"picture": [],
"video": [],
"data": {
"vehicleRelatedInfo": {
"gpsInfo": {
"ew": "E",
"lng": "6.943345",
"ns": "N",
"lat": "50.331551",
"direction": 32759,
"height": 6090,
"speed": 33333
},
"vehicleInfo": {
"licensePlate": "111",
"driverName": " ",
"driverPhone": "",
"id": "25051e2467f44cf5947493a56921ca4c",
"speedLimit": 8200000
}
}
},
"uuid": "ba28708fd5664a7281bc764925d68a28",
"update": false
}
]
},
"errorCode": "0"
}
POST /api/hccgw/rawmsg/v1/mq/messages/complete
Confirm that message consuming is finished according to the input batchId. Without confirming,
you will get the same data continuously. After confirming, you will get the new data.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/rawmsg/v1/mq/messages/complete
101
HikCentral Connect OpenAPI Developer Guide
Request Parameters
Request Example
{
"batchId":"4075e8d16a4b4ce63dabebcdba3cd37e83b65a13edd5b4d34343ef595ab6b5a7946a86e61d086cc86cc4cfdd
4713a58d"
}
Response Parameters
Response Example
{
"errorCode": "0"
}
102
HikCentral Connect OpenAPI Developer Guide
POST /api/hccgw/video/v1/recordsettings/get
Get the recording schedule.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/video/v1/recordsettings/get
Request Parameters
Request Example
{
"cameraId":[
"2aeec98c14a4427f9ace6c48e91ab4cc"
]
}
Response Parameters
103
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
"recordSetting": [
{
"cameraID": "2aeec98c14a4427f9ace6c48e91ab4cc",
"enableLocalStorage": 1,
"localStorage": {
"scheduleTemplateId": "1",
"recordingStreamType": 1,
"postRecordTime": 10,
"anr": 0,
"storageTime": 0
},
"enableCloudStorage": 0,
"cloudStorage": {}
}
]
},
"errorCode": "0"
}
POST /api/hccgw/video/v1/live/address/get
Get the address of live view or playback. You need to use JS SDK for live view and playback.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/video/v1/live/address/get
Request Parameters
104
HikCentral Connect OpenAPI Developer Guide
Request Example
{
"type":"1",
"code":"1111qqqq",
"deviceSerial":"G99131454",
"resourceId":"b2f3f6ce0a954045ba77a6acfe8dd89e"
}
Response Parameters
105
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
"id": "1",
“url": "ezopen://[email protected]/G99131454/1.live"
},
"errorCode": "0"
}
POST /api/hccgw/vims/v1/build/search
Search for buildings.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/vims/v1/build/search
106
HikCentral Connect OpenAPI Developer Guide
Request Parameters
Request Example
{
"pageNum": 1,
"pageSize": 64,
"searchCriteria": {
"areaId": "-1",
"isContainSubArea": 1,
"filterName": ""
}
}
Response Parameters
107
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
{
"pageNum": 0,
"pageSize": 0,
"totalNum": 0,
"buildList": [
{
"buildId": "",
"buildName": "",
"areaId": "",
"areaName": "",
"totalRoom": 0,
"totalPerson": 0,
"deviceNames": ""
}
]
}
},
"errorCode": "0"
}
POST /api/hccgw/vims/v1/room/search
Search for rooms.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/vims/v1/room/search
108
HikCentral Connect OpenAPI Developer Guide
Request Parameters
Request Example
{
"pageNum": 1,
"pageSize": 64,
"searchCriteria": {
"areaId": "-1",
"buildId": "",
"isContainSubArea": 1,
"filter": {
"roomNum": "",
"roomName": "",
"personAmount": "",
"email": "",
"mainAccount": ""
}
}}
Response Parameters
109
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
{
"pageNum": 0,
"pageSize": 0,
"totalNum": 0,
"roomList": [
{
"roomId": "",
"roomName": "",
"roomNum": 0,
"buildId": "",
"buildName": "",
"areaId": "",
"areaName": "",
"personAmount": 0,
"mainAccount": "",
"email": "",
"phone": ""
}
]
}
},
"errorCode": "0"
}
POST /api/hccgw/video/v1/isapi/proxypass
Transmit ISAPI protocol transparently.
110
HikCentral Connect OpenAPI Developer Guide
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/video/v1/isapi/proxypass
Request Parameters
Request Example
{
"method": "GET",
"url": "/ISAPI/PTZCtrl/channels/2/presets/1",
"id": "85cff214670c4bc69a8d7436fb93576c",
"contentType": "application/xml",
"body": ""
}
{
“method”: “GET”
“url”: “/ISAPI/PTZCtrl/channels/2/presets”
“deviceSerial”: “85cff214670c4bc69a8d7436fb93576c”
“contentType“: “application/xml”
}
{
“method”: “POST”
“url”: “/ISAPI/PTZCtrl/channels/2/presets”
“deviceSerial”: “85cff214670c4bc69a8d7436fb93576c”
“contentType“: “application/xml”
}
{
“method”: “DELETE”
“url”: “/ISAPI/PTZCtrl/channels/2/presets”
“deviceSerial”: “85cff214670c4bc69a8d7436fb93576c”
111
HikCentral Connect OpenAPI Developer Guide
“contentType“: “application/xml”
}
{
“method”: “PUT”
“url”: “/ISAPI/PTZCtrl/channels/1/auxcontrols/1”
“deviceSerial”: “85cff214670c4bc69a8d7436fb93576c”
“contentType“: “application/xml”,
“body”: “<PTZAux><type>WIPER</type><status>on</status></PTZAux>”
}
Response Parameters
Response Example
{
"data": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><ResponseStatus version=\"2.0\" xmlns=\"http://
www.isapi.org/ver20/XMLSchema\"><requestURL>/ISAPI/PTZCtrl/channels/2/presets/1</
requestURL><statusCode>4</statusCode><statusString>Invalid Operation</
statusString><subStatusCode>notSupport</subStatusCode></ResponseStatus>",
"errorCode": "0"
}
5.6.3 Residents
POST /api/hccgw/vims/v1/person/search
Search for residents.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/vims/v1/person/search
112
HikCentral Connect OpenAPI Developer Guide
Request Parameters
Request Example
{
"pageNum": 0,
"pageSize": 0,
"searchRequest": {
"areaId": "",
"buildId": "",
"isContainSubArea": 0,
"filter": {
"name": "",
"roomNum": 0,
"email": "",
"phone": "",
"type": 0,
"isExpired": 0
}
}}
Response Parameters
113
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
{
"pageNum": 0,
"pageSize": 0,
"totalNum": 0,
"personList": [
{
"personId": "",
"firstName": "",
"lastName": "",
"phone": "",
"email": "",
"isExpired": 0,
"photoUrl": "",
"headPicUrl": "",
"roomList": [
{
"roomId": "",
"roomNum": 0,
"roomName": "",
"areaId": "",
"areaName": "",
"buildId": "",
"buildName": "",
"accountType": 0
}
]
}
]
}
},
"errorCode": "0"
}
114
HikCentral Connect OpenAPI Developer Guide
POST /api/hccgw/vims/v1/person/add
Add a resident.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/vims/v1/person/add
Request Parameters
(Türkçe), ko ( ), zh_
TW (繁體中文), zh_CN (简体中
文), th (ภาษาไทย), vi (Tiếng Việt),
ja (日本語), pt_BR
(Português(Brasil)), ar ()العربية, id
(Bahasa Indonesia)
personBaseInf Req. PersonDTO Body Person basic information.
o
roomList Req. RoomDTO [] Body Resident room information.
115
HikCentral Connect OpenAPI Developer Guide
Request Example
{
"personBaseInfo": {
"id": "",
"personCode": "",
"groupId": "",
"firstName": "",
"lastName": "",
"gender": 0,
"phone": "",
"email": "",
"description": "",
"startDate": "",
"endDate": ""
},
"alIds": [
""
],
"roomList": [
{
"roomId": "",
"roomNum": 0,
"buildId": "",
"buildName": "",
"areaId": "",
"areaName": "",
"accountType": 0
}
],
"language": ""
}
Response Parameters
116
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
"personId": ""
},
"errorCode": "0"
}
POST /api/hccgw/vims/v1/person/update
Update a resident.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/vims/v1/person/update
Request Parameters
Request Example
{
"personBaseInfo": {
"id": "",
"personCode": "",
"groupId": "",
117
HikCentral Connect OpenAPI Developer Guide
"firstName": "",
"lastName": "",
"gender": 0,
"phone": "",
"email": "",
"description": "",
"startDate": "",
"endDate": ""
},
"alIds": [
""
],
"roomList": [
{
"roomId": "",
"roomNum": 0,
"buildId": "",
"buildName": "",
"areaId": "",
"areaName": "",
"accountType": 0
}
],
"language": ""
}
Response Parameters
Response Example
{
"errorCode": "0"
}
POST /api/hccgw/vims/v1/person/delete
Delete a resident.
118
HikCentral Connect OpenAPI Developer Guide
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/vims/v1/person/delete
Request Parameters
Request Example
{
"deleteList": [“string1”]
}
Response Parameters
Response Example
{
"errorCode": "0"
}
POST /api/hccgw/vims/v1/tempauth/get
Get temporary passes.
119
HikCentral Connect OpenAPI Developer Guide
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/vims/v1/tempauth/get
Request Parameters
Request Example
{
"id": "237160983473358848",
"clientLocalTime": "2022-10-28T11:08:23+08:00"
}
Response Parameters
120
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
{
"openCount": 0,
"name": "",
"startTime": 0,
"endTime": 0,
"code": "",
"creatorId": "",
"creatorName": "",
"expiredStatus": 0,
"password": "",
"accessLevelList": [
{
"accessLevelId": "",
"accessLevelName": ""
}
]
}"
},
"errorCode": "0"
}
121
HikCentral Connect OpenAPI Developer Guide
POST /api/hccgw/vims/v1/tempauth/list
Search for temporary passes.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/vims/v1/tempauth/list
Request Parameters
Request Example
{
"pageNum": 0,
"pageSize": 0,
"searchRequest": {
"filter": {
"name": ""
}
}}
Response Parameters
122
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
{
"pageNum": 0,
"pageSize": 0,
"totalNum": 0,
"tempAuthList": [
{
"id": "",
"name": "",
"openCount": 0,
"creatorId": "",
"creatorName": "",
"password": "",
"creatorEmail": "",
"startDate": 0,
"endDate": 0,
"expiredStatus": 0
}
]
}
},
"errorCode": "0"
}
123
HikCentral Connect OpenAPI Developer Guide
POST /api/hccgw/vims/v1/tempauth/add
Add temporary passes.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/vims/v1/tempauth/add
Request Parameters
Request Example
{
"name": "",
"openCount": 0,
"startTime": "",
124
HikCentral Connect OpenAPI Developer Guide
"endTime": "",
"clientLocalTime": "",
"alIds": [
""
]
}
Response Parameters
Response Example
{
"data": {
{
125
HikCentral Connect OpenAPI Developer Guide
"id": “”,
"openCount": 0,
"name": "",
"startTime": 0,
"endTime": 0,
"code": "",
"creatorId": "",
"creatorName": "",
"expiredStatus": 0,
"password": "",
"accessLevelList": [
{
"accessLevelId": "",
"accessLevelName": ""
}
]
}"
},
"errorCode": "0"
}
POST /api/hccgw/vims/v1/tempauth/update
Update temporary passes.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/vims/v1/tempauth/update
Request Parameters
126
HikCentral Connect OpenAPI Developer Guide
Request Example
{
"id": "",
"name": "",
"openCount": 0,
"startTime": "",
"endTime": "",
"clientLocalTime": "",
"alIds": [
""
]
}
Response Parameters
127
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"errorCode": "0"
}
POST /api/hccgw/vims/v1/tempauth/delete
Delete temporary passes.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/vims/v1/tempauth/delete
Request Parameters
Request Example
{
"deleteList": [“string1”]
}
Response Parameters
Response Example
{
"errorCode": "0"
}
128
HikCentral Connect OpenAPI Developer Guide
POST /api/hccgw/devcall/v1/call/receive
Respond to calls.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/devcall/v1/call/receive
Request Parameters
Request Example
{
"recordId": "",
"userId": "",
"status": "2"
}
129
HikCentral Connect OpenAPI Developer Guide
Response Parameters
Response Example
{
"errorCode": "0"
}
POST /api/hccgw/acs/v1/remote/control
Open door remotely.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/acs/v1/remote/control
Request Parameters
Request Example
{
"remoteControl": {
130
HikCentral Connect OpenAPI Developer Guide
"actionType": 0,
"elementlist": [
""
],
"direction": 0,
"areaId": "",
"depthTraversal": 0
}}
Response Parameters
Response Example
{
"data": {
{
"operationResult": [
{
"elementId": "",
"elementName": "",
"areaId": "",
"areaName": "",
"errorCode": ""
}
]
}
},
"errorCode": "0"
}
131
HikCentral Connect OpenAPI Developer Guide
GET /api/hccgw/acs/v1/encryptinfo/get
Get system Bluetooth encryption key.
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/acs/v1/encryptinfo/get
Request Parameters
Response Parameters
132
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
"encryptType": "",
"authData": "",
"vector": "",
"loopCount": 0
},
"errorCode": "0"
}
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/person/v1/groups/search
Request Parameters
133
HikCentral Connect OpenAPI Developer Guide
Request Example
{
"parentGroupId": "",
"groupName": "",
"depthTraversal": "",
"groupIdList": ""
}
Response Parameters
Response Example
{
"errorCode": "0",
"errorMsg": "",
"data": {
"personGroupList": [
{
"groupId": "",
"groupName": "",
"parentId": "",
"childNodeExist": "",
"permissionState": "",
"description": "",
"areaList": [{
"areaId": ""
}],
"groupFullPath": ""
134
HikCentral Connect OpenAPI Developer Guide
}
]
}
}
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/vehicles/add
Request Parameters
135
HikCentral Connect OpenAPI Developer Guide
Request Example
{
"areaId": "2aeec98c14a4427f9ace6c48e91ab4cc",
"licensePlateNo": "ADDDEEE",
"driverFirstName": "san",
"driverLastName": "zhang",
"driverPhoneNo": "18611119999",
"pictureKey": "",
"deviceSerial": "J091122",
"vehicleType": 1,
"extend": "this is a demo car"
}
Response Parameters
Response Example
{
"data": {
"id": "2aeec98c14a4427f9ace6c48e91ab4cc"
},
"errorCode": "0"
}
136
HikCentral Connect OpenAPI Developer Guide
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/vehicles/{id}/update
Request Parameters
Request Example
{
"licensePlateNo": "ADDDEEE",
"driverFirstName": "san",
"driverLastName": "zhang",
"driverPhoneNo": "18611119999",
"pictureKey": "",
"deviceSerial": "J091122",
"vehicleType": 1,
"extend": "this is a demo car"
}
137
HikCentral Connect OpenAPI Developer Guide
Response Parameters
Response Example
{
"errorCode": "0"
}
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/vehicles/get
Request Parameters
138
HikCentral Connect OpenAPI Developer Guide
Request Example
{
"pageIndex": 1,
"pageSize": 10,
"filter": {
"areaID": "-1",
"includeSubArea": "1",
"vehicleID": []
}
}
Response Parameters
139
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
"totalCount": 85,
"pageIndex": 1,
"pageSize": 2,
"vehicle": [
{
"id": "ab51324d3c224335aa90b5036f1a2527",
"name": "test222",
"abilitySet": "",
"online": "1",
"area": {},
"device": {
"devInfo": {
"id": "2a19980bbd414a029f57b752ca675b95",
"category": "0",
"serialNo": "G02907733",
"streamSecretKey": ""
},
"channelInfo": {}
},
"vehicleInfo": {
"licensePlateNo": "test222",
"vehicleType": 0,
"driverFirstName": "first name",
"driverLastName": "last name",
"driverPhoneNo": "1232312",
"pictureUrl": "http://10.19.215.172:31677/hcc-dev-2/msvehicle/images/
f718f3013b5a4fb38e573043afe28683/2022-11-24/39c764aa5acd49a385222f479b34ddc6.jpg?X-Amz-
Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio123%2F20221128%2Fap-
southeast-1%2Fs3%2Faws4_request&X-Amz-Date=20221128T034040Z&X-Amz-Expires=86400&X-Amz-
SignedHeaders=host&X-Amz-Signature=330cc2959ec24a347beed7df4f42fbb49854f534d2646e0c30cdfb7422aa3377",
"extend": ""
}
},
{
"id": "2ab33fd299124cf8911cc0d5be679e59",
"name": "yyyy",
"abilitySet": "",
"online": "0",
"area": {},
"device": {
"devInfo": {
"id": "",
"category": "0",
"serialNo": "",
"streamSecretKey": ""
},
"channelInfo": {}
140
HikCentral Connect OpenAPI Developer Guide
},
"vehicleInfo": {
"licensePlateNo": "yyyy",
"vehicleType": 0,
"driverFirstName": "",
"driverLastName": "",
"driverPhoneNo": "",
"pictureUrl": "",
"extend": ""
}
}
]
Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/picture/uploadparam/get
Request Parameters
Request Example
{
"format": "jpg"
}
Response Parameters
141
HikCentral Connect OpenAPI Developer Guide
Response Example
{
"data": {
"key": "msvehicle/images/f718f3013b5a4fb38e573043afe28683/2022-11-28/
e39da74daa66463f8227960707fca60c.jpg",
"url": "http://10.19.215.172:31677/hcc-dev-2/msvehicle/images/
f718f3013b5a4fb38e573043afe28683/2022-11-28/e39da74daa66463f8227960707fca60c.jpg?X-Amz-
Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio123%2F20221128%2Fap-
southeast-1%2Fs3%2Faws4_request&X-Amz-Date=20221128T025154Z&X-Amz-Expires=86400&X-Amz-
SignedHeaders=host&X-Amz-Signature=b9d0e9b4b0aa27e3763582f5bb90956146645deacaa9ce06bee11caac5edbbf2"
},
"errorCode": "0"
}
142
HikCentral Connect OpenAPI Developer Guide
Appendix A. Appendixes
Enumeration Description
alarmCategoryAlarmDetection Alarm Main Category: Alarm Detection
alarmCategoryMaintenance Alarm Main Category: Maintenance
alarmCategoryVideo Alarm Main Category: Video Security
alarmCategoryDriving Alarm Main Category: On-Board Monitoring
alarmSubCategoryAlarmDevice Alarm Sub Category: Alarm Device
alarmSubCategoryVehicle Alarm Sub Category: Vehicle Linked to On-Board Device
alarmSubCategoryAlarmInput Alarm Sub Category: Alarm Input
alarmSubCategoryBoxChannel Alarm Sub Category: Channel Linked with Hik-ProConnect Box
alarmSubCategoryBoxDevice Alarm Sub Category: Hik-ProConnect Box
alarmSubCategoryCamera Alarm Sub Category: Camera
alarmSubCategoryEncodingDevice Alarm Sub Category: Encoding Device
alarmSubCategoryMobileDevice Alarm Sub Category: On-Board Device
Enumeration Description
alarmInput Alarm Input
alarmOutput Alarm Output
camera Camera
vehicle Vehicle Linked to On-Board Device
door Door
143
HikCentral Connect OpenAPI Developer Guide
Enumeration Description
alarmDevice Alarm Device
encodingDevice Encoding device
mobileDevice On-Board Device
accessControllerDevice Access Control Device
videoIntercomDevice Video Intercom Device
Video Security
144
HikCentral Connect OpenAPI Developer Guide
Alarm Detection
Maintenance
145
HikCentral Connect OpenAPI Developer Guide
146
HikCentral Connect OpenAPI Developer Guide
On-Board Monitoring
147
HikCentral Connect OpenAPI Developer Guide
Enumeration Description
alarmInput Alarm Input
camera Camera
encodingDevice Encoding Device
alarmDevice Alarm Device
user User
subSystem Partition (Area)
148
HikCentral Connect OpenAPI Developer Guide
Enumeration Description
vehicle Vehicle Linked to On-Board Device
mobileDevice On-Board Device
Video Intercom
On-Board Monitoring
149
HikCentral Connect OpenAPI Developer Guide
Value Description
2000 Video Loss
2001 Video Tampering Detection
2002 Motion Detection
2003 PIR Alarm
2004 Face Capture
2005 Area Crossing
2006 Region Entrance
2007 Region Exiting
2015 Scene Change Detection
2016 Focal Length Detection
2021 Line Crossing Detection
2022 Intrusion Detection
2023 Region Entrance Detection
2024 Region Exiting Detection
2027 Fast Moving Detection
150
HikCentral Connect OpenAPI Developer Guide
Value Description
2029 Unattended Baggage Detection
2030 Object Removal Detection
A.3.1 AccessLevel
The table here shows the access level information.
A.3.2 AddDeviceResponse
The table here shows the returned information of adding a device.
151
HikCentral Connect OpenAPI Developer Guide
A.3.3 AlarmCategory
The table here shows the alarm category information.
A.3.4 AlarmDeviceInfo
The table here shows the alarm device information.
152
HikCentral Connect OpenAPI Developer Guide
A.3.5 AlarmEventSource
The table here shows the information about alarm event source.
A.3.6 AlarmFile
The table here shows the details about an alarm file .
A.3.7 AlarmFileExtendInfo
The table here shows the extended information of an alarm file.
153
HikCentral Connect OpenAPI Developer Guide
A.3.8 AlarmFileInfo
The table here shows the alarm file information.
A.3.9 AlarmInfo
The table here shows the alarm information.
A.3.10 AlarmInputChannel
The table here shows the information of an alarm input channel.
154
HikCentral Connect OpenAPI Developer Guide
A.3.11 AlarmInputInfo
The table here shows the alarm input information.
A.3.12 AlarmLinkageConfig
The table here shows the information of the alarm linkage.
A.3.13 AlarmLinkage
The table here shows the information returned from alarm linkage rule operation.
155
HikCentral Connect OpenAPI Developer Guide
A.3.14 AlarmMsg
The table here shows the information of an alarm event..
156
HikCentral Connect OpenAPI Developer Guide
A.3.15 AlarmOutputChannel
The table here shows the information of an alarm output channel.
A.3.16 AlarmOutputOperation
The table here shows information of alarm output control.
A.3.17 AlarmOutputState
The table here shows information about alarm output state.
157
HikCentral Connect OpenAPI Developer Guide
A.3.18 Alarmpriorities
The table here shows the details of an alarm priority.
A.3.19 AlarmPriority
The table here shows the information displayed in an alarm priority list.
158
HikCentral Connect OpenAPI Developer Guide
A.3.20 AlarmResourceInfo
The table here shows the alarm resource information.
A.3.21 AlarmRuleDetail
The table here shows the details of an alarm rule.
159
HikCentral Connect OpenAPI Developer Guide
A.3.22 AlarmRuleOperation
The table here shows the information returned from alarm rule operation.
A.3.23 AlarmRule
The table here shows the information about alarm rules.
A.3.24 AlarmTimeInfo
The table here shows the alarm time information.
160
HikCentral Connect OpenAPI Developer Guide
A.3.25 Area
The table here shows the information of an area.
A.3.26 AreaBrief
The table here shows the area information.
A.3.27 Attachment
The table here shows the attachment information.
A.3.28 BasicInfo
The table here shows event's basic information.
161
HikCentral Connect OpenAPI Developer Guide
A.3.29 BriefArea
The table here shows the information of an area.
A.3.30 Building
The table here shows the building information.
A.3.31 BuildingSearchCriteria
The table here shows the building search conditions.
162
HikCentral Connect OpenAPI Developer Guide
A.3.32 CameraChannel
The table here shows information of a camera channel.
A.3.33 CameraInfo
The table here shows the camera information.
163
HikCentral Connect OpenAPI Developer Guide
A.3.34 ChannelInfo
The table here shows the channel information.
A.3.35 CloudStorage
The table here shows the overview of the cloud storage service.
A.3.36 CloudStorageInfo
The table here shows the information of the cloud storage service.
A.3.37 CloudStorageDetail
The table here shows the details of the cloud storage service.
164
HikCentral Connect OpenAPI Developer Guide
A.3.38 DataBean
The table here shows the event's extended information.
A.3.39 Device
The table here shows the information of a device.
165
HikCentral Connect OpenAPI Developer Guide
A.3.40 DeviceBaseInfo
The table here shows basic information about the device.
A.3.41 DeviceBrief
The table here shows the device information.
166
HikCentral Connect OpenAPI Developer Guide
A.3.42 DeviceByResource
The table here shows the information about the device.
A.3.43 DeviceInfo
The table here shows the device information.
167
HikCentral Connect OpenAPI Developer Guide
A.3.45 DeviceList
The table here shows the returned results of adding a device.
A.3.46 DeviceTalkInfo
The table here shows the video intercom event details.
A.3.47 DevInfo
The table here shows the device details.
168
HikCentral Connect OpenAPI Developer Guide
A.3.48 DoorChannel
The table here shows the information of a door channel.
A.3.49 DoorInfo
The table here shows the door information.
A.3.50 Event
The table here shows the event information.
169
HikCentral Connect OpenAPI Developer Guide
A.3.51 EventSource
The table here shows the event source information.
A.3.52 FailedResult
The table here shows the information of the room where the number of persons exceeds the limit.
170
HikCentral Connect OpenAPI Developer Guide
A.3.53 GetDeviceInfo
The table here shows the returned information of device details.
A.3.54 GetDevicesResVo
The table here shows the device list structure.
171
HikCentral Connect OpenAPI Developer Guide
A.3.55 GPSInfo
The table here shows the GPS information.
A.3.56 IgnoreRecurring
The table here shows the information of an auto-closing alarming window.
A.3.57 ImportToArea
The table here shows whether to import to area automatically.
172
HikCentral Connect OpenAPI Developer Guide
A.3.58 LinkageAlarmOutput
The table here shows the information of an alarm output linked to an alarm.
A.3.59 LinkageCamera
The table here shows the information of an linked camera .
173
HikCentral Connect OpenAPI Developer Guide
A.3.60 LinkageConfig
The table here shows the alarm linkage information.
A.3.61 LinkageItem
The table here shows the linkage of an alarm.
A.3.62 LinkAlarmOutput
The table here shows the linked alarm output.
174
HikCentral Connect OpenAPI Developer Guide
A.3.63 LinkCamera
The table here shows the information of an linked camera.
A.3.64 LinkCapturePicture
The table here shows the information of an captured picture linked to an alarm.
A.3.65 LinkEmail
The table here shows the information of an email template linked to an alarm.
175
HikCentral Connect OpenAPI Developer Guide
A.3.66 LocalStorage
The table here shows the local storage information.
A.3.67 Notification
The table here shows the information of an alarm notification.
A.3.68 PackageDetails
The table here shows the details of a service package.
176
HikCentral Connect OpenAPI Developer Guide
A.3.69 PackageOverview
The table here shows the overview of the service package.
A.3.70 Person
The table here shows the person information.
A.3.71 PersonDTO
The table here shows the resident basic information.
177
HikCentral Connect OpenAPI Developer Guide
Note
Update Resident: This
node should be
empty.
Add Resident: This
node should be empty
if you add new person
information for the
resident, while this
node is required if you
add a resident from
existing persons.
178
HikCentral Connect OpenAPI Developer Guide
A.3.72 PersonGroup
The table here shows the department information.
A.3.73 Priority
The table here shows the alarm priority information.
179
HikCentral Connect OpenAPI Developer Guide
A.3.74 QueueInfo
The table here shows the information of leaving queue detection alarms.
A.3.75 QueueRelatedInfo
The table here shows the specific queuing-related alarms.
180
HikCentral Connect OpenAPI Developer Guide
A.3.76 ReceivingSchedule
The table here shows the information of an arming schedule template.
A.3.77 Recipients
The table here shows the recipient information.
A.3.78 RecordSetting
The table here shows the record settings.
181
HikCentral Connect OpenAPI Developer Guide
A.3.79 RemoteControl
The table here shows the operation of remote control.
A.3.80 RemoteControlResponse
The table here shows the results of door control.
A.3.81 ResidentFilter
The table here shows the detailed conditions for resident search.
182
HikCentral Connect OpenAPI Developer Guide
A.3.82 ResidentSearchRequest
The table here shows the resident search conditions.
A.3.83 Resource
The table here shows the resource information.
183
HikCentral Connect OpenAPI Developer Guide
A.3.84 ResourceAddResult
The table here shows the information about an area.
A.3.85 RoomDTO
The table here shows the room information.
184
HikCentral Connect OpenAPI Developer Guide
A.3.86 RoomFilter
The table here shows the detailed conditions for room search.
A.3.87 RoomSearchCriteria
The table here shows the room search conditions.
185
HikCentral Connect OpenAPI Developer Guide
A.3.88 RoomVO
The table here shows the room information.
A.3.89 Schedule
The table here shows the information of an alarm schedule template.
186
HikCentral Connect OpenAPI Developer Guide
A.3.90 SelfRelated
The table here shows the related information of an linked camera.
A.3.91 ServicePackage
The table here shows the information of service(s) in a service package.
187
HikCentral Connect OpenAPI Developer Guide
A.3.92 ServicePackageOverview
The table here shows the overview of the service(s) in a service package.
A.3.93 TempAuth
The table here shows the temporary pass information.
188
HikCentral Connect OpenAPI Developer Guide
A.3.94 TempAuthFilter
The table here shows the detailed conditions for temporary pass search.
A.3.95 TempAuthSearchRequest
The table here shows the temporary pass search conditions.
A.3.96 TimeRange
The table here shows the time range parameters for time-related alarm log search.
189
HikCentral Connect OpenAPI Developer Guide
A.3.97 TimeSchedule
The table here shows the details of an alarm schedule template.
A.3.98 TimeSetting
The table here shows the time information of an arming schedule template.
A.3.99 TimeSpan
The table here shows the time range of an arming schedule template.
190
HikCentral Connect OpenAPI Developer Guide
A.3.100 TimeZone
The table here shows information about time zone.
A.3.101 TimeZoneInfo
The table here shows the information about time zone.
A.3.102 TimeZoneDst
The table here shows time zone DST settings.
191
HikCentral Connect OpenAPI Developer Guide
A.3.103 User
The table here shows the user information.
A.3.104 VehicleInfo(1)
The table here shows the vehicle information.
192
HikCentral Connect OpenAPI Developer Guide
A.3.105 VehicleInfo(2)
The table here shows the vehicle information.
A.3.106 VehicleInfo(3)
The table here shows the vehicle information.
A.3.107 VehicleRelatedInfo
The table here shows the information of vehicles linked with on-board devices.
193
HikCentral Connect OpenAPI Developer Guide
Internal Errors
194
HikCentral Connect OpenAPI Developer Guide
195
HikCentral Connect OpenAPI Developer Guide
196
HikCentral Connect OpenAPI Developer Guide
197
HikCentral Connect OpenAPI Developer Guide
openAPI Errors
198
HikCentral Connect OpenAPI Developer Guide
199
UD34138B