0% found this document useful (0 votes)
3K views

HikCentral Connect OpenAPI - Developer Guide - 20230714

This document provides a developer guide for the HikCentral Connect OpenAPI. It includes an overview of the open capabilities including system, alarm, resource, video, message, person management, video intercom, and access control capabilities. It also includes chapters on getting started, the protocol summary, typical applications, and a reference of all API services. The document is the property of Hangzhou Hikvision Digital Technology Co., Ltd. and cannot be reproduced or distributed without permission.

Uploaded by

thanh.tran5141
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views

HikCentral Connect OpenAPI - Developer Guide - 20230714

This document provides a developer guide for the HikCentral Connect OpenAPI. It includes an overview of the open capabilities including system, alarm, resource, video, message, person management, video intercom, and access control capabilities. It also includes chapters on getting started, the protocol summary, typical applications, and a reference of all API services. The document is the property of Hangzhou Hikvision Digital Technology Co., Ltd. and cannot be reproduced or distributed without permission.

Uploaded by

thanh.tran5141
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 209

HikCentral Connect OpenAPI

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

4.7 Get Department List ............................................................................................................. 22


4.8 Open Door via Bluetooth ..................................................................................................... 23
4.9 Manage On-Board Monitoring ............................................................................................. 24
Chapter 5 API Reference ........................................................................................................... 26
5.1 System-Related Services ...................................................................................................... 26
5.1.1 Get Token .................................................................................................................... 26
5.1.2 System Operation ........................................................................................................ 28
5.2 Resource-Related Services ................................................................................................... 34
5.2.1 Physical Resources ...................................................................................................... 34
5.2.2 Logical Resources ........................................................................................................ 47
5.3 Alarm-Related Services ........................................................................................................ 75
5.3.1 Alarm Subscription ...................................................................................................... 75
5.3.2 Alarm Rules ................................................................................................................. 79
5.3.3 Alarm Logs .................................................................................................................. 95
5.4 Message-Related Services .................................................................................................... 97
5.4.1 Message Subscription and Receiving .......................................................................... 98
5.5 Video-Related Services ...................................................................................................... 103
5.5.1 Recording Schedule and Playback ............................................................................. 103
5.6 Video Intercom Services .................................................................................................... 106
5.6.1 Buildings and Rooms ................................................................................................. 106
5.6.2 ISAPI Protocol Transmission ...................................................................................... 110
5.6.3 Residents ................................................................................................................... 112
5.6.4 Temporary Passes ..................................................................................................... 119
5.6.5 Video Intercom Calls ................................................................................................. 129
5.7 Access Control Services ...................................................................................................... 130
5.7.1 Open Doors Remotely ............................................................................................... 130
5.7.2 System Bluetooth Encryption Key ............................................................................. 132
5.8 Person-Related Services ..................................................................................................... 133

iii
HikCentral Connect OpenAPI Developer Guide

5.8.1 POST /api/hccgw/person/v1/groups/search ............................................................. 133


5.9 On-Board Monitoring Services ........................................................................................... 135
5.9.1 POST /api/hccgw/resource/v1/areas/vehicles/add .................................................. 135
5.9.2 POST /api/hccgw/resource/v1/areas/vehicles/{id}/update ...................................... 136
5.9.3 POST /api/hccgw/resource/v1/areas/vehicles/get ................................................... 138
5.9.4 POST /api/hccgw/resource/v1/picture/uploadparam/get ........................................ 141
Appendix A. Appendixes ......................................................................................................... 143
A.1 Data Dictionary .................................................................................................................. 143
A.1.1 Alarm Category ......................................................................................................... 143
A.1.2 Resource Type ........................................................................................................... 143
A.1.3 Device Category ........................................................................................................ 144
A.1.4 Alarm Type ................................................................................................................ 144
A.1.5 Alarm Source ............................................................................................................ 148
A.1.6 Message Type ........................................................................................................... 149
A.1.7 Capability Set ............................................................................................................ 150
A.2 ISO 8601 Time Format Instruction ..................................................................................... 151
A.3 Object Description ............................................................................................................. 151
A.3.1 AccessLevel ............................................................................................................... 151
A.3.2 AddDeviceResponse ................................................................................................. 151
A.3.3 AlarmCategory .......................................................................................................... 152
A.3.4 AlarmDeviceInfo ....................................................................................................... 152
A.3.5 AlarmEventSource .................................................................................................... 153
A.3.6 AlarmFile ................................................................................................................... 153
A.3.7 AlarmFileExtendInfo ................................................................................................. 153
A.3.8 AlarmFileInfo ............................................................................................................ 154
A.3.9 AlarmInfo .................................................................................................................. 154
A.3.10 AlarmInputChannel ................................................................................................ 154
A.3.11 AlarmInputInfo ....................................................................................................... 155

iv
HikCentral Connect OpenAPI Developer Guide

A.3.12 AlarmLinkageConfig ................................................................................................ 155


A.3.13 AlarmLinkage .......................................................................................................... 155
A.3.14 AlarmMsg ............................................................................................................... 156
A.3.15 AlarmOutputChannel .............................................................................................. 157
A.3.16 AlarmOutputOperation .......................................................................................... 157
A.3.17 AlarmOutputState .................................................................................................. 157
A.3.18 Alarmpriorities ........................................................................................................ 158
A.3.19 AlarmPriority .......................................................................................................... 158
A.3.20 AlarmResourceInfo ................................................................................................. 159
A.3.21 AlarmRuleDetail ...................................................................................................... 159
A.3.22 AlarmRuleOperation ............................................................................................... 160
A.3.23 AlarmRule ............................................................................................................... 160
A.3.24 AlarmTimeInfo ........................................................................................................ 160
A.3.25 Area ........................................................................................................................ 161
A.3.26 AreaBrief ................................................................................................................. 161
A.3.27 Attachment ............................................................................................................. 161
A.3.28 BasicInfo ................................................................................................................. 161
A.3.29 BriefArea ................................................................................................................. 162
A.3.30 Building ................................................................................................................... 162
A.3.31 BuildingSearchCriteria ............................................................................................ 162
A.3.32 CameraChannel ...................................................................................................... 163
A.3.33 CameraInfo ............................................................................................................. 163
A.3.34 ChannelInfo ............................................................................................................ 164
A.3.35 CloudStorage .......................................................................................................... 164
A.3.36 CloudStorageInfo .................................................................................................... 164
A.3.37 CloudStorageDetail ................................................................................................. 164
A.3.38 DataBean ................................................................................................................ 165
A.3.39 Device ..................................................................................................................... 165

v
HikCentral Connect OpenAPI Developer Guide

A.3.40 DeviceBaseInfo ....................................................................................................... 166


A.3.41 DeviceBrief ............................................................................................................. 166
A.3.42 DeviceByResource .................................................................................................. 167
A.3.43 DeviceInfo ............................................................................................................... 167
A.3.44 DeviceInfo (2) .......................................................................................................... 167
A.3.45 DeviceList ................................................................................................................ 168
A.3.46 DeviceTalkInfo ......................................................................................................... 168
A.3.47 DevInfo ................................................................................................................... 168
A.3.48 DoorChannel ........................................................................................................... 169
A.3.49 DoorInfo .................................................................................................................. 169
A.3.50 Event ....................................................................................................................... 169
A.3.51 EventSource ............................................................................................................ 170
A.3.52 FailedResult ............................................................................................................ 170
A.3.53 GetDeviceInfo ......................................................................................................... 171
A.3.54 GetDevicesResVo .................................................................................................... 171
A.3.55 GPSInfo ................................................................................................................... 172
A.3.56 IgnoreRecurring ...................................................................................................... 172
A.3.57 ImportToArea .......................................................................................................... 172
A.3.58 LinkageAlarmOutput ............................................................................................... 173
A.3.59 LinkageCamera ....................................................................................................... 173
A.3.60 LinkageConfig .......................................................................................................... 174
A.3.61 LinkageItem ............................................................................................................ 174
A.3.62 LinkAlarmOutput .................................................................................................... 174
A.3.63 LinkCamera ............................................................................................................. 175
A.3.64 LinkCapturePicture ................................................................................................. 175
A.3.65 LinkEmail ................................................................................................................. 175
A.3.66 LocalStorage ........................................................................................................... 176
A.3.67 Notification ............................................................................................................. 176

vi
HikCentral Connect OpenAPI Developer Guide

A.3.68 PackageDetails ........................................................................................................ 176


A.3.69 PackageOverview .................................................................................................... 177
A.3.70 Person ..................................................................................................................... 177
A.3.71 PersonDTO .............................................................................................................. 177
A.3.72 PersonGroup ........................................................................................................... 179
A.3.73 Priority .................................................................................................................... 179
A.3.74 QueueInfo ............................................................................................................... 180
A.3.75 QueueRelatedInfo ................................................................................................... 180
A.3.76 ReceivingSchedule .................................................................................................. 181
A.3.77 Recipients ............................................................................................................... 181
A.3.78 RecordSetting ......................................................................................................... 181
A.3.79 RemoteControl ....................................................................................................... 182
A.3.80 RemoteControlResponse ........................................................................................ 182
A.3.81 ResidentFilter .......................................................................................................... 182
A.3.82 ResidentSearchRequest .......................................................................................... 183
A.3.83 Resource ................................................................................................................. 183
A.3.84 ResourceAddResult ................................................................................................. 184
A.3.85 RoomDTO ................................................................................................................ 184
A.3.86 RoomFilter .............................................................................................................. 185
A.3.87 RoomSearchCriteria ................................................................................................ 185
A.3.88 RoomVO .................................................................................................................. 186
A.3.89 Schedule ................................................................................................................. 186
A.3.90 SelfRelated .............................................................................................................. 187
A.3.91 ServicePackage ....................................................................................................... 187
A.3.92 ServicePackageOverview ........................................................................................ 188
A.3.93 TempAuth ............................................................................................................... 188
A.3.94 TempAuthFilter ....................................................................................................... 189
A.3.95 TempAuthSearchRequest ....................................................................................... 189

vii
HikCentral Connect OpenAPI Developer Guide

A.3.96 TimeRange .............................................................................................................. 189


A.3.97 TimeSchedule ......................................................................................................... 190
A.3.98 TimeSetting ............................................................................................................. 190
A.3.99 TimeSpan ................................................................................................................ 190
A.3.100 TimeZone .............................................................................................................. 191
A.3.101 TimeZoneInfo ........................................................................................................ 191
A.3.102 TimeZoneDst ......................................................................................................... 191
A.3.103 User ...................................................................................................................... 192
A.3.104 VehicleInfo(1) ........................................................................................................ 192
A.3.105 VehicleInfo(2) ........................................................................................................ 193
A.3.106 VehicleInfo(3) ........................................................................................................ 193
A.3.107 VehicleRelatedInfo ................................................................................................ 193
A.4 Status and Error Code ........................................................................................................ 194

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.2 Open Capabilities


The open capabilities of HikCentral Connect for application integration include system, resource,
alarm, and video.

1.2.1 System Capabilities


System capabilities are about services concerning several platform operations and login including
login authentication, getting platform and user information, getting streaming token, etc.

1
HikCentral Connect OpenAPI Developer Guide

Figure 1-1 System Capabilities

1.2.2 Alarm Capabilities


Alarm capabilities are about services such as getting alarm rules, editing alarm rules, subscribing
events, and getting alarm messages.

Note
For alarm types that can be received, see details in Alarm Type .

2
HikCentral Connect OpenAPI Developer Guide

Figure 1-2 Alarm Capabilities

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.

1.2.3 Resource Capabilities


Resource capabilities are about services concerning getting device information including area
information, camera information, alarm information, etc.

3
HikCentral Connect OpenAPI Developer Guide

Figure 1-3 Resource Capabilities

1.2.4 Video Capabilities


Video capabilities are about services including getting recording schedule templates and getting
playback addresses.

4
HikCentral Connect OpenAPI Developer Guide

Figure 1-4 Video Capabilities

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.

1.2.5 Message Capabilities


Message capabilities are about services including subscribing to messages, unsubscribing from
messages, getting messages, etc.

Figure 1-5 Message Capabilities

1.2.6 Person Management Capabilities


Person management capabilities include getting department list.

Figure 1-6 Person Management Capabilities

1.2.7 Video Intercom Capabilities


Video intercom capabilities are about services including building/room management, resident
management, temporary pass management, and call management.

5
HikCentral Connect OpenAPI Developer Guide

Figure 1-7 Video Intercom Capabilities

1.2.8 Access Control Capabilities


Access control capabilities are about services including opening door remotely and getting
Bluetooth encryption information.

Figure 1-8 Access Control Capabilities

1.2.9 On-Board Monitoring Capabilities


On-board monitoring capabilities are about services including managing on-board devices and
vehicles linked to on-board device, subscribe to and get alarms and messages, etc.

6
HikCentral Connect OpenAPI Developer Guide

Figure 1-9 On-Board Monitoring Capabilities

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.

1.3 Terms and Definitions

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.

1.4 Update History

Summary of Changes_June., 2023


1. Extended the request parameters and the corresponding request message for POST /api/
hccgw/resource/v1/devices/get :
added a request parameter areaID (area ID);

8
HikCentral Connect OpenAPI Developer Guide

extended the description for the request parameter deviceCategory.


2. Added an API for synchronously refreshing device status: POST /api/hccgw/resource/v1/
device/{deviceId}/refresh .
3. Extended the response parameters and the corresponding response message for POST /api/
hccgw/alarm/v1/alarmrules/add :
added a response parameter data and the corresponding object description
AlarmRuleOperation .
4. Extended the response parameters and the corresponding response message for POST /api/
hccgw/alarm/v1/alarmrules/update :
added a response parameter data and the corresponding object description
AlarmRuleOperation .
5. Extended the response parameters and the corresponding response message for POST /api/
hccgw/alarm/v1/alarmlinkage/add :
added a response parameter data and the corresponding object description AlarmLinkage .
6. Added an error code OPEN000031 and modified OPEN000006 in Status and Error Code .

Summary of Changes_May., 2023


1. Extended the time threshold from an hour to 2 days for auto-canceling the alarm or message
subscription:
Subscribe to and Get Alarms ;
Subscribe to and Get Messages .
2. Added a validity for the response parameter captureUrl: POST /api/hccgw/resource/v1/
device/capturePic .
Added a validity for the response parameter pictureURL: POST /api/hccgw/resource/v1/areas/
cameras/thumbnail/get .
Added a validity for the response parameter url: POST /api/hccgw/resource/v1/picture/
uploadparam/get .
Added a validity for the parameter URL: AlarmFile .
Added a validity for the parameter url: Attachment .
3. Extended the response parameters and extended the corresponding response message:
POST /api/hccgw/resource/v1/areadetail/get :
added a response parameter areaPath (detailed path starting from the origin area to the
current area) to BriefArea .
4. Added a request parameter reqNumber (information volume per request) and added a
response message: POST /api/hccgw/alarm/v1/mq/messages .
5. Added an API for getting the list of alarm logs: POST /api/hccgw/alarm/v1/alarmlog .
6. Extended the description for the request parameter eventType: POST /api/hccgw/
rawmsg/v1/mq/subscribe .
7. Added an event type 100657 (Leaving Queue Detection): Alarm Type .
8. Added 2 parameters currentEvent (whether it is real-​time alarm) and queueRelatedInfo
(queuing-alarm related information): AlarmMsg .

9
HikCentral Connect OpenAPI Developer Guide

9. Extended the description of enable: ImportToArea .


10. Added 6 error codes (OPEN000024, OPEN000025, OPEN000026, OPEN000027, OPEN000028,
and OPEN000029): openAPI Errors .

Summary of Changes in Version 1.2.1_Mar., 2023


1. Added request frequency limit as an API rule and specifies Content-Type as application/json for
data format: API Rules .
2. Added a response parameter areaDomain for GET /api/hccgw/platform/v1/streamtoken/get .
3. Added a request parameter deleteVehicle for POST /api/hccgw/resource/v1/devices/delete .
4. Added a response parameter failedResultList for POST /api/hccgw/vims/v1/person/add .
5. Extended the description for the parameter includeSubArea:
POST /api/hccgw/resource/v1/areas/cameras/get ;
POST /api/hccgw/resource/v1/areas/alarminputs/get ;
POST /api/hccgw/resource/v1/areas/alarmoutputs/get ;
POST /api/hccgw/resource/v1/areas/doors/get .
6. Added an API for capturing pictures by camera channel: POST /api/hccgw/resource/v1/device/
capturePic .
7. Added an API for deleting resources from an area by resource IDs: POST /api/hccgw/
resource/v1/areas/resources/delete .
8. Added an API for getting the alarm input status: POST /api/hccgw/resource/v1/areas/
alarminputs/status/get .
9. Added an API for ISAPI protocol transmission: POST /api/hccgw/video/v1/isapi/proxypass .
10. Added an API for getting door information: POST /api/hccgw/resource/v1/areas/doors/get .
11. Added APIs of on-board monitoring services:
POST /api/hccgw/resource/v1/areas/vehicles/add ;
POST /api/hccgw/resource/v1/areas/vehicles/{id}/update ;
POST /api/hccgw/resource/v1/areas/vehicles/get ;
POST /api/hccgw/resource/v1/picture/uploadparam/get .
12. Added an alarm main category alarmCategoryDriving (On-Board Monitoring) and 2 alarm sub
categories alarmSubCategoryMobileDevice (On-Board Device) and alarmSubCategoryVehicle
(Vehicle Linked to On-Board Device): Alarm Category .
Added a list of alarm types for on-board monitoring: Alarm Type .
Added vehicle (Vehicle Linked to On-Board Device) and mobileDevice (On-Board Device) for
Alarm Source .
Added 2 resource types vehicle (Vehicle Linked to On-Board Device) and door: Resource Type .
Added 2 device categories accessControllerDevice and videoIntercomDevice: Device
Category .
Added a list of message types for on-board monitoring: Message Type .
13. Added a parameter relatedVehicleInfo for AddDeviceResponse .
Added values of type and deleted suffixName for AlarmFile .
Added values of fileContent for AlarmFileInfo .
Added a parameter vehicleRelatedInfo ( VehicleRelatedInfo ) for AlarmMsg and DataBean .
Added a parameter abilitySet ( Capability Set ) and values of online for CameraInfo .

10
HikCentral Connect OpenAPI Developer Guide

Added parameters uuid, update, and video to Event .


Added two parameters doorChannel and relatedVehicleInfo to GetDeviceInfo .
14. Added object descriptions: DoorChannel ; GPSInfo ; VehicleInfo(2) ; VehicleRelatedInfo .
Changed the object description Picture to Attachment , and extended the parameter url.
Modified the parameter groupId for PersonDTO .
Extended VehicleInfo(3) .
15. Added error codes to Internal Errors and openAPI Errors .

Summary of Changes in Version 1.2_Dec., 2022


Added message-related services, video intercom services, and access control services. See details
in Message-Related Services , Video Intercom Services , and Access Control Services .
Summary of Changes in Version 1.1_Aug., 2022
New document.

11
HikCentral Connect OpenAPI Developer Guide

Chapter 2 Getting Started


1. Get the HikCentral Connect server address and register an account.

Country/Region Server Address


Russia https:/​/​hikcentralconnectru.com
Singapore/India https:/​/​isgp.hikcentralconnect.com
Europe https:/​/​ieu.hikcentralconnect.com
South America https:/​/​isa.hikcentralconnect.com
North America https:/​/​ius.hikcentralconnect.com
2. Obtain the AK and SK from the technical support by providing your HikCentral Connect account.

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

Chapter 3 Protocol Summary

3.1 API Rules

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.

● port: the port No. for accessing HikCentral Connect.

● uri: the URI of the API. See details in API Reference .

Request Method POST/GET.


Data Format JSON format for both request and response messages. Supports
application/​json as Content-Type.
Character Encoding UTF-8.
Security Authentication Security authentication based on AK/SK that is required before calling
APIs.
Permission Control Only those APIs with calling permission can be called successfully.
Certificate Requirement Not required currently.
Response Rules See details in Response Rules .
Request Frequency No more than 5 times are allowed for request per second.

3.2 Signature and Authentication


The APIs in this document use AK/SK authentication.
Make sure you have applied for and obtained the AK and SK from the technical support. You can
call the login API POST /api/hccgw/platform/v1/token/get by using the AK and SK to get the
authentication token. The validity period of the token is 7 days, within which you can call the login
API repeatedly to refresh the token so that the remaining validity period will be restored to 7 days
again.
The token (the "Token" parameter) should be transmitted in the request Headers for calling other
APIs.
Example
Get the Platform Information
Request address: http://www.example.com/api/hccgw/platform/v1/systemproperties

13
HikCentral Connect OpenAPI Developer Guide

HTTP method: GET


Headers:

Accept: application/json, text/plain, */*


Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Cache-Control: no-cache
Connection: keep-alive
Content-Type: application/json;charset=utf-8
Token: hcc.vh5hb9q495qjjei71g3pdmrjslo5wyti
Request
{
}
Response
{
"data": {
"systemGUID": "fe436da09dca4e46996c1178f06c7911"
},
"errorCode": "0"
}

3.3 Response Rules


The response returned after calling APIs contains the response message and status/error code.

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

Chapter 4 Typical Applications

4.1 Manage Resources


The document provides a full set of APIs to manage resources including devices, areas, cameras,
alarm inputs, alarm outputs and other resources. For example, the APIs can be used to obtain
resource indexCode and perform operations on resources.

Figure 4-1 Sequence Diagram of Getting Resource Information

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.

4.2 Subscribe to and Get Alarms


The document provides a full set of APIs to subscribe to alarms and get alarm information.

16
HikCentral Connect OpenAPI Developer Guide

Figure 4-2 Sequence Diagram of Subscribing to Alarms and Getting Alarms

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

4.3 Configure Alarm Rules

Figure 4-3 Sequence Diagram of Configuring Alarm Rules

18
HikCentral Connect OpenAPI Developer Guide

4.4 Subscribe to and Get Messages

Figure 4-4 Sequence Diagram of Subscribing to and Getting Messages

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

4.5 Start Live View / Playback Without Plug-in

Figure 4-5 Sequence Diagram of Starting Live View / Playback Without Plug-in

20
HikCentral Connect OpenAPI Developer Guide

4.6 Receive Video Intercom Events

Figure 4-6 Sequence Diagram of Receiving Video Intercom Events


1. Get token according to AK and SK. If the token already exists, it is not required to get the token
every time.
2. Call POST /api/hccgw/rawmsg/v1/mq/subscribe to subscribe to video intercom events
(Msg140001).
3. When a device calls, the HikCentral Connect platform will send the event messages to OpenAPI
service.
4. The caller calls POST /api/hccgw/rawmsg/v1/mq/messages to get the video intercom
messages.

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.

4.7 Get Department List

Figure 4-7 Sequence Diagram of Getting Department List


HikCentral Connect OpenAPI supports getting department list.

22
HikCentral Connect OpenAPI Developer Guide

4.8 Open Door via Bluetooth

Figure 4-8 Sequence Diagram of Opening Door via Bluetooth


1. Get token according to AK and SK. If the token already exists, it is not required to get the token
every time.
2. Call GET /api/hccgw/acs/v1/encryptinfo/get to get the Bluetooth encryption key, which is
unique and will not change.
3. With the Bluetooth encryption key, the caller can use Bluetooth SDK to open door through
access control devices / video intercom devices.

23
HikCentral Connect OpenAPI Developer Guide

4.9 Manage On-Board Monitoring

Figure 4-9 Sequence Diagram of Managing On-Board Monitoring

24
HikCentral Connect OpenAPI Developer Guide

1. Call POST /api/hccgw/resource/v1/devices/add to add on-board devices. When adding


devices, you should link them with existing vehicles or add new vehicles to the platform to be
linked with.

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

Chapter 5 API Reference

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.

5.1 System-Related Services

5.1.1 Get Token

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Content-Type Req. String Header Only application/​json is
supported.
appKey Req. String Body appkey(AK). The maximum
length is 64.
secretKey Req. Number Body appSecret(SK). The maximum
length is 64.

Request Example
{
"appKey":"cewm9w0qjhv3i290uufnyxzp25l6ym7e",
"secretKey":"s77w0ckmlyetp2lhfqw8p8zgm23pkpw7"
}

26
HikCentral Connect OpenAPI Developer Guide

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-1 data Object Description

accessToken Req. String It is used as the node


Token for the following
APIs. The maximum
length is 64.
expireTime Req. Integer Expiry time. The
maximum length is 16.
userId Req. String User ID. The maximum
length is 64.
areaDomain Req. String Name of the domain
where the server is
located (for composing
URLs).

Response Example
{
"data": {
"accessToken": "hcc.vh5hb9q495qjjei71g3pdmrjslo5wyti",
"expireTime": 1655193135,
"userId": "8a7485aa7f209dd5017f2141adff0019"
"areaDomain": "https://isgp.hikcentralconnect.com"
},
"errorCode": "0"
}

27
HikCentral Connect OpenAPI Developer Guide

5.1.2 System Operation

GET /api/hccgw/platform/v1/systemproperties
Get the HikCentral Connect platform information.

Request URL
https://[serverAddress]:[serverPort]/api/hccgw/platform/v1/systemproperties
Request Parameters

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-2 data Object Description


Parameter Name Req. or Opt. Data Type Description
systemGUID Opt. String System ID. The maximum length is
64.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-3 data Object Description


Parameter Name Req. or Opt. Data Type Description
packageOverview Opt. PackageOverview The package overview.
packageDetails Opt. PackageDetails The package details.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

31
HikCentral Connect OpenAPI Developer Guide

Table 5-4 data Object Description


Parameter Name Req. or Opt. Data Type Description
appKey Opt. String Hik-Connect account appkey. The
maximum length is 64.
appToken Opt. String Hik-Connect streaming token. The
maximum length is 64.

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.

streamAreaDomai Opt. String Hik-Connect domain name.


n
expireTime Opt. String Expiry time. The maximum length is
16.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
pageIndex Req. Integer Body The current page.
pageSize Req. Integer Body Number of records on each
page.

Request Example
{
"pageIndex":1,
"pageSize":10

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-5 data Object Description


Parameter Name Req. or Opt. Data Type Description
totalCount / Integer Number of total pages.
pageIndex / Integer The current page.
pageSize / Integer Number of records on each page.
user / User [] User information.

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"
}

5.2 Resource-Related Services

5.2.1 Physical Resources

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
deviceCategor Req. Device Body Device category. The maximum
y Category length is 32.
deviceInfo Req. DeviceInfo Body Device information.
importToArea Opt. ImportToArea Body Whether to import to area
automatically.
timeZone Req. TimeZone Body Time zone information.
vehicleInfo Opt. VehicleInfo(3) Body On-Board device information.

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

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-6 data Object Description


Parameter Name Req. or Opt. Data Type Description
addDeviceRespon Opt. AddDeviceRespon The information returned for adding
se se devices.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
deviceInfo Req. DeviceInfo (2) Body Device information.
timeZone Opt. TimeZone Body Time zone information.

Request Example
{
"deviceInfo":{
"id":"4606458718594636bb0487029f759684",
"name":"NVR_test221",
"userName":"admin",
"password":"Abc12345"
},
"timeZone":{
"id":"19",
"applyToDevice":"1"
}
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
pageIndex Req. Integer Body The current page.
pageSize Req. Integer Body Number of records on each
page, which is between 1 and
500.
areaID Opt. String Body Area ID, which is used
exclusively with jobNumber.
deviceCategor Opt. String Body Device category (encoding
y device, on-board device, alarm
device,etc.). The maximum
length is 32. When the node
jobNumber is involved,
multiple device categories can
be configured (separated by
comma); in other cases,
searching by multiple device
categories is not supported.
filter Opt. Object Body Search condition. See details in
the filter Object Description
below.

38
HikCentral Connect OpenAPI Developer Guide

Table 5-7 filter Object Description


Parameter Req. or Opt. Data Type Parameter Description
Type
matchKey Opt. String Body Fuzzy search; search fields
including device name, device
serial No., and device version.
jobNumber Opt. String Body Work order No. The maximum
length is 128.

Request Example
{
"pageIndex":1,
"pageSize":10,
"deviceCategory":"encodingDevice",
"areaID":"420be45bdeb2407c84dc58b3caf056c4",
"filter":{
"matchKey":"0",
"jobNumber":"0"
}
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. GetDevicesResVo Device list structure.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
deviceSerialN Req. String Body Device serial No. The maximum
o length is 16.

Request Example
{
"deviceSerialNo":"F68147103 "
}

40
HikCentral Connect OpenAPI Developer Guide

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-8 data Object Description


Parameter Name Req. or Opt. Data Type Description
device Opt. GetDeviceInfo The returned device information.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
deviceID Req. String[] Body Device ID.
deviceCategor Req. String Body Device category. The maximum
y length is 32.
deleteVehicle Opt. Integer Body Whether to delete the vehicle
synchronously: 0-no (by
default), 1-yes.

Request Example
{
"deviceID":[
"4ab20c2f3ba54daea4e0f569b622c362"
],
"deviceCategory":"encodingDevice"
}

43
HikCentral Connect OpenAPI Developer Guide

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
deviceSerial Req. String[] Body Camera serial No.
channelNo Req. Integer Body Camera channel No.

Request Example
{
"deviceSerial": "F68147103",
"channelNo": 1
}

44
HikCentral Connect OpenAPI Developer Guide

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.
captureUrl Opt. String Returned captured picture URL (valid
for 15 minutes).

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
deviceId Req. String Path Device ID.

45
HikCentral Connect OpenAPI Developer Guide

Request Example
http://dev-3.hikcentralconnect.com/api/hccgw/resource/v1/device/
c6a91398ffeb46888ace8f4667483095 /refresh

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-9 data Object Description


Parameter Name Req. or Opt. Data Type Description
deviceId Req. String Device ID.
status Opt. Integer Device network status: 0-​offline, 1-
online.
errorCode Opt. String Error code, returned when refreshing
device status failed.

Response Example
{
"data": {
"deviceId": "1aed864a17214f4f8d43f258b9bb4d88",
"status": 1
},
"errorCode": "0"
}
Or
{
"data": {
"deviceId": "1aed864a17214f4f8d43f258b9bb4d88",
"errorCode": " CCF021307"
},
"errorCode": "0"
}

46
HikCentral Connect OpenAPI Developer Guide

5.2.2 Logical Resources

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
parentAreaID Req. String Body Parent area ID. The maximum
length is 32.
areaName Req. String Body Area name. The maximum
length is 64.

Request Example
{
"parentAreaID":"-1",
"areaName":"test_mgz2"
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).

47
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Opt. Data Type Description


Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-10 data Object Description


Parameter Name Req. or Opt. Data Type Description
areaID / String Area ID created.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
pageIndex Req. Integer Body The current page.

48
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Opt. Data Type Parameter Description


Type
pageSize Req. Integer Body Number of records on each
page, which is between 1 and
500.
filter Opt. Object Body Search condition. See details in
the filter Object Description
below.

Table 5-11 filter Object Description


Parameter Req. or Opt. Data Type Parameter Type Description
parentAreaID Opt. String Body Parent area ID, which can be
used to get the corresponding
child area list. All areas are
included if this node is empty
or "-1". The maximum length is
32.
includeSubAre Opt. String Body Whether to get the
a corresponding child areas: 0
(only get the parent area), -1
(get all corresponding child
areas under the parent area).

Request Example
{
"pageIndex":"1",
"pageSize":"10",
"filter":{
"parentAreaID":"-1",
"includeSubArea":1
}
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).

49
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Opt. Data Type Description


Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-12 data Object Description


Parameter Name Req. or Opt. Data Type Description
totalCount Req. String Number of total records.
pageIndex Req. String The current page.
pageSize Req. String Number of records on each page.
area Opt. BriefArea Area information.
[]

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
areaID Opt. String[] Body The list of area IDs.

Request Example
{
"areaID":[
"1d3797d6f5c84b4c9720f2d1453b3516","d9eaa479588b48cb9f79a59ab5fb41b9","test"
]
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-13 data Object Description


Parameter Name Req. or Opt. Data Type Description
area Opt. BriefArea Area information.

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"
}

Cameras and Alarm Inputs/Outputs

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
areaID Req. String Body Area ID. The maximum length
is 32.
devChannel Req. Object[] Body Resource information. See
details in the devChannel
Object Description below.

Table 5-14 devChannel Object Description


Parameter Req. or Opt. Data Type Parameter Description
Name Type
resourceName Req. String Body Resource name. The maximum
length is 64.
resourceType Req. String Body Resource type, e.g., camera,
alarmInput (alarm input),
alarmOutput (alarm output).
The maximum length is 64.
channelID Req. String Body Channel ID, equivalent to the
node id in CameraChannel ,
AlarmInputChannel , and
AlarmOutputChannel from
GetDeviceInfo returned from
POST /api/hccgw/resource/v1/
devicedetail/get. The
maximum length is 32.

Request Example
{
"areaID":"1d3797d6f5c84b4c9720f2d1453b3516",
"devChannel":[
{
"resourceName":"D 201",
"resourceType":"alarmInput",
"channelID":"564138cd313d41dab82b41e73757edaa"
}

53
HikCentral Connect OpenAPI Developer Guide

]
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-15 data Object Description


Parameter Name Req. or Opt. Data Type Description
resource / ResourceAddResult [] Area-related
information.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
ids Req. String[] Body Area ID. The maximum length
is 32.

Request Example
{
"ids": ["1d3797d6f5c84b4c9720f2d1453b3516"]
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
pageIndex Req. Integer Body The current page.
pageSize Req. Integer Body Number of records on each
page, which is between 1 and
500.
filter Req. Object Body Search condition. See details in
the filter Object Description
below.

Table 5-16 filter Object Description


Parameter Req. or Opt. Data Type Parameter Type Description
areaID Opt. String Body Area ID. All areas are included
if this node is empty. The
maximum length is 32.
includeSubAre Opt. String Body Whether to include cameras in
a the child area: 0 (No), -1 (yes).
It is 0 (No) when deviceID or
deviceSerialNo is specified.
deviceSerialNo Opt. String Body Device serial No. The
maximum length is 32.
cameraID Opt. String[] Body Camera ID. The maximum
length is 32.

Request Example
{
"pageIndex":"1",
"pageSize":"10",
"filter":{
"areaID":"-1",
"includeSubArea":"1",
"deviceID":"",
"deviceSerialNo":"",
"cameraID":[
"ba1e16a1f1084a93a7dc72b21609c380","b6ddbebb36584a51858edbba30c7283c"
]

56
HikCentral Connect OpenAPI Developer Guide

}
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-17 data Object Description


Parameter Name Req. or Opt. Data Type Description
totalCount Req. Integer Number of total pages.
pageIndex Req. Integer The current page.
pageSize Req. Integer Number of records on each page.
camera / CameraInfo [] Camera-related information.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
pageIndex Req. Integer Body The current page.
pageSize Req. Integer Body Number of records on each
page, which is between 1 and
500.
filter Req. Object Body Search condition. See details in
the filter Object Description
below.

Table 5-18 filter Object Description


Parameter Req. or Opt. Data Type Parameter Type Description
areaID Opt. String Body Area ID. All areas are included
if this node is empty. The
maximum length is 32.
includeSubAre Req. String Body Whether to include cameras in
a the child area: 0 (No), 1 (yes).
It is 0 (No) when deviceID or
deviceSerialNo is specified.
The maximum length is 1.
deviceID Opt. String Body Device ID. The maximum
length is 32.
deviceSerialNo Opt. String Body Device serial No. The
maximum length is 32.

Request Example
{
"pageIndex":"1",
"pageSize":"10",
"filter":{
"areaID":"-1",
"includeSubArea":"1",
"deviceID":"",
"deviceSerialNo":""

59
HikCentral Connect OpenAPI Developer Guide

}
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-19 data Object Description


Parameter Name Req. or Opt. Data Type Description
totalCount Req. String Number of total pages.
pageIndex Req. String The current page.
pageSize Req. String Number of records on each page.
alarmOutput / AlarmInfo [] Information of alarm output
resource.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
pageIndex Req. Integer Body The current page.
pageSize Req. Integer Body Number of records on each
page, which is between 1 and
500.
filter Req. Object Body Search condition. See details in
the filter Object Description
below.

Table 5-20 filter Object Description


Parameter Req. or Opt. Data Type Parameter Type Description
areaID Opt. String Body Area ID. All areas are included
if this node is empty. The
maximum length is 32.
includeSubAre Req. String Body Whether to include cameras in
a the child area: 0 (No), 1 (yes).
It is 0 (No) when deviceID or
deviceSerialNo is specified.
The maximum length is 1.
deviceID Opt. String Body Device ID. The maximum
length is 32.
deviceSerialNo Opt. String Body Device serial No. The
maximum length is 32.

Request Example
{
"pageIndex":"1",
"pageSize":"10",
"filter":{
"areaID":"-1",
"includeSubArea":"1",
"deviceID":"",
"deviceSerialNo":""

62
HikCentral Connect OpenAPI Developer Guide

}
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-21 data Object Description


Parameter Name Req. or Opt. Data Type Description
totalCount Req. String Number of total pages.
pageIndex Req. String The current page.
pageSize Req. String Number of records on each page.
alarmInput / AlarmInfo [] Information of alarm input
resources.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
alarmIntputID Req. Array[String] Body Alarm input ID set. You can get
statuses of up to 8 resources at
the same time.

Request Example
{
"alarmInputID": [
"2c0a4ab9a2504de4842d95435f3a8620",
"b35b8e9a9326418ca2198ed45709b5bd"
]
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-22 data Object Description


Parameter Name Req. or Opt. Data Type Description
alarmInput Req. AlarmInputInfo [] Returned alarm input status. If the
requested alarm input ID does not
exist, the returned information will
not include the corresponding alarm
input information.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
alarmOutputO Req. Object[] Body Alarm output status.
peration

Table 5-23 filter Object Description


Parameter Req. or Opt. Data Type Parameter Type Description
alarmOutputI Req. String Body Alarm output ID. The
D maximum length is 32.
operation Req. Integer Body Whether to enable: 0 (No), -1
(yes).

Request Example
{
"alarmOutputOperation":[
{

66
HikCentral Connect OpenAPI Developer Guide

"alarmOutputID":"b58a0172ab504c9f98060456a3c7069f",
"operation":1
}
]
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-24 data Object Description


Parameter Name Req. or Opt. Data Type Description
alarmOutputOper / AlarmOutputOper Information related to alarm output
ation ation [] control.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
alarmOutputI Req. String[] Body Alarm output ID set.
D

Request Example
{
"alarmOutputID":[
"b58a0172ab504c9f98060456a3c7069f"
]
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-25 data Object Description


Parameter Name Data Type Parameter Type Description
alarmOutput AlarmOutputState [] Body Information related to
alarm output status.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
cameraID Req. String Body Camera ID. The maximum
length is 32.
refresh Req. Integer Body Whether to refresh and get the
camera thumbnail: 0 (do not
refresh), 1(refresh).

Request Example
{
"cameraID":"ba1e16a1f1084a93a7dc72b21609c380",
"refresh":1
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).

69
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Opt. Data Type Description


Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-26 data Object Description


Parameter Name Data Type Parameter Type Description
pictureURL String Body Thumbnail URL (valid
for a day).

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
pageIndex Req. Integer Body The current page.

70
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Opt. Data Type Parameter Description


Type
pageSize Req. Integer Body Number of records on each
page, which is between 1 and
500.
filter Req. Object Body Search condition. The
maximum length is 64. See
details in the filter Object
Description below.

Table 5-27 filter Object Description


Parameter Req. or Opt. Data Type Parameter Description
Type
areaID Opt. String Body Area ID. All areas are included
if this node is empty. The
maximum length is 32.
includeSubAr Req. String Body Whether to include cameras in
ea the child area: "0" (No), "1"
(yes). It is 0 (No) when
deviceID or deviceSerialNo is
specified. The maximum
length is 1.
deviceID Opt. Opt. Body Device ID. The maximum
length is 32.
deviceSerialN Opt. Opt. Body Device serial No. The
o maximum length is 32.

Request Example
{
"pageIndex":1,
"pageSize":10,
"filter":{
"areaID":"-1",
"includeSubArea":"1",
"deviceID":"",
"deviceSerialNo":""
}
}

71
HikCentral Connect OpenAPI Developer Guide

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-28 data Object Description


Parameter Name Req. or Opt. Data Type Description
totalCount Req. String Number of total pages.
pageIndex Req. String The current page.
pageSize Req. String Number of records on each page.
door / AlarmInfo [] Information of alarm input
resources.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.

73
HikCentral Connect OpenAPI Developer Guide

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-29 data Object Description


Parameter Name Req. or Opt. Data Type Description
systemTimeZoneI / String Time zone ID of the HikCentral Connect
D platform.
timeZone / TimeZoneInfo [] Time zone information.

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"

5.3 Alarm-Related Services


Alarm refers to the content uploaded by the device when the configured alarm rules are triggered.

5.3.1 Alarm Subscription

POST /api/hccgw/alarm/v1/mq/subscribe
Subscribe to alarm information.

Request URL
https://[serverAddress]:[serverPort]/api/hccgw/alarm/v1/mq/subscribe
Request Parameters

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
subscribeType Req. Integer Body 0 (cancel subscription), 1
(subscribe).
subscribeMod Req. Integer Body 0 (subscribe to all alarm types),
e 1(subscribe by alarm type).
eventType Opt. Integer[] Body Alarm event type. See details in
Alarm Type .

Request Example
{
"subscribeType": 1,

75
HikCentral Connect OpenAPI Developer Guide

"subscribeMode": 1,
"eventType": [0,1]
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
maxNumberP Opt. Integer Body Information volume per
erTime request: 100, 200, 300
(default), 400, 500.

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer

76
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Opt. Data Type Description


to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-30 data Object Description


Parameter Name Req. or Opt. Data Type Description
batchId Req. String ID of information batch
processing.
remainingNumber Req. Long Total remaining alarms.
alarmMsg / AlarmMsg [] Event information.

Response Example (for Leaving Queue Alarm)


{
"data": {
"batchId":
"0730b5d3664040f33fe8bfd4eb6b886b88f10040e489a0d54c00e41546a6a9b2946cbcd91f0a6eca6ec6cddf4511a78f",
"remainingNumber":13445;
"alarmMsg": [
{
"systemId": "f718f3013b5a4fb38e573043afe28683",
"guid": "18892bc026ddddd",
"dataRetransmission": 1,
"msgType": "1",
"alarmState": "1",
"pulseAlarm": "false",
"alarmMainCategory": "alarmCategoryVideo",
"alarmSubCategory": "alarmSubCategoryCamera",
"timeInfo": {
"endTime": "2023-04-13T08:56:55Z",
"endTimeLocal": "2023-04-13T16:56:55+08:00",
"startTime": "2023-04-13T08:56:40Z",
"startTimeLocal": "2023-04-13T16:56:40+08:00"
},
"eventSource": {
"eventType": "100657",
"sourceID": "780e25f5f72b4592a2e5c2deae38726f",
"sourceName": "IPCamera 01",
"sourceType": "camera",
"areaID": "66669b5dd0024e12b5502623f7dc343a",

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
batchId Req. String Body The batchId returned when
getting the list of event
information. The maximum
length is 256.

Request Example
{

"batchId":"5a32fddc6f5c01e067f7abdfe5348a6c98f64d1fe196b9d54c45b01b50a3a7b5946dbcd91f0a6eca6ec6cddf45
11a78f"
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.

Response Example
{
"errorCode": "0"
}

5.3.2 Alarm Rules

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
alarmrule / Object[] Body Information related to alarm
rules.

Table 5-31 alarmrule Object Description


Parameter Req. or Opt. Data Type Parameter Description
Name Type
name Req. String Body Alarm rule name. The
maximum length is 255.
alarmMainCat Opt. String Body Alarm main category. The
egory maximum length is 64.
alarmSubCateg Opt. String Body Alarm sub category. The
ory maximum length is 64.
description Opt. String Body Alarm rule description. The
maximum length is 128.
color Opt. String Body Alarm rule color. The
maximum length is 64.
notification Opt. Notification Body Notification configuration.
schedule Opt. Schedule Body Alarm template.
priority Opt. Priority Body Alarm priority.
ignoreRecurrin Opt. IgnoreRecurrin Body Auto-close alarming window.
g g
eventSource Req. EventSource Body Event source.

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

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data
Object Description below.

81
HikCentral Connect OpenAPI Developer Guide

Table 5-32 data Object Description


Parameter Name Req. or Opt. Data Type Description
alarmRule Req. AlarmRuleOperati Alarm rule information.
on []

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
pageIndex Req. Integer Body The current page.
pageSize Req. Integer Body Number of records on each
page, which is between 1 and
500.
filter Opt. Object Body Search condition. See details in
the filter Object Description
below.

82
HikCentral Connect OpenAPI Developer Guide

Table 5-33 filter Object Description


Parameter Req. or Opt. Data Type Parameter Description
Type
alarmRuleID Opt. String Body Alarm rule ID. This search
condition is not enabled if this
node is empty or null. The
maximum length is 64.
alarmRuleNam Opt. String Body Alarm rule name. Fuzzy search
e supported. This search
condition is not enabled if this
node is empty or null. The
maximum length is 64.
eventSourceN Opt. String Body Alarm source name. Fuzzy
ame search supported. This search
condition is not enabled if this
node is empty or null. The
maximum length is 64.
alarmRuleStat Opt. Integer Body -1 or empty (all), 0 (normal), 1
e (abnormal). The maximum
length is 3.
alarmRuleEna Opt. Integer Body -1 or empty (all), 0 (disable), 1
ble (enable). The maximum length
is 3.
eventSource Opt. EventSource [] Body Alarm source. Only sourceType
and sourceID is required for
search.
alarmCategory Opt. AlarmCategor Body Alarm category.
y

Request Example
{
"pageIndex":"1",
"pageSize":"10",
"filter":{

}
}

83
HikCentral Connect OpenAPI Developer Guide

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Alarm rule list structure.

Table 5-34 data Object Description


Parameter Name Req. or Opt. Data Type Description
totalCount Req. String Number of total pages.
pageIndex Req. String The current page.
pageSize Req. String Number of records on each page.
alarmRule / AlarmRuleDetail [] Information related to alarm rules.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
alarmrule Req. Object[] Body Information related to alarm
rules.

85
HikCentral Connect OpenAPI Developer Guide

Table 5-35 alarmrule Object Description


Parameter Req. or Opt. Data Type Parameter Description
Name Type
id Req. String Body Alarm rule ID. The maximum
length is 64.
name Req. String Body Alarm rule name. The
maximum length is 255.
description Opt. String Body Alarm rule description. The
maximum length is 128.
color Opt. String Body Alarm rule color. The
maximum length is 64.
notification Opt. Notification Body Notification configuration.
schedule Opt. Schedule Body Alarm template.
priority Opt. Priority Body Alarm priority.
ignoreRecurrin Opt. IgnoreRecurrin Body Auto-close alarming window.
g g
eventSource Req. EventSource Body Event source.

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

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-36 data Object Description


Parameter Name Req. or Opt. Data Type Description
alarmRule Req. AlarmRuleOperati Alarm rule information.
on []

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
pageIndex Req. Integer Body The current page.
pageSize Req. Integer Body Number of records on each
page, which is between 1 and
500.

Request Example
{
"pageIndex":"1",
"pageSize":"10"
}

88
HikCentral Connect OpenAPI Developer Guide

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-37 data Object Description


Parameter Name Req. or Opt. Data Type Description
totalCount Req. String Number of total pages.
pageIndex Req. String The current page.
pageSize Req. String Number of records on each page.
alarmpriorities / Alarmpriorities [] Information related to alarm
priorities.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
pageIndex Req. Integer Body The current page.
pageSize Req. Integer Body Number of records on each
page, which is between 1 and
500.

Request Example
{
"pageIndex":"1",
"pageSize":"10"
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).

90
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Opt. Data Type Description


Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-38 data Object Description


Parameter Name Req. or Opt. Data Type Description
totalCount Req. String Number of total pages.
pageIndex Req. String The current page.
pageSize Req. String Number of records on each page.
receivingSchedule / ReceivingSchedule Information related to alarm arming
[] schedule templates.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
alarmLinkage / Object[] Body Information related to alarm
linkage configuration.

Table 5-39 alarmrule Object Description


Parameter Req. or Opt. Data Type Parameter Description
Type
alarmRuleID Req. String Body Alarm rule ID. The maximum
length is 32.
linkageItem Opt. LinkageItem [] Body Linkage item name.

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

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-40 data Object Description


Parameter Name Req. or Opt. Data Type Description
alarmLinkage Req. AlarmLinkage [] Alarm linkage rule information.

Response Example
{
"data": {
"alarmLinkage": [
{
"alarmRuleID": "1651173299037802496",
"itemID": "5BE20D67677647EF8D448E67E4AFB411",
"linkageType": "LinkCamera",
"errorCode": "0"
}
]
},
"errorCode": "0"
}

94
HikCentral Connect OpenAPI Developer Guide

5.3.3 Alarm Logs

POST /api/hccgw/alarm/v1/alarmlog
Get the list of alarm logs.

Request URL
https://[serverAddress]:[serverPort]/api/hccgw/alarm/v1/alarmlog
Request Parameters

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
pageIndex Req. Integer Body The current page No., which is
equal to or greater than 1.
pageSize Req. Integer Body Number of records on each
page, which is between 1 and
500.
timeRange Req. TimeRange Body Time range parameters of
device. The time between the
start time and end time should
be no more than a day.
areaID Req. String[] Body Area ID.
eventTypeList Opt. String[] Body See details in Alarm Type . If
this node is not configured, all
event types will be included.

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

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-41 data Object Description


Parameter Name Req. or Opt. Data Type Description
pageIndex Req. Integer The current page No.
pageSize Req. Integer Number of records on the
current page.
moreData Req. Integer Whether it is more than one
page: 0-no, 1-yes.
alarmlogList Req. AlarmMsg [] Alarm log set.

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"
}

5.4 Message-Related Services


Message refers to the content uploaded by the device actively when there is no external trigger
source.

97
HikCentral Connect OpenAPI Developer Guide

5.4.1 Message Subscription and Receiving

POST /api/hccgw/rawmsg/v1/mq/subscribe
Subscribe to messages.

Request URL
https://[serverAddress]:[serverPort]/api/hccgw/rawmsg/v1/mq/subscribe
Request Parameters

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
subscribeType Req. Integer Body 0-cancel subscription, 1-
subscribe. The maximum
length is 1.
msgType Req. String[] Body Event type to subscribe to. If
this node is empty, all events
will be subscribed by default.
Refer to Message Type for
details.

Request Example
{
"subscribeType":1,
"msgType": ["Msg330001","Msg330002"]
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-42 data Object Description


Parameter Name Req. or Opt. Data Type Description
batchId Req. String Message queue batch processing ID.
event / Event [] Information related to event
messages.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
batchId Req. String Body The returned batchID when
getting event messages. The
maximum length is 256.

Request Example
{

"batchId":"4075e8d16a4b4ce63dabebcdba3cd37e83b65a13edd5b4d34343ef595ab6b5a7946a86e61d086cc86cc4cfdd
4713a58d"
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.

Response Example
{
"errorCode": "0"
}

102
HikCentral Connect OpenAPI Developer Guide

5.5 Video-Related Services

5.5.1 Recording Schedule and Playback

POST /api/hccgw/video/v1/recordsettings/get
Get the recording schedule.

Request URL
https://[serverAddress]:[serverPort]/api/hccgw/video/v1/recordsettings/get
Request Parameters

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
cameraID Req. String[] Body Camera ID set.

Request Example
{
"cameraId":[
"2aeec98c14a4427f9ace6c48e91ab4cc"
]
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

103
HikCentral Connect OpenAPI Developer Guide

Table 5-43 data Object Description


Parameter Name Req. or Opt. Data Type Description
recordSetting Req. RecordSetting [] Recording schedule
information.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header The maximum length is 64.
resourceId Req. String Body Camera resource ID, which is
CameraInfo obtained from /

104
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Opt. Data Type Parameter Description


Type
api/hccgw/resource/v1/areas/
cameras/get. The maximum
length is 64.
deviceSerial Req. String Body Device serial No. The maximum
length is 32.
type Req. String Body Type: 1 (live view), 2 (playback
from local recording), 3
(playback from cloud storage
recording).
code Opt. String Body Password for device recording
encryption. The maximum
length is 16.
startTime Opt. String Body Start time of recording
playback from local or cloud
storage, e.g., 2019-12-01
00:00:00.
stopTime Opt. String Body End time of recording playback
from local or cloud storage,
e.g., 2019-12-01 00:00:00.

Request Example
{
"type":"1",
"code":"1111qqqq",
"deviceSerial":"G99131454",
"resourceId":"b2f3f6ce0a954045ba77a6acfe8dd89e"
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).

105
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Opt. Data Type Description


Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-44 data Object Description


Parameter Req. or Opt. Data Type Description
Name
id Req. String ID.
url Req. String URL.

Response Example
{
"data": {
"id": "1",
“url": "ezopen://[email protected]/G99131454/1.live"
},
"errorCode": "0"
}

5.6 Video Intercom Services

5.6.1 Buildings and Rooms

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
pageNum Req. Integer Body Page number.
pageSize Req. Integer Body Page size.
searchCriteria Req. Object Body Search condition. Refer to
BuildingSearchCriteria for
details.

Request Example
{
"pageNum": 1,
"pageSize": 64,
"searchCriteria": {
"areaId": "-1",
"isContainSubArea": 1,
"filterName": ""
}
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

107
HikCentral Connect OpenAPI Developer Guide

Table 5-45 data Object Description


Parameter Name Req. or Opt. Data Type Description
pageNum Req. Integer Page number.
pageSize Req. Integer Page size.
totalNum Req. Integer Total records.
buildList Req. Building [] List of building information.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
pageNum Req. Integer Body Page number.
pageSize Req. Integer Body Page size.
searchCriteria Req. Object Body Search condition. Refer to
RoomSearchCriteria for details.

Request Example
{
"pageNum": 1,
"pageSize": 64,
"searchCriteria": {
"areaId": "-1",
"buildId": "",
"isContainSubArea": 1,
"filter": {
"roomNum": "",
"roomName": "",
"personAmount": "",
"email": "",
"mainAccount": ""
}
}}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

109
HikCentral Connect OpenAPI Developer Guide

Table 5-46 data Object Description


Parameter Name Req. or Opt. Data Type Description
pageNum Req. Integer Page number.
pageSize Req. Integer Page size.
totalNum Req. Integer Total records.
roomList Req. RoomVO [] List of room information.

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"
}

5.6.2 ISAPI Protocol Transmission

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
method Req. String Body Method (GET, POST, PUT, and
DELETE).
url Req. String Body URL.
id Req. String Body Device ID.
contentType Req. String Body application/​xml, application/
json, and application/​x-www-
form-urlencoded are
supported.
body Opt. String Body 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

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
message Req. String Prompt message.
data Req. String Data returned by the successful
request.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
pageNum Req. Integer Body Page number.
pageSize Req. Integer Body Page size.
searchCriteria Req. Object Body Search condition. Refer to
ResidentSearchRequest for
details.

Request Example
{
"pageNum": 0,
"pageSize": 0,
"searchRequest": {
"areaId": "",
"buildId": "",
"isContainSubArea": 0,
"filter": {
"name": "",
"roomNum": 0,
"email": "",
"phone": "",
"type": 0,
"isExpired": 0
}
}}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

113
HikCentral Connect OpenAPI Developer Guide

Table 5-47 data Object Description


Parameter Name Req. or Opt. Data Type Description
pageNum Req. Integer Page number.
pageSize Req. Integer Page size.
totalNum Req. Integer Total records.
personList Req. Person List of person information.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
alIds Opt. String[] Body Access level ID.
language Opt. String Body Language used for sending
emails to the resident, for
example, zh_CN (Chinese). If
this parameter is empty, the
default language will be en
(English).
If the resident is added from
the existing persons, this
parameter is not required to be
filled in.
List of languages: en (English),
it (Italiano), es (Español), de
(Deutsch), fr (Français) pl
(Polski), nl (Nederlands), pt
(Português), ru (Русский), tr

(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

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

116
HikCentral Connect OpenAPI Developer Guide

Table 5-48 data Object Description


Parameter Name Req. or Opt. Data Type Description
personId Req. String Person ID.
failedResultList Opt. FailedResult [] The error list is returned only when
the number of persons exceeds the
limit.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
alIds Opt. String[] Body Access level ID.
personBaseInf Req. Object Body Person basic information. Refer
o to PersonDTO for details.
roomList Req. RoomDTO [] Body Resident room information.

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

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
deleteList Req. String[] Body ID of the resident to be
deleted.

Request Example
{
"deleteList": [“string1”]
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.

Response Example
{
"errorCode": "0"
}

5.6.4 Temporary Passes


A temporary pass contains a password and a QR code. A person with a temporary access need
(e.g., delivery person) can use the temporary pass to unlock doors according to the set access level.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
id Req. String Body Temporary pass ID (temporary
person ID).
clientLocalTim Req. String Body Request time (in ISO 8601
e format). Refer to ISO 8601
Time Format Instruction for
details.

Request Example
{
"id": "237160983473358848",
"clientLocalTime": "2022-10-28T11:08:23+08:00"
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

120
HikCentral Connect OpenAPI Developer Guide

Table 5-49 data Object Description


Parameter Req. or Opt. Data Type Description
openCount Req. Integer Allowed passes for each door.
name Req. String Temporary pass name.
startTime Req. Long Start time of the validity period (unit:
ms).
endTime Req. Long End time of the validity period (unit:
ms).
code Req. String base64.
creatorId Req. String Creator ID.
creatorName Req. String Creator name.
expiredStatus Req. Integer Expiry status: 1-expired, 0-valid.
password Req. String Password to open the door.
accessLevelList Req. AccessLevel Access level information.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
pageNum Req. Integer Body Page number.
pageSize Req. Integer Body Page size.
searchRequest Opt. Object Body Search conditions. Refer to
TempAuthSearchRequest for
details.

Request Example
{
"pageNum": 0,
"pageSize": 0,
"searchRequest": {
"filter": {
"name": ""
}
}}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).

122
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Opt. Data Type Description


Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-50 data Object Description


Parameter Req. or Opt. Data Type Description
pageNum Req. Integer Page number.
pageSize Req. Integer Page size.
totalNum Req. Integer Total records.
tempAuthList Req. TempAuth [] List of temporary passes.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
name Req. String Body Temporary pass name. The
maximum length is 32.
openCount Req. Integer Body Allowed passes for each door.
The range is between 1 and
255.
startTime Req. String Body Start time of validity period
(unit: ms, in ISO 8601 format).
Refer to ISO 8601 Time Format
Instruction for details.
endTime Req. String Body End time of validity period
(unit: ms, in ISO 8601 format).
Refer to ISO 8601 Time Format
Instruction for details.
clientLocalTim Req. String Body Request time (in ISO 8601
e format). Refer to ISO 8601
Time Format Instruction for
details.
alIds Opt. String[] Body List of access level ID. Required
for the Portal, optional for the
Mobile Client.

Request Example
{
"name": "",
"openCount": 0,
"startTime": "",

124
HikCentral Connect OpenAPI Developer Guide

"endTime": "",
"clientLocalTime": "",
"alIds": [
""
]
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-51 data Object Description


Parameter Req. or Opt. Data Type Description
id Req. String Temporary pass ID.
openCount Req. Integer Times of opening door.
name Req. String Temporary pass name.
startTime Req. Long Start time of validity period (unit: ms).
endTime Req. Long End time of validity period (unit: ms).
code Req. String Base64 encoding.
creatorId Req. String Creator ID.
creatorName Req. String Creator name.
expiredStatus Req. Integer Expiry status: 1-expired, 0-valid.
password Req. String Password to open the door.
accessLevelList Opt. AccessLevel [] Access level information.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
id Req. String Body Temporary pass ID.
name Req. String Body Temporary pass name. The
maximum length is 32.
openCount Req. Integer Body Allowed passes for each door.
The range is between 1 and
255.
startTime Req. String Body Start time of validity period (in
ISO 8601 format). Refer to ISO

126
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Opt. Data Type Parameter Description


Type
8601 Time Format Instruction
for details.
endTime Req. String Body End time of validity period (in
ISO 8601 format). Refer to ISO
8601 Time Format Instruction
for details.
clientLocalTim Req. String Body Current time of the request (in
e ISO 8601 format). Refer to ISO
8601 Time Format Instruction
for details.
alIds Opt. String Body List of access level ID. Required
for the Portal, optional for the
Mobile Client.

Request Example
{
"id": "",
"name": "",
"openCount": 0,
"startTime": "",
"endTime": "",
"clientLocalTime": "",
"alIds": [
""
]
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
deleteList Req. String[] Body List of temporary pass ID.

Request Example
{
"deleteList": [“string1”]
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.

Response Example
{
"errorCode": "0"
}

128
HikCentral Connect OpenAPI Developer Guide

5.6.5 Video Intercom Calls

POST /api/hccgw/devcall/v1/call/receive
Respond to calls.

Request URL
https://[serverAddress]:[serverPort]/api/hccgw/devcall/v1/call/receive
Request Parameters

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
recordId Req. String Body Call record ID. The maximum
length is 64.
status Req. Integer Body Operation type: 1-answer
(when receiving calls), 2-not
answer (when receiving calls),
3-hang up (after the call is
picked up).
userId Req. String Body User ID of the called resident,
which can be obtained from
POST /api/hccgw/
platform/v1/users/get .

Request Example
{
"recordId": "",
"userId": "",
"status": "2"
}

129
HikCentral Connect OpenAPI Developer Guide

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.

Response Example
{
"errorCode": "0"
}

5.7 Access Control Services

5.7.1 Open Doors Remotely

POST /api/hccgw/acs/v1/remote/control
Open door remotely.

Request URL
https://[serverAddress]:[serverPort]/api/hccgw/acs/v1/remote/control
Request Parameters

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
remoteControl Req. RemoteContro Body Operation content.
l

Request Example
{
"remoteControl": {

130
HikCentral Connect OpenAPI Developer Guide

"actionType": 0,
"elementlist": [
""
],
"direction": 0,
"areaId": "",
"depthTraversal": 0
}}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-52 data Object Description


Parameter Req. or Opt. Data Type Description
operationResult Req. RemoteControlRe List of failures. If this parameter is
sponse [] empty, the operation succeeded.

Response Example
{
"data": {
{
"operationResult": [
{
"elementId": "",
"elementName": "",
"areaId": "",
"areaName": "",
"errorCode": ""
}
]
}
},
"errorCode": "0"
}

131
HikCentral Connect OpenAPI Developer Guide

5.7.2 System Bluetooth Encryption Key

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

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-53 data Object Description


Parameter Req. or Opt. Data Type Description
encryptType Req. String Encryption type (AES128_CBC).
authData Req. String Authentication information (32-byte
hex data).
vector Req. String Initialized vector (32-byte hex data).
loopCount Req. Integer Times of loop when generating the
encryption key.

132
HikCentral Connect OpenAPI Developer Guide

Response Example
{
"data": {
"encryptType": "",
"authData": "",
"vector": "",
"loopCount": 0
},
"errorCode": "0"
}

5.8 Person-Related Services

5.8.1 POST /api/hccgw/person/v1/groups/search


Get department list.

Request URL
https://[serverAddress]:[serverPort]/api/hccgw/person/v1/groups/search
Request Parameters

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
parentGroupId Opt. String Body Parent node ID. If this
parameter is empty, the
department in the root
directory will be included.
groupName Opt. String Body Department name for fuzzy
search. The maximum length is
64.
depthTraversa Opt. Bool Body Whether to enable deep
l search: true, false. The default
option is false.
groupIdList Opt. Array[String] Body Department ID list. Used for
getting department
information.

133
HikCentral Connect OpenAPI Developer Guide

Request Example
{
"parentGroupId": "",
"groupName": "",
"depthTraversal": "",
"groupIdList": ""
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
errorMsg Req. String Error message.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-54 data Object Description


Parameter Req. or Opt. Data Type Description
personGroupList Req. PersonGroup [] Department list.

Response Example
{
"errorCode": "0",
"errorMsg": "",
"data": {
"personGroupList": [
{
"groupId": "",
"groupName": "",
"parentId": "",
"childNodeExist": "",
"permissionState": "",
"description": "",
"areaList": [{
"areaId": ""
}],
"groupFullPath": ""

134
HikCentral Connect OpenAPI Developer Guide

}
]
}
}

5.9 On-Board Monitoring Services

5.9.1 POST /api/hccgw/resource/v1/areas/vehicles/add


Add vehicle resources. 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.

Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/vehicles/add
Request Parameters

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
areaId Req. String Body Area ID.
licensePlateNo Req. String Body License plate No.
vehicleType Req. Integer Body Vehicle type: 0-others, 1-car, 2-
truck, 3-bus.
driverFirstNa Opt. String Body Driver's first name.
me
driverLastNam Opt. String Body Driver's last name.
e
driverPhoneN Opt. String Body Driver's phone No.
o
pictureKey Opt. String Body Key of the vehicle picture.
deviceSerial Opt. String Body Linked device serial No.
extend Opt. String Body Annotations.

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

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-55 data Object Description


Parameter Req. or Opt. Data Type Description
id Req. String Vehicle ID.

Response Example
{
"data": {
"id": "2aeec98c14a4427f9ace6c48e91ab4cc"
},
"errorCode": "0"
}

5.9.2 POST /api/hccgw/resource/v1/areas/vehicles/{id}/update


Edit vehicle information.

136
HikCentral Connect OpenAPI Developer Guide

Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/vehicles/{id}/update
Request Parameters

Parameter Req. or Opt. Data Type Parameter Description


Type
{id} Req. String PathParam Vehicle ID.
Token Req. String Header Token. The maximum length is
64.
licensePlateNo Req. String Body License plate No.
vehicleType Req. String Body Vehicle type: 0-others, 1-car, 2-
truck, 3-bus.
driverFirstNa Opt. String Body Driver's first name.
me
driverLastNam Opt. String Body Driver's last name.
e
driverPhoneN Opt. String Body Driver's phone No.
o
pictureKey Opt. String Body Key of the vehicle picture.
deviceSerial Opt. String Body Linked device serial No.
extend Opt. String Body Annotations.

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

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.

Response Example
{
"errorCode": "0"
}

5.9.3 POST /api/hccgw/resource/v1/areas/vehicles/get


Search for vehicle resources.

Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/areas/vehicles/get
Request Parameters

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
pageIndex Req. Integer Body The current page.
pageSize Req. Integer Body Number of records on each
page, which is between 1 and
500.
filter Opt. Object Body Search condition. See details in
the filter Object Description
below.

138
HikCentral Connect OpenAPI Developer Guide

Table 5-56 filter Object Description


Parameter Req. or Opt. Data Type Description
areaID Opt. String Area ID.
includeSubArea Opt. String Whether to include vehicles in the
lower-level areas: 0-no, 1-yes.
vehicleID Opt. String[] Vehicle ID.

Request Example
{
"pageIndex": 1,
"pageSize": 10,
"filter": {
"areaID": "-1",
"includeSubArea": "1",
"vehicleID": []
}
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).
Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-57 data Object Description


Parameter Req. or Opt. Data Type Description
totalCount Req. Integer Total searched vehicles.
pageIndex Req. Integer Page index.
pageSize Req. Integer Number of records on each page,
which is between 1 and 500.
vehicle Req. VehicleInfo(1) [] Vehicle-related information.

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": ""
}
}
]

5.9.4 POST /api/hccgw/resource/v1/picture/uploadparam/get


Get the picture upload parameters.

Request URL
https://[serverAddress]:[serverPort]/api/hccgw/resource/v1/picture/uploadparam/get
Request Parameters

Parameter Req. or Opt. Data Type Parameter Description


Type
Token Req. String Header Token. The maximum length is
64.
format Req. String Body Picture format. Currently only
JPG format is supported.

Request Example
{
"format": "jpg"
}

Response Parameters

Parameter Req. or Opt. Data Type Description


errorCode Req. String Response status or error code: 0-
succeeded, other codes-failed (refer
to Status and Error Code for details).

141
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Opt. Data Type Description


Each code can contain up to 32
characters.
data Req. Object Data returned by the successful
request. See details in the data Object
Description below.

Table 5-58 data Object Description


Parameter Req. or Opt. Data Type Description
key Req. String Key of the vehicle picture.
url Req. String Vehicle picture URL, used for picture
upload (valid for 15 minutes).

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

A.1 Data Dictionary

A.1.1 Alarm Category

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

A.1.2 Resource Type

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

A.1.3 Device Category

Enumeration Description
alarmDevice Alarm Device
encodingDevice Encoding device
mobileDevice On-Board Device
accessControllerDevice Access Control Device
videoIntercomDevice Video Intercom Device

A.1.4 Alarm Type

Video Security

Event Code Description


10001 Video Tampering
10002 Motion Detection
10016 Face Capture
10032 Fire and Smoke Detection
10033 Temperature Alarm
10034 Temperature Difference Alarm
10035 Multi-​Target-​Type Detection
10036 Temperature Pre-Alarm
10100 Line Crossing
10101 Region Entrance
10102 Region Exiting
10103 Intrusion
10106 Fast Moving
10500 License Plate BlockList
10501 License Plate Allowlist
10610 Queuing Time Alarm

144
HikCentral Connect OpenAPI Developer Guide

Event Code Description


10611 Number of Queuing People Detection
10621 Abnormal Number of People
10630 Police Absence
10635 Not Wearing Mask
10636 Distance Measurement Alarm
20000 Triggered by Alarm Input
100105 People Density
100657 Leaving Queue Detection

Alarm Detection

Event Code Description


20000 Triggered by Alarm Input
20008 Restore Alarm Input
70001 Disarm
70002 Arming
70003 Instant Arming
70004 Stay Arming
70006 Alarm Clearing
100302 Bypass
100303 Bypass Restored
100304 Tamper
100305 Device Tampering Restored

Maintenance

Event Code Description


10000 Video Loss
10056 Camera Online
10057 Camera Offline

145
HikCentral Connect OpenAPI Developer Guide

Event Code Description


11016 On-Board Device Online
11017 On-Board Device Offline
20002 HDD Bad Sector
20003 HDD High Temperature
20005 HDD Impact Detection Event
20006 HDD Severe Failure
50002 Camera Recording Exception
70007 Late to Disarm
70113 Duress Alarm Report
70118 Keypad Locked
70119 Keypad Unlocked
70200 Device Tampering Alarm
70203 Mains Power Lost
70204 Low Battery Voltage
70205 Host Machine Reset
70211 Telephone Line Disconnected
70212 Bus Expander Disconnected
70213 Auto Arming Failed
70221 Expander Disconnected
70223 Cellular Network Disconnected
70224 Wired Network Disconnected
70250 Wireless Detector Disconnected
70253 Wireless Detector Low Battery
70255 Network Camera Disconnected
70302 IP Conflicted
70307 Wi-Fi Disconnected
70308 RF Exception
70309 Cellular Network Data Exceeded

146
HikCentral Connect OpenAPI Developer Guide

Event Code Description


70310 Wireless Sounder Low Battery
70311 Battery Fault
70402 Wireless Repeater Disconnected
70451 Wireless Peripheral Undervoltage
70452 Wireless Peripheral Disconnected
70453 Wireless Peripheral Deleted
70454 Wireless Peripheral Added
70502 Wireless Sounder Disconnected

Maintenance (On-Board Device)

Event Code Description


50101 Device Offline
50102 HDD Full
50103 Read/Write Hard Disk Error
50104 Standard Mismatched
50110 Illegal Login
50120 Device Reconnected
300001 Normal Signal
300002 Signal Exception
300003 GPS Module Error

On-Board Monitoring

Event Code Description


11009 Speeding
11010 Rollover
11011 Collision
11012 Sharp Turn
11013 Sudden Brake

147
HikCentral Connect OpenAPI Developer Guide

Event Code Description


11014 Sudden Acceleration
100359 Smoking
100360 Using Mobile Phone
100361 Fatigue Driving
100362 Distraction
100363 Seatbelt Unbuckled
100364 Forward Collision Warning
100365 Headway Monitoring Warning
100366 Lane Deviation Warning
100367 Pedestrian Collision Warning
100368 Speed Limit Warning
100369 Blind Spot Warning
100370 Emergency Alarm
100371 Alarm Input
100372 Yawning
100373 Wearing IR Interrupted Sunglasses
100396 Video Tampering
100398 Entering Route

A.1.5 Alarm Source

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

A.1.6 Message Type

Video Intercom

Enumeration Value Description


Msg140001 Messages about video intercom events.

On-Board Monitoring

Enumeration Value Description


Msg330001 GPS Data Report
Msg330101 Alarm Triggered by Panic Button
Msg330102 Alarm Input
Msg330201 Forward Collision Warning
Msg330202 Headway Monitoring Warning
Msg330203 Lane Deviation Warning
Msg330204 Pedestrian Collision Warning
Msg330205 Speed Limit Warning
Msg330301 Blind Spot Warning
Msg330401 Sharp Turn
Msg330402 Sudden Brake
Msg330403 Sudden Acceleration
Msg330404 Rollover
Msg330405 Speeding
Msg330406 Collision
Msg330501 Smoking

149
HikCentral Connect OpenAPI Developer Guide

Enumeration Value Description


Msg330502 Using Mobile Phone
Msg330503 Fatigue Driving
Msg330504 Distraction
Msg330505 Seatbelt Unbuckled
Msg330506 Video Tampering
Msg330507 Yawning
Msg330508 Wearing IR Interrupted Sunglasses
Msg330509 Absence

A.1.7 Capability Set

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.2 ISO 8601 Time Format Instruction


ISO 8601, Data Elements and Interchange Formats–Information Interchange–Representation of
Dates and Times, is an international standard covering the exchange of date and time-related data
format issued by ISO. An uppercase T should be added before an exact time to represent the
combination of date and time. Beijing time 5:30:08 PM May 3rd, 2004 can be written as
2004-05-03T17:30:08+08:00 or 20040503T173008+08.

A.3 Object Description

A.3.1 AccessLevel
The table here shows the access level information.

Parameter Name Req. or Opt. Data Type Description


accessLevelId Req. String Access level ID. The maximum length is
64.
accessLevelName Opt. String Access level name. The maximum length
is 64.

A.3.2 AddDeviceResponse
The table here shows the returned information of adding a device.

Parameter Name Req. or Opt. Data Type Description


taskId Opt. String Task ID, which consists
of up to 256
characters.
failed Req. Integer Number of failed
adding tasks, which

151
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


consists of up to 16
characters.
succeeded Req. Integer Number of successful
adding tasks, which
consists of up to 16
characters.
total Req. Integer Total number of adding
tasks, which consists of
up to 16 characters.
deviceList Opt. DeviceList [] Returned list of
successfully added
devices.
relatedVehicleInfo Opt. VehicleInfo(1) Returned vehicle
information.

A.3.3 AlarmCategory
The table here shows the alarm category information.

Parameter Name Req. or Data Type Description


Opt.
mainCategory Opt. String Alarm main category, which consists of up to 64
characters. See details in Alarm Category .
subCategory Opt. String Alarm sub category, which consists of up to 64
characters. See details in Alarm Category .

A.3.4 AlarmDeviceInfo
The table here shows the alarm device information.

Parameter Name Data Type Description


devID Integer Device ID.
devName String Device name.
devCategory String Device type.

152
HikCentral Connect OpenAPI Developer Guide

A.3.5 AlarmEventSource
The table here shows the information about alarm event source.

Parameter Name Data Type Description


eventType Integer Event type.
sourceID String Source ID.
sourceName String Source name.
sourceType String Source type.
areaID String Area ID.
areaName String Area name.
deviceInfo AlarmDeviceInfo Alarm device details.

A.3.6 AlarmFile
The table here shows the details about an alarm file .

Parameter Name Data Type Description


type String File format: 1-picture, 2-video.
URL String URL of an alarm file (valid for 15 minutes).
saveState String Saving status of an alarm file: 0-saving
succeeded, 1-to be uploaded, 2-saving in
process, 3-saving failed, 4-capturing in process,
5-capturing failed.
generationMode String Generation mode of an alarm file: "1" (upload
alarms), "2" (capture picture by event linkage).
encrypted String Encryption status of an alarm file: "0"
(unencrypted), "1" (encrypted).
extendInfo AlarmFileExtendInfo Extended information of an alarm file.

A.3.7 AlarmFileExtendInfo
The table here shows the extended information of an alarm file.

153
HikCentral Connect OpenAPI Developer Guide

Parameter Name Data Type Description


sourceID String Source ID of an alarm file.
sourceName String Source name of an alarm file.
sourceType String Source type of an alarm file.
captureIndex String Captured picture type: "1" (take pictures before an event occurs),
"2" (take pictures when an event occurs), "3" (take pictures after an
event occurs).

A.3.8 AlarmFileInfo
The table here shows the alarm file information.

Parameter Name Data Type Description


fileContent String File content: "1"-picture included, "2"-video
included, "1,2"-both included.
file AlarmFile [] Alarm file.

A.3.9 AlarmInfo
The table here shows the alarm information.

Parameter Name Data Type Description


id String Camera ID.
name String Camera name.
online String Online status.
area Area Area information.
device DeviceByResource Device information.

A.3.10 AlarmInputChannel
The table here shows the information of an alarm input channel.

154
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


id Opt. String ID.
name Opt. String Name.
no Opt. String Channel No.
online Opt. String Online status.
area Opt. Object Area information. See details in Area .

A.3.11 AlarmInputInfo
The table here shows the alarm input information.

Parameter Name Req. or Opt. Data Type Description


id Req. String Physical resource ID of alarm input.
status Req. Integer Status: 0-unknown, 1-​activated, 2-not activated.
errorCode Req. String Error code.

A.3.12 AlarmLinkageConfig
The table here shows the information of the alarm linkage.

Parameter Name Data Type Description


linkCamera LinkCamera Linked camera.
linkAlarmOutput LinkAlarmOutput Linked alarm output.

A.3.13 AlarmLinkage
The table here shows the information returned from alarm linkage rule operation.

Parameter Name Data Type Description


itemID String Alarm linkage ID.
alarmRuleID String Alarm rule ID.

155
HikCentral Connect OpenAPI Developer Guide

Parameter Name Data Type Description


linkageType String Linkage type.
errorCode String Error code.

A.3.14 AlarmMsg
The table here shows the information of an alarm event..

Parameter Name Data Type Description


guid String GUID.
dataRetransmission Integer Whether it is real-​time alarm: 0-alarm uploaded via
ANR, 1-alarm uploaded in real-​time.
msgType String Alarm message type: "0" (end message), "1" (start
message, or pulse, repeated GUID means pulse), "2"
(confirm message), "3" (mark message).
alarmState String Whether the alarm is in start status: "1" (start), "0"
(end).
pulseAlarm String Whether the alarm is pulse alarm: "0" (non-pulse
alarm), "1" (pulse alarm).
alarmMainCategory String Alarm main category.
alarmSubCategory String Alarm sub category.
timeInfo AlarmTimeInfo Alarm time.
eventSource AlarmEventSource Alarm event source.
alarmRule AlarmRule Alarm rule.
alarmPriority AlarmPriority Alarm priority.
markState String Whether the alarm is tagged: "0" (untagged), "1"
(tagged).
affirmedState String Whether the alarm is acknowledged: "0"
(unacknowledged), "1" (acknowledged).
fileInfo AlarmFileInfo Alarm file details.
linkageType String[] Linkage type: "0"-recording linkage, "1"-GIS map
linkage, "2"-alarm output linkage, "3"-pop-up window
linkage, "4"-door linkage.

156
HikCentral Connect OpenAPI Developer Guide

Parameter Name Data Type Description


linkageConfig AlarmLinkageConfig Linkage configuration.
vehicleRelatedInfo VehicleRelatedInfo Linked vehicle information.
queueRelatedInfo QueueRelatedInfo Queuing-alarm related information.

A.3.15 AlarmOutputChannel
The table here shows the information of an alarm output channel.

Parameter Name Req. or Opt. Data Type Description


id Opt. String ID.
name Opt. String Name.
no Opt. String Channel No.
online Opt. String Online status.
area Opt. Object Area information. See details in Area .

A.3.16 AlarmOutputOperation
The table here shows information of alarm output control.

Parameter Name Data Type Description


alarmOutputID String Alarm output ID.
alarmOutputState String Alarm output status.
errorCode String Error code.

A.3.17 AlarmOutputState
The table here shows information about alarm output state.

157
HikCentral Connect OpenAPI Developer Guide

Parameter Name Data Type Description


id String Alarm output ID.
status Integer Alarm output status: 0 (closed), 1 (open).
errorCode String Error code.

A.3.18 Alarmpriorities
The table here shows the details of an alarm priority.

Parameter Name Data Type Description


ID String Alarm priority ID.
level String Alarm priority level, which contains level 1 (the highest level), 2,
and 3.
levelName String Priority level name.
color String Alarm priority level color, which is the value of RGB, for example:
#F40B0B.
audioName String Alarm audio name.
audioURL String Alarm audio URL.

A.3.19 AlarmPriority
The table here shows the information displayed in an alarm priority list.

Parameter Name Data Type Description


ID String Alarm priority ID.
level String Alarm priority level, which contains level 1 (the highest level), 2,
and 3.
levelName String Alarm priority name.
color String Alarm priority level color, which is the value of RGB, for example:
#F40B0B.

158
HikCentral Connect OpenAPI Developer Guide

A.3.20 AlarmResourceInfo
The table here shows the alarm resource information.

Parameter Name Req. or Opt. Data Type Description


ID Req. String Resource ID, which consists of up to 32 characters.
name Opt. String Resource name, which consists of up to 64
characters.
areaID Opt. String Area ID, which consists of up to 32 characters.
areaName Opt. String Area name, which consists of up to 32 characters.

A.3.21 AlarmRuleDetail
The table here shows the details of an alarm rule.

Parameter Name Data Type Description


ID String Alarm rule ID.
name String Alarm rule name.
description String Alarm rule description.
color String Alarm rule color.
enable String Whether to enable alarm rule: "0" (disable), "1" (enable).
state String Alarm rule status: "0" (normal), "1" (exception).
alarmMainCategory String Aalrm main category.
alarmSubCategory String Alarm sub category.
notification Notification Notification configuration.
schedule Schedule Alarm schedule template.
priority Priority Alarm priority.
ignoreRecurring IgnoreRecurring Auto-close alarming window.
eventSource EventSource Event source.

159
HikCentral Connect OpenAPI Developer Guide

A.3.22 AlarmRuleOperation
The table here shows the information returned from alarm rule operation.

Parameter Name Data Type Description


id String Alarm rule ID.
name String Alarm rule name
errorCode String Error code, only returned for the operation of adding alarm rules,
and not for the operation of updating alarm rules.

A.3.23 AlarmRule
The table here shows the information about alarm rules.

Parameter Name Data Type Description


id String Alarm rule ID.
name String Alarm rule name.
description String Alarm rule details.

A.3.24 AlarmTimeInfo
The table here shows the alarm time information.

Parameter Data Description


Name Type
startTime String Alarm start time (refers to device local time), which is in ISO 8601
standard time format (see details in ISO 8601 Time Format
Instruction ), e.g., "2021-12-12T12:12:12+08:00".
endTime String Alarm end time (refers to device local time), which is in ISO 8601
standard time format (see details in ISO 8601 Time Format
Instruction ), e.g., "2021-12-12T12:12:12+08:00".

160
HikCentral Connect OpenAPI Developer Guide

A.3.25 Area
The table here shows the information of an area.

Parameter Name Req. or Opt. Data Type Description


id Opt. String Area ID.
name Opt. String Area name.

A.3.26 AreaBrief
The table here shows the area information.

Parameter Name Data Type Description


areaId String Area ID.

A.3.27 Attachment
The table here shows the attachment information.

Parameter Name Data Type Description


url String Attachment (pictures/videos) URL (valid for 15 minutes).

A.3.28 BasicInfo
The table here shows event's basic information.

Parameter Name Data Type Description


occurrenceTime String Event time in ISO 8601 format. For example, 2021-08-
01T12:30:00+08:30.
msgType String Event type.
resource Resource Resource information.
device DeviceBrief Device information.

161
HikCentral Connect OpenAPI Developer Guide

A.3.29 BriefArea
The table here shows the information of an area.

Parameter Name Req. or Opt. Data Type Description


id Req. String Area ID.
name Req. String Area name.
parentAreaID Opt. String Parent area ID.
existSubArea Req. Integer Whether there are sub areas in the current area: 0
(no), 1 (yes).
areaPath Req. String Detailed path starting from the origin area to the
current area (e.g., root->a->b).

A.3.30 Building
The table here shows the building information.

Parameter Name Req. or Opt. Data Type Description


buildId Req. String Building ID. The maximum length is
64.
buildName Req. String Building name.
areaId Req. String Area ID.
areaName Req. String Area name.
totalRoom Req. Integer Total number of rooms.
totalPerson Req. Integer Total number of residents.
deviceNames Opt. String Device name(s). Use comma to
separate multiple items.

A.3.31 BuildingSearchCriteria
The table here shows the building search conditions.

162
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


areaId Req. String Area ID: -1 (root area). The maximum
length is 64.
isContainSubArea Opt. Integer Whether the child areas are included:
0 (no), 1 (yes). The child areas are not
included by default.
filterName Opt. String Building name.

A.3.32 CameraChannel
The table here shows information of a camera channel.

Parameter Name Req. or Opt. Data Type Description


id Opt. String Channel ID.
name Opt. String Name.
no Opt. String Channel No.
online Opt. String Online status.
area Opt. Object Area information. See details in Area .

A.3.33 CameraInfo
The table here shows the camera information.

Parameter Name Data Type Description


id String Camera ID.
name String Camera name.
abilitySet String The capability set of the camera. See details of specific
values in Capability Set .
online String Online status: "1"-online, "0"-​offline.
area Area Area information.
device DeviceByResource Device information.

163
HikCentral Connect OpenAPI Developer Guide

A.3.34 ChannelInfo
The table here shows the channel information.

Parameter Name Data Type Description


id String Channel ID.
no String Channel No.

A.3.35 CloudStorage
The table here shows the overview of the cloud storage service.

Parameter Name Data Type Description


category Integer Cloud storage type: 1 (cloud storage via NVR), 2 (Hik-ProConnect
box).
no Integer Channel No.
sn String Device serial No.

A.3.36 CloudStorageInfo
The table here shows the information of the cloud storage service.

Parameter Name Req. or Opt. Data Type Description


usingAmountFor7Days Opt. String Channel number of 7-day cloud storage
service.
usingAmountFor30Days Opt. String Channel number of 30-day cloud storage
service.
remainingAmount Opt. String Channel number of the remaining cloud
storage service.

A.3.37 CloudStorageDetail
The table here shows the details of the cloud storage service.

164
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


storageType Opt. String Cloud storage type: "7Days" (7-day cloud storage
service), "30Days" (30-day cloud storage service).
purchaseAmount Opt. String Channel number of the purchased cloud storage
service, unit: day.

A.3.38 DataBean
The table here shows the event's extended information.

Parameter Name Req. or Opt. Data Type Description


deviceTalkInfo Opt. DeviceTalkInfo Video intercom event (140001)
details.
vehicleRelatedInfo Opt. VehicleRelatedInfo On-board monitoring event
details.

A.3.39 Device
The table here shows the information of a device.

Parameter Name Req. or Opt. Data Type Description


id Req. String Device ID.
name Req. String Device name.
category Opt. String Device type.
type Opt. String Device model.
serialNo Opt. String Device serial No.
version Opt. String Firmware version.
timeZone Opt. String Time zone No.
onlineStatus Opt. Integer Network status: 0 (offline), 1 (online), 2 (unknown).
addTime Opt. String Added time.

165
HikCentral Connect OpenAPI Developer Guide

A.3.40 DeviceBaseInfo
The table here shows basic information about the device.

Parameter Name Req. or Opt. Data Type Description


id Opt. String Device ID.
name Opt. String Device name.
category Opt. String Device type.
serialNo Opt. String Device serial No. (short
serial No.).
version Opt. String Device firmware
version.
type Opt. String Device model.
streamEncryptEnable Opt. Integer Whether to enable
encryption of stream.
availableCameraChann Opt. Integer Number of available
elNum camera channels.
availableAlarmInputCh Opt. Integer Number of available
annelNum alarm input channels.
availableAlarmOutput Opt. Integer Number of available
ChannelNum alarm output channels.

A.3.41 DeviceBrief
The table here shows the device information.

Parameter Name Data Type Description


id String Device ID.
name String Device name.
category Object Device category.
device Object Device information.

166
HikCentral Connect OpenAPI Developer Guide

A.3.42 DeviceByResource
The table here shows the information about the device.

Parameter Name Data Type Description


devInfo DevInfo Device details.
.
channelInfo ChannelInfo Channel details.

A.3.43 DeviceInfo
The table here shows the device information.

Parameter Name Req. or Opt. Data Type Description


name Req. String Device name, which consists of up to 64 characters.
ezvizSerialNo Req. String Serial No., which consists of up to 30 characters.
ezvizVerifyCode Req. String Verification code, which consists of up to 30
characters.
userName Opt. String User name, which consists of up to 32 characters.
password Opt. String Password, which consists of up to 16 characters.

A.3.44 DeviceInfo (2)


The table here shows the device information.

Parameter Name Req. or Opt. Data Type Description


name Req. String Device name, which consists of up to 32 characters.
id Req. String Device ID, which consists of up to 32 characters.
userName Opt. String User name, which consists of up to 32 characters.
password Opt. String Password, which consists of up to 16 characters.

167
HikCentral Connect OpenAPI Developer Guide

A.3.45 DeviceList
The table here shows the returned results of adding a device.

Parameter Name Req. or Opt. Data Type Description


alias Req. String Device alias, which consists of up to 32 characters.
deviceId Req. String Device ID, which consists of up to 32 characters.
deviceSerial Req. String Device serial No., which consists of up to 30
characters.
errorCode Opt. String Error code, which consists of up to 16 characters.

A.3.46 DeviceTalkInfo
The table here shows the video intercom event details.

Parameter Name Req. or Opt. Data Type Description


userId Req. String User ID (resident that is called by the
video intercom device).
deviceSerial Opt. String Device serial No.
deviceName Opt. String Device name.
deviceId Opt. String Device ID.
msgId Opt. String Call record ID.
msgType Req. Integer Call record type: 0 ( pushed call), 1 (call
answered by others), 2 (call hung up by
the device), 3 (call canceled by the device
because no one answers). When the
value is not 0, only msgId, userId, and
msgType are returned.
doorInfos Opt. DoorInfo [] Door information.

A.3.47 DevInfo
The table here shows the device details.

168
HikCentral Connect OpenAPI Developer Guide

Parameter Name Data Type Description


id String Device ID.
category String Device main type.
serialNo String Device serial No.

A.3.48 DoorChannel
The table here shows the information of a door channel.

Parameter Name Req. or Opt. Data Type Description


id Opt. String ID.
name Opt. String Name.
no Opt. String Channel No.
online Opt. String Online status.
area Opt. Object Area information. See details in Area .

A.3.49 DoorInfo
The table here shows the door information.

Parameter Name Req. or Opt. Data Type Description


doorId Req. String Door ID.
doorName Req. String Door name.

A.3.50 Event
The table here shows the event information.

169
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


uuid Opt. String UUID of on-board monitoring
messages.
update Opt. Boolean Whether it is updated information:
true-yes (added pictures/videos
comparing to the previous upload),
false-no.
basicInfo Req. BasicInfo Basic information.
picture Opt. Attachment [] Picture information.
video Opt. Attachment [] Video information.
data Opt. DataBean Extended information.

A.3.51 EventSource
The table here shows the event source information.

Parameter Name Req. or Data Type Description


Opt.
eventType Opt. String Event type, which consists of up to 64 characters.
sourceID Opt. String Alarm source ID, which consists of up to 64
characters.
sourceType Opt. String Alarm source type, which consists of up to 64
characters. See details in Alarm Source .
sourceName Opt. String Alarm source name, which consists of up to 64
characters.

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

Parameter Name Req. or Opt. Data Type Description


buildName Req. String Building name, for identifying the rooms
with limit-reached number of persons.
roomNum Req. Integer Room No.
roomName Req. String Room name.
errorCode Req. String Error code (VMS038005 supported only
currently).

A.3.53 GetDeviceInfo
The table here shows the returned information of device details.

Parameter Name Req. or Data Type Description


Opt.
baseInfo Opt. Object Device information. See details in
DeviceBaseInfo .
cameraChannel Opt. CameraChannel [] Camera list.
alarmInputChannel Opt. AlarmInputChannel [] Alarm input list.
alarmOutputChannel Opt. AlarmOutputChannel [] Alarm output list.
doorChannel Opt. DoorChannel [] List of doors.
relatedVehicleInfo Opt. VehicleInfo(1) Information of the linked vehicle.
onlineStatus Opt. Integer Device online status, which consists
of 1 character.
timeZoneID Opt. String Time zone ID, which consists of up to
8 characters.

A.3.54 GetDevicesResVo
The table here shows the device list structure.

Parameter Name Req. or Opt. Data Type Description


totalCount Opt. Integer Total number of pages.
pageIndex Opt. Integer Current page No.

171
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


pageSize Opt. Integer Number of items per page.
device Opt. Device [] Information of device list.

A.3.55 GPSInfo
The table here shows the GPS information.

Parameter Name Req. or Opt. Data Type Description


ew Req. String E-east longitude, W-west longitude.
lng Req. String Longitude (e.g., 120.218048) (unit:
degree).
ns Req. String N-north latitude, S-south latitude.
lat Req. String Latitude (unit: degree).
direction Req. Integer Direction (unit: degree, calculated
clockwise from due north (0)).
height Opt. Integer Height (unit: cm)
speed Req. Integer Speed (cm/h).

A.3.56 IgnoreRecurring
The table here shows the information of an auto-closing alarming window.

Parameter Name Req. or Opt. Data Type Description


enable Req. String Whether to enable auto-close alarming window: 0
(disable), 1 (enable), which consists of up to 1
character.
timeValue Opt. String Time, which consists of up to 16 characters.

A.3.57 ImportToArea
The table here shows whether to import to area automatically.

172
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Data Type Description


Name Opt.
enable Opt. Intger Whether to import device resources to area (channel,
alarm input, and alarm output) automatically: 0 (no), 1
(yes). And the field consists of 1 character.
areaID Opt. String When area ID is empty, the area will be created according
to device name. And the field consists of up to 32
characters.

A.3.58 LinkageAlarmOutput
The table here shows the information of an alarm output linked to an alarm.

Parameter Name Req. or Data Type Description


Opt.
autoClose Opt. Integer Types of closing alarm window : 0 (manually
closing alarm window), 1 (automatically
closing alarm window), which consists of up
to 1 character.
autoCloseTime Opt. Integer The time of auto-closing alarm window,
which consists of up to 16 characters.
camera / AlarmResourceInfo [] Alarm resource parameters.

A.3.59 LinkageCamera
The table here shows the information of an linked camera .

Parameter Name Req. or Data Type Description


Opt.
preRecordTime Opt. String Pre-record time, which consists of up to 64
characters.
postRecordTime Opt. String Post-record time, which consists of up to 64
characters.
camera Opt. AlarmResourceInfo [] Alarm resource information.

173
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Data Type Description


Opt.
relateType Req. Integer Linked alarm type: 1 (link to the
corresponding camera), 2 (link to another
camera); this node consists of up to 16
characters.
selfRelated Opt. SelfRelated Related storage information.

A.3.60 LinkageConfig
The table here shows the alarm linkage information.

Parameter Name Data Type Description


linkCamera LinkageCamera Camera linked to the alarm.
linkCapturePicture LinkCapturePicture Captured pictures linked to the alarm.
linkEmail LinkEmail Email linked to the alarm.
linkAlarmOutput LinkageAlarmOutput Alarm outputs linked to the alarm.

A.3.61 LinkageItem
The table here shows the linkage of an alarm.

Parameter Name Req. or Opt. Data Type Description


linkageType Opt. String Linkage type, which consists of up to 64
characters.
linkageConfig / LinkageConfig Linkage configuration.

A.3.62 LinkAlarmOutput
The table here shows the linked alarm output.

174
HikCentral Connect OpenAPI Developer Guide

Parameter Name Data Type Description


alarmOutput AlarmResourceInfo [] Alarm resource information.

A.3.63 LinkCamera
The table here shows the information of an linked camera.

Parameter Name Data Type Description


preRecordTime String Pre-record time.
postRecordTime String Post-record time.
camera AlarmResourceInfo [] Alarm resource information.

A.3.64 LinkCapturePicture
The table here shows the information of an captured picture linked to an alarm.

Parameter Name Req. or Data Type Description


Opt.
captureInterval Opt. Integer Capture interval, unit: second, which
consists of up to 16 characters.
captureMode Opt. String Capture mode: "1" (capture the picture
when the event occurs), "2" (capture each
picture before, when, and after the event
occurs, and ), which consists of up to 1
character.
camera Opt. AlarmResourceInfo [] Alarm resource information.

A.3.65 LinkEmail
The table here shows the information of an email template linked to an alarm.

175
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


emailTemplateId Opt. String Email template ID, which consists of up to 64
characters.
emailTemplateName Opt. String Email template name, which consists of up to 64
characters.

A.3.66 LocalStorage
The table here shows the local storage information.

Parameter Name Data Type Description


recordingStreamType Integer Record stream type.
scheduleTemplateId String Template ID of local storage schedule.
preRecord Integer Whether to enable pre-record: 0 (disable), 1 (enable).
postRecordTime Integer Post-record time, unit: second.
anr Integer Whether to enable ANR: 0 (disable), 1 (enable).
storageTime Integer Storage retention period of records, unite: day. If the value "-
1" is returned, it means the records have no limited storage
retention period.

A.3.67 Notification
The table here shows the information of an alarm notification.

Parameter Name Req. or Opt. Data Type Description


enable Req. Integer Whether to enable notification: 0 (disable), 1
(enable).
recipients Recipients [] User list for receiving notifications.
/

A.3.68 PackageDetails
The table here shows the details of a service package.

176
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


servicePackage Opt. [] Details of a service package.

A.3.69 PackageOverview
The table here shows the overview of the service package.

Parameter Name Req. or Opt. Data Type Description


servicePackageOverview Opt. ServicePackageOverview [] Service package overview.

A.3.70 Person
The table here shows the person information.

Parameter Name Req. or Opt. Data Type Description


personId Req. String Person ID.
firstName Req. String Person's first name.
lastName Req. String Person's last name.
phone Req. String Phone No.
email Req. String Email.
isExpired Req. String Status: 0 (normal), 1 (expired).
photoUrl Req. String URL of the face picture to be applied to
the device.
headPicUrl Req. String URL of the profile photo.
roomList Req. RoomDTO [] Resident's room information.

A.3.71 PersonDTO
The table here shows the resident basic information.

177
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


id Opt. String Person ID, not required
for adding new
residents and required
for selecting existing
residents.
personCode Opt. String Person code.

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.

groupId Opt. String Department ID, for


adding or updating
person information.
firstName Req. String Person's first name.
The maximum length is
128.
lastName Req. String Person's last name.
The maximum length is
128.
gender Req. Integer Gender: 0 (female), 1
(male), 2 (unknown).
phone Opt. String Phone No.
email Req. String Email.
description Opt. String Remark.

178
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


startDate Req. String Start time of effective
period in ISO 8601
time format.
endDate Req. String End time of effective
period in ISO 8601
time format.

A.3.72 PersonGroup
The table here shows the department information.

Parameter Name Data Type Description


groupId String Department ID.
groupName String Department name.
parentId String Root department ID.
childNodeExist Boolean Whether child departments exist.
permissionState Boolean Permission: 0 (no permission), 1 (with permission).
description String Description.
areaList AreaBrief [] Area ID list.
groupFullPath String Full path.

A.3.73 Priority
The table here shows the alarm priority information.

Parameter Req. or Data Type Description


Name Opt.
ID Req. String Alarm priority ID, which consists of up to 64 characters.
level Opt. String Alarm priority level, which contains level 1 (the highest
level), 2, and 3. It consists of up to 64 characters.

179
HikCentral Connect OpenAPI Developer Guide

Parameter Req. or Data Type Description


Name Opt.
levelName Opt. String Level name, which consists of up to 64 characters.
color Opt. String Alarm priority level color, which is the value of RGB, for
example: #F40B0B. It consists of up to 64 characters.

A.3.74 QueueInfo
The table here shows the information of leaving queue detection alarms.

Parameter Name Req. or Opt. Data Type Description


regionID Opt. String Queuing area ID.
regionName Opt. String Queuing area name.
queueThreshold Opt. Integer Queuing time threshold.
peopleTargetId Opt. Integer Target persons whose queuing time has
exceeded the alarm threshold.
waitTime Opt. Long The actual waiting duration for the person
(unit: second).
startTime Opt. String Queuing start time in ISO 8601 format,
which is represented by "yyyy-MM-
ddTHH:mm:ss+current time zone", e.g.,
"2018-07-26T15:00:00+08:00".
endTime Opt. String Queuing end time in ISO 8601 format,
which is represented by "yyyy-MM-
ddTHH:mm:ss+current time zone", e.g.,
"2018-07-26T15:00:00+08:00".

A.3.75 QueueRelatedInfo
The table here shows the specific queuing-related alarms.

Parameter Name Req. or Opt. Data Type Description


queueInfo Opt. QueueInfo Leaving queue detection alarms.

180
HikCentral Connect OpenAPI Developer Guide

A.3.76 ReceivingSchedule
The table here shows the information of an arming schedule template.

Parameter Name Data Type Description


ID String ID of an arming schedule template.
name String Name of an arming schedule template name.
systemTemplate Integer Template type: 0 (custom template), 1 (default template).
timeSetting TimeSetting [] Time settings.

A.3.77 Recipients
The table here shows the recipient information.

Parameter Name Req. or Opt. Data Type Description


userID Opt. String User ID, which consists of up to 32
characters.
userName Opt. String User name, which consists of up to 64
characters.

A.3.78 RecordSetting
The table here shows the record settings.

Parameter Name Data Type Description


cameraID String Camera ID.
enableLocalStorage Integer Whether to enable local recording schedule: 0 (disable), 1
(enable).
localStorage LocalStorage Local storage information.
enableCloudStorage Integer Whether to enable cloud storage schedule: 0 (disable), 1
(enable).
cloudStorage CloudStorage Cloud storage schedule.

181
HikCentral Connect OpenAPI Developer Guide

A.3.79 RemoteControl
The table here shows the operation of remote control.

Parameter Name Req. or Opt. Data Type Description


actionType Req. Integer Operation type: 1 (unlock door), 2 (lock
door), 3 (remain unlocked), 4 (remain
locked).
elementlist Opt. String[] Door ID list. All doors are included if this
node is empty.
direction Opt. Integer Direction: 0 (enter), 1 (exit). The default
value is 0.
areaId Opt. String Area ID. All areas are included if the value
is -1.
depthTraversal Opt. Integer Whether to include child areas or not: 1
(yes), 0 (no). The default value is 0.

A.3.80 RemoteControlResponse
The table here shows the results of door control.

Parameter Name Req. or Opt. Data Type Description


elementId Req. String Door ID.
elementName Req. String Door name.
areaId Req. String Area ID.
areaName Req. String Area name.
errorCode Req. String Error code.

A.3.81 ResidentFilter
The table here shows the detailed conditions for resident search.

182
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


name Opt. String Resident name.
roomNum Opt. Integer Room No.
email Opt. String Email.
phone Opt. String Phone No.
type Opt. Integer Resident type: 1 (householder), 0 (family
member).
isExpired Opt. Integer Status: 0 (normal), 1 (expired). Residents
of all status are included if this node is
empty.

A.3.82 ResidentSearchRequest
The table here shows the resident search conditions.

Parameter Name Req. or Opt. Data Type Description


areaId Req. String Area ID: -1 (root area). The maximum
length is 64.
buildId Opt. String Building ID. The maximum length is
64.
isContainSubArea Opt. Integer Whether the child areas are included:
0 (no), 1 (yes). The child areas are not
included by default.
filter Opt. ResidentFilter Detailed search conditions.

A.3.83 Resource
The table here shows the resource information.

Parameter Name Data Type Description


type String Resource type.
id String Resource ID.
name String Resource name.

183
HikCentral Connect OpenAPI Developer Guide

Parameter Name Data Type Description


areaID String Area ID.
areaName String Area name.

A.3.84 ResourceAddResult
The table here shows the information about an area.

Parameter Name Data Type Description


id String Resource ID.
name String Resource name.
resourceType String Resource type. See details in
Resource Type , e.g., "camera",
"alarmInput" (alarm input),
"alarmOutput" (alarm output).
channelID String Device channel ID.
errorCode String Error code: "0" (succeeded),
other codes (failed). See details
in Status and Error Code .

A.3.85 RoomDTO
The table here shows the room information.

Parameter Name Req. or Opt. Data Type Description


roomId Req. String Room ID.
roomName Opt. String Room name, which is
required for searching
residents and is
optional for adding/
updating residents.
roomNum Opt. Integer Room No., which is
required for searching
residents and is

184
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


optional for adding/
updating residents.
buildId Req. String Building ID.
buildName Opt. Integer Building name, which
is required for
searching residents
and is optional for
adding/​updating
residents.
areaId Req. Integer Area ID.
areaName Opt. String Area name, which is
required for searching
residents and is
optional for adding/
updating residents.
accountType Req. Integer Resident type: 1
(householder), 0
(family member).

A.3.86 RoomFilter
The table here shows the detailed conditions for room search.

Parameter Name Req. or Opt. Data Type Description


roomNum Opt. Integer Room No.
roomName Opt. String Room name.
personAmount Opt. Integer Number of residents.
email Opt. String Email.
mainAccount Opt. String Householder name.

A.3.87 RoomSearchCriteria
The table here shows the room search conditions.

185
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


areaId Req. String Area ID: -1 (root area). The maximum
length is 64.
buildId Opt. String Building ID. The maximum length is 64.
isContainSubArea Opt. Integer Whether the child areas are included: 0
(no), 1 (yes). The child areas are not
included by default.
filter Opt. RoomFilter Detailed search conditions.

A.3.88 RoomVO
The table here shows the room information.

Parameter Name Req. or Opt. Data Type Description


roomId Req. String Room ID.
roomName Req. String Room name.
roomNum Req. Integer Room No.
buildId Req. String Building ID.
buildName Req. Integer Building name.
areaId Req. Integer Area ID.
areaName Req. String Area name.
personAmount Req. Integer The number of
residents.
mainAccount Req. String Householder name.
email Req. String Email.
phone Opt. String Phone No.

A.3.89 Schedule
The table here shows the information of an alarm schedule template.

186
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


timeSchedule Opt. TimeSchedule Alarm schedule template.
type Opt. String Schedule type, which consists of up to 64
characters.

A.3.90 SelfRelated
The table here shows the related information of an linked camera.

Parameter Name Req. or Opt. Data Type Description


storageType Opt. Integer Storage type, which consists of up to 16 characters.

A.3.91 ServicePackage
The table here shows the information of service(s) in a service package.

Parameter Name Req. or Data Type Description


Opt.
serviceType Opt. String Service type: "serviceVideo" (video
management service), "serviceVehicle" (on-
board monitoring service),
"serviceAlarmDetection" (alarm detection
service).
packageType Opt. String Service package type: "1" (free service
package), "2" (on-trial service package), "3"
(purchased service package), "4"
(complimentary service package).
purchaseAmount Opt. Integer Channel number of the purchased service(s).
activationTime Opt. String Activation time, which is in ISO 8601 standard
time format, see details in ISO 8601 Time
Format Instruction .
expiredTime Opt. String Expiry time, which is in ISO 8601 standard
time format, see details in ISO 8601 Time
Format Instruction .
cloudStorage Opt. CloudStorageDetail [] Details of the purchased cloud storage service.

187
HikCentral Connect OpenAPI Developer Guide

A.3.92 ServicePackageOverview
The table here shows the overview of the service(s) in a service package.

Parameter Name Data Type Description


serviceType String Service type: "serviceVideo" (video management service),
"serviceVehicle" (on-board monitoring service),
"serviceAlarmDetection" (alarm detection service).
packageType String Service package type: "1" (free service package), "2" (on-
trial service package), "3" (purchased service package), "4"
(complimentary service package).
usingAmount String Channel number of the in-using service(s).
remainingAmount String Channel number of the remaining service(s).
totalAmount String Channel number of the purchased service(s).
lastExpiredTime String Expiry time of the latest service.
packageStatus Integer Status of the service package: 0 (normal), 1 (exceeded
limit), 2 (to be expired), 3 (expired).
cloudStorage CloudStorageInfo Cloud storage service of the video management service
package.

A.3.93 TempAuth
The table here shows the temporary pass information.

Parameter Name Req. or Opt. Data Type Description


id Req. String Temporary pass ID.
openCount Req. Integer Allowed passes for
each door.
name Req. String Temporary pass name.
startTime Req. Long Start time (millisecond
value). For example,
1672370265000.
endTime Req. Long End time (millisecond
value). For example,
1672370265000.

188
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


creatorId Req. String Creator ID.
creatorName Req. String Creator name.
creatorEmail Req. String Creator email.
expiredStatus Req. Integer Status: 1 (expired), 0
(normal).
password Req. String Password for opening
the door.

A.3.94 TempAuthFilter
The table here shows the detailed conditions for temporary pass search.

Parameter Name Req. or Opt. Data Type Description


name Req. String Temporary pass name
or creator name for
fuzzy search. The
maximum length is 64.

A.3.95 TempAuthSearchRequest
The table here shows the temporary pass search conditions.

Parameter Name Req. or Opt. Data Type Description


filter Opt. TempAuthFilter 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

Parameter Req. or Data Type Description


Name Opt.
beginTime Req. String Start time, which is represented by "yyyy-MM-dd
HH:mm:ss", e.g., "2018-07-26 15:00:00".
endTime Req. String End time, which is represented by "yyyy-MM-dd
HH:mm:ss", e.g., "2018-07-26 15:00:00".

A.3.97 TimeSchedule
The table here shows the details of an alarm schedule template.

Parameter Name Req. or Opt. Data Type Description


ID Opt. String ID of an alarm schedule template, which consists of
up to 32 characters.
Name Opt. String Name of an alarm schedule template, which consists
of up to 64 characters.

A.3.98 TimeSetting
The table here shows the time information of an arming schedule template.

Parameter Name Data Type Description


dayOfWeek String Day of a week.
timeSpan TimeSpan [] Time range.

A.3.99 TimeSpan
The table here shows the time range of an arming schedule template.

Parameter Name Data Type Description


beginTime String Start time.
endTime String End time.

190
HikCentral Connect OpenAPI Developer Guide

A.3.100 TimeZone
The table here shows information about time zone.

Parameter Name Req. or Opt. Data Type Description


id Req. String Time zone ID, which
consists of up to 8
characters.
applyToDevice Req. String Whether to apply to
device: "0" (not apply
to device), "1" (apply
to device). And the
field consists of 1
character.

A.3.101 TimeZoneInfo
The table here shows the information about time zone.

Parameter Name Data Type Description


id String ID.
standardName String Standard time zone name.
displayName String Displayed time zone name.
bias Integer Time difference with GMT, unit: minute.
dst TimeZoneDst DST settings.

A.3.102 TimeZoneDst
The table here shows time zone DST settings.

Parameter Name Data Type Description


daylightBias String Time difference with DST, unit:
minute.
daylightDate String DST start time.

191
HikCentral Connect OpenAPI Developer Guide

Parameter Name Data Type Description


standardDate String Standard time, which is the end
time of DST.
enable Integer Whether to enable DST: 0 (no),
1 (yes).

A.3.103 User
The table here shows the user information.

Parameter Name Data Type Description


ID String User ID.
name String User name.

A.3.104 VehicleInfo(1)
The table here shows the vehicle information.

Parameter Req. or Opt. Data Type Description


id Opt. String Vehicle ID.
licensePlateNo Req. String License plate No.
vehicleType Req. Integer Vehicle type: 0-others, 1-car, 2-truck,
3-bus.
driverFirstName Opt. String Driver's first name.
driverLastName Opt. String Driver's last name.
driverPhoneNo Opt. String Driver's phone No.
pictureUrl Opt. String Vehicle picture URL.
extend Opt. String Annotations.
speedLimit Req. Integer Speed limit (cm/h).

192
HikCentral Connect OpenAPI Developer Guide

A.3.105 VehicleInfo(2)
The table here shows the vehicle information.

Parameter Name Req. or Opt. Data Type Description


licensePlateNo Req. String License plate No.
driverName Opt. String Driver's name.
driverPhone Opt. String Driver's phone No.
id Req. String Vehicle ID.
speedLimit Req. Integer Speed limit (cm/h).

A.3.106 VehicleInfo(3)
The table here shows the vehicle information.

Parameter Name Req. or Opt. Data Type Description


vehicleID Opt. (Req.) String Vehicle ID, the only required parameter to be entered
when you link on-board devices with existing
vehicles. If the vehicle ID is not empty, linking with
the existing vehicle will be prior to adding a new
vehicle.
licensePlateNo Opt. (Req.) String License plate No., required with the optional
parameters below for adding new vehicles to be
linked with on-board devices.
vehicleType Opt. Integer Vehicle type: 0-others, 1-car, 2-truck, 3-bus.
driverFirstName Opt. String Driver's first name.
driverLastName Opt. String Driver's last name.
driverPhoneNo Opt. String Driver's phone No.
pictureKey Opt. String Vehicle picture key.
extend Opt. String Annotations.

A.3.107 VehicleRelatedInfo
The table here shows the information of vehicles linked with on-board devices.

193
HikCentral Connect OpenAPI Developer Guide

Parameter Name Req. or Opt. Data Type Description


gpsInfo Opt. GPSInfo GPS-related information.
vehicleInfo Opt. VehicleInfo(2) Vehicle-related information.

A.4 Status and Error Code

Internal Errors

Error Code Error Description Debug Suggestion


CCF000004 Database operation failed. Check the database operation.
CCF000005 No permission to operate Check your permissions.
this resource.
CCF021103 Area name already exists. Modify the area name.
CCF021307 Device does not exist. Device does not exist.
CCF038052 Email address already exist Email address already exist.
(remote calling error code).
EVZ20002 Device does not exist. Incorrect device registration
region or the device does not
exist. Please enter the correct
device serial number.
EVZ20007 Device offline. Device offline. Please check its
network connection.
EVZ20008 Device response timed out. Device response timed out.
EVZ20010 Incorrect device verification Incorrect device verification code.
code. Please check the device
verification code and try again.
EVZ20013 The device has been added The device is already added to a
by another account. Hik-Connect account or another
Hik-ProConnect account.
EVZ20014 Incorrect device serial No. Incorrect device serial number.
Please check the device serial
number and try again.

194
HikCentral Connect OpenAPI Developer Guide

Error Code Error Description Debug Suggestion


EVZ20017 The device has been added The device has been added by
by yourself. yourself.
LAP000001 Parameter error. Check API parameters.
VMS000000 System error. /
VMS000001 Parameter error. Check API parameters.
VMS000003 No resource found or Check if resource exists.
resource does not exist.
VMS000004 Database operation failed. Check the database operation.
VMS000005 No permission to operate Apply for permission to operate
this resource. the resource.
VMS000007 Internal calling failed. Check the system environment.
VMS000008 Redis operation failed. Check if Redis is normal or check if
the request sent to Redis is
correct.
VMS000009 Concurrent requests Please try again later, or check if
(distributed lock is enabled). the distributed operations are
locked.
VMS001000 Gateway error. Please try again later, or check if
the gateway is normal.
VMS001001 Service instance Please try again later, or check if
unavailable. Service is the network is normal.
overloaded.
VMS003001 This email has been Please register with another email.
registered on the platform.
VMS003002 The user does not exist. Check if the user exists or apply
for a new user account.
VMS004004 Invalid role ID. Check the role ID.
VMS004005 No permission. Apply for the corresponding
permission.
VMS020007 Get information from Hik- Check if the device is offline or the
Connect. registration failed.
VMS021008 The device version is not Check the device version or
supported. change to another device.

195
HikCentral Connect OpenAPI Developer Guide

Error Code Error Description Debug Suggestion


VMS021102 The area already exists. Check if the area already exists.
VMS021103 The area name already Change the area name.
exits.
VMS021104 No more areas can be Delete some areas or cancel
added. adding areas.
VMS021105 Maximum area levels Switch the area level.
reached.
VMS021106 No more logical resources Delete some logical resources
can be added to the VMS from the VMS system or cancel
system. adding logical resources to the
VMS system.
VMS021107 No more logical resources Delete some logical resources
can be added to the area. from the area or cancel adding
logical resources to the area.
VMS021108 Duplicate license plate No. License plate No. already exists.
VMS021109 Device already linked with Device already linked with another
another vehicle. vehicle.
VMS021301 Adding the device... Please try again later.
VMS021302 The device has been added. Check if the device has been
added.
VMS021303 The device already exits in Check if the device already exists
the system. in the system.
VMS021305 The device name already Change the device name.
exists.
VMS021306 Adding the device timed Please try again later.
out.
VMS021307 The device does not exist. Check if the device exists.
VMS021308 Refreshing the device... Please try again later.
VMS021309 Incorrect device type. Check the device type.
VMS021311 No more devices can be Delete some devices or cancel
added. adding devices.
VMS021314 Device offline. Check if the device is online.

196
HikCentral Connect OpenAPI Developer Guide

Error Code Error Description Debug Suggestion


VMS021315 Invalid serial No. Check if the serial No. is valid.
VMS021316 The device belongs to Check if the device belongs to
another user. yourself.
VMS021337 Importing resource failed. Importing resource failed for
adding device.
VMS023001 Sending the email failed. Please try again later.
VMS023002 Duplicate color. Please try again later.
VMS023003 The priority name already Change the priority name.
exits.
VMS023004 The alarm category name Change the alarm category name.
already exists.
VMS023005 The email template name Change the email template name.
already exists.
VMS023006 The system email is not Configure the system email first.
configured.
VMS023007 Repeatedly acknowledging Check if the alarm is
the alarm. acknowledged.
VMS023008 The alarm configuration Check if the alarm configuration
already exists. already exists.
VMS038005 Number of persons in the Check if the number of persons in
room exceeds limit. the room exceeds the limit.
VMS038009 Adding person failed. This error message will be sent by
the person group when the
employee ID is not obtained by
the internal protocol.
VMS038011 Wrong person type added Check if a householder is added to
to the room. a room with an existing
householder or a family member
is added to a room without a
householder.
VMS038012 No permission for adding Check if the person who wants to
persons to the room. add persons is the householder.
VMS038014 Resident already in the The resident is already in the
room. room.

197
HikCentral Connect OpenAPI Developer Guide

Error Code Error Description Debug Suggestion


VMS038019 The calling record does not Check the calling record ID.
exist.
VMS038026 Email address already exists. Email address already exists.
VMS038027 Call answered. Call answered.
VMS038028 Resident does not exist. Resident does not exist.
VMS038029 Call from device canceled. Call from device canceled.

openAPI Errors

Error Code Error Description Debug Suggestion


OPEN000000 System internal errors. /
OPEN000001 The AK does not exist. Check if the AK is correct.
OPEN000002 Incorrect SK. Check if the SK is correct.
OPEN000003 The user does not exists. Check if the user exists.
OPEN000004 The system does not exist. Check if the system exists.
OPEN000005 Linking the HCC account with Check the parameters or try
the AK and SK failed. again later.
OPEN000006 Token expired. Please try again later.
OPEN000007 Token exception. Check if the token is correct.
OPEN000008 Parameter conversion Check the parameters.
exception.
OPEN000009 Network exception. Please try again later.
OPEN000010 Parameter verification Check the parameters.
exception.
OPEN000011 The requested resources are Check if the requested
not available yet. resources are available.
OPEN000012 The message submission ID Check the submission ID or try
(batchId) does not exist. again later.
OPEN000013 The alarm offset AK does not Check the alarm offset AK or
exist. try again later.

198
HikCentral Connect OpenAPI Developer Guide

Error Code Error Description Debug Suggestion


OPEN000014 Incorrect format of alarm Check the format of alarm
picture URL. picture URL or try again later.
OPEN000015 Alarm message conversion Please try again later.
failed.
OPEN000016 The alarm information is not Check if the alarm information
subscribed. is subscribed.
OPEN000017 Adding resource failed. Adding resource failed.
OPEN000018 Hik-Connect server error. Hik-Connect server error.
OPEN000019 Hik-Connect server response Hik-Connect server response
error. error.
OPEN000020 Saving file failed. Saving file failed.
OPEN000021 No permission for viewing the No permission for viewing the
resource resource
OPEN000022 No permission for managing No permission for managing
the source. the source.
OPEN000023 Reading Dynamo failed. Reading Dynamo failed.
OPEN000024 Number of resources for Reduce the number of
request exceeded limit. resources for request.
OPEN000025 Number of records on each The number of records on each
page exceeded limit. page should be from 1 to 500.
OPEN000026 Incorrect time format. The time should be
represented by "yyyy-MM-
ddTHH:mm:ss".
OPEN000027 The time range set for search The time range for search
exceeded limit. should be no more than a day.
OPEN000028 Area ID is empty. Enter an area ID.
OPEN000029 Incorrect request volume. Check the parameter
description.
OPEN000030 Start time of search is later Set the start time of search
than end time of search. earlier than the end time of
search.
OPEN000031 Area does not exist. Check if areaID is correct.

199
UD34138B

You might also like