Todas las colecciones
Para Desarrolladores
Para desarrolladores - API HikGateway Hikvision en curl
Para desarrolladores - API HikGateway Hikvision en curl

HikGateway

Xavier Guereque avatar
Escrito por Xavier Guereque
Actualizado hace más de una semana

API HikGateway

Dar click en el siguiente botón para descargar el HikGateway.

General > Lista de dispositivos

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/ContentMgmt/DeviceMgmt/deviceList?format=json' \
--header 'Content-Type: application/json' \
--data '{
"SearchDescription":
{
"position": 0,
"maxResult": 100
}
}'

General > Ver capacidades de dispositivo

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/System/capabilities?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED'

General > Suscribirse a eventos (todos)

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/Event/notification/subscribeDeviceMgmt?format=json' \
--header 'Content-Type: application/json' \
--data '{
"SubscribeDeviceMgmt":
{
"eventMode": "all",
"defenceMode":"all"
}
}'

General > Suscribirse a eventos (específico)

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/Event/notification/subscribeDeviceMgmt?format=json' \
--header 'Content-Type: application/json' \
--data '{
"SubscribeDeviceMgmt":
{
"eventMode": "device",
"DevEventList":
[{
"Dev":
{
"devIndex": "0CEDB969-7318-4D62-B81A-741C6709FAED",
"uploadMode": "all"
}
}],
"defenceMode":"all"
}
}'

Video Devices > Control PTZ > Iniciar

curl --digest -u admin:12345abc --location --request PUT 'http://192.168.0.100:8080/ISAPI/PTZCtrl/channels/1/continuous?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"PTZData":
{
"pan": 100,
"tilt": 100,
"zoom": 100
}
}'

Video Devices > Control PTZ > Llamar preset

curl --digest -u admin:12345abc --location --request PUT 'http://192.168.0.100:8080/ISAPI/PTZCtrl/channels/1/presets/3/goto?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--data ''

Video Devices > Grabaciones > Ver grabacion

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/System/streamMedia?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"StreamInfo": {
"id": "1",
"streamType": "main",
"method": "playback",
"PlayBackParams":
{
"startTime": "2022-12-13T02:10:07",
"endTime": "2022-12-14T20:10:07"
}

}
}'

Video Devices > Grabaciones > Descargar archivo de video

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/ContentMgmt/download?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"downloadRequest":
{
"playbackURI": "rtsp://18.116.174.91:554/dac/playback/camera/1333A9E0-A287-4C99-8696-1B2747E0E13C1/MAIN/TCP?starttime=20221213T021007Z&endtime=20221214T201007Z&streamform=rtp"
}
}'

Video Devices > Agregar dispositivo

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/ContentMgmt/DeviceMgmt/addDevice?format=json' \
--header 'Content-Type: application/json' \
--data '{
"DeviceInList":
[{
"Device":
{
"protocolType": "ehomeV5",
"EhomeParams":
{
"EhomeID":"1001",
"EhomeKey":"12345abc"
},
"devName": "DeepinMind",
"devType": "encodingDev"
}
}]
}'

Video Devices > Ver video en vivo

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/System/streamMedia?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"StreamInfo":
{
"id":"1",
"streamType":"main",
"method":"preview"
}
}'

Video Devices > Obtener calendario de grabaciones

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/ContentMgmt/record/tracks?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--data ''

Video Devices > Obtener archivos de grabaciones

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/ContentMgmt/search?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"CMSearchDescription": {
"searchID": "00000000-0000-0000-0000-000000000000",
"trackIDList": [
{
"trackID": 101
}
],
"timeSpanList": [
{
"timeSpan": {
"startTime": "2023-04-01T16:00:00Z",
"endTime": "2023-04-03T15:59:59Z"
}
}
],
"contentTypeList": [
{
"contentType": "video"
}
],
"maxResults": 40,
"searchResultPostion": 0,
"metadataList": [
{
"metadataDescriptor": " recordType.meta.hikvision.com/CMR"
}
]
}
}'

Access Control Devices > Huella > Ver capacidades

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/AccessControl/FingerPrintCfg/capabilities?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--data ''

Access Control Devices > Huella > Capturar huella

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/AccessControl/CaptureFingerPrint?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"CaptureFingerPrintCond":
{
"fingerNo": 1
}
}'

Access Control Devices > Huella > Registrar huella

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/AccessControl/FingerPrintDownload?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"FingerPrintCfg":
{
"employeeNo": "1596",
"enableCardReader": [1],
"fingerPrintID": 1,
"fingerType": "normalFP",
"fingerData": "MzAxInfZFiikG4o1FxjAk6FhFkiUIreJFcjVYb1tFmiYJ8mxFSjDPNQxFsiURNQNJhihrdiFFrioLPCxJui1m/JdJ4jslPWZFji+cNOdFUixTKcVFXjIW9hdFUicTeV9FUiQxOo5FVjAxfiBFWjUzv4FJoik2gn+FqjYe+Y1FOiMvBHGFFis0gwSJojE5fvhJgjVicmdFbjKUd4pJJh4twCmJVjQ1QuiF5iwfjxJJYjIc/UlJCixwQM6FAi5yiJiFMjQzSI6JkjYbiN6JUjY2QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVBMAAAsRALEDYdtOAIDYBTzcTjBRpBhRux9BY6ACIp0zAFFRBCdkUiHA7AetjVYRUZgMTDQRAbC9BkSLJHcxng1brlUAMu0OTc02ADBGCCyQThE1Fw/EUBsSELERzu8wIlBkEtrvajE8IwAbECUCIXMW5Rk8EWIwE3sMRQNEIyBu70JncDQZtwAAAAAAOoo="
}
}'

Access Control Devices > Huella > Obtener huella

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/AccessControl/FingerPrintUpload?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"FingerPrintCond":
{
"searchID": "1",
"employeeNo": "1596",
"fingerPrintID": 1
}
}'

Access Control Devices > Huella > Eliminar huella

curl --digest -u admin:12345abc --location --request PUT 'http://192.168.0.100:8080/ISAPI/AccessControl/FingerPrint/Delete?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"FingerPrintDelete":
{
"mode": "byEmployeeNo",
"EmployeeNoDetail":
{
"employeeNo": "1596"
}
}
}'

Access Control Devices > Rostro > Registrar rostro

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/Intelligent/FDLib/FaceDataRecord?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--form 'data="{
\"FaceInfo\":
{
\"employeeNo\": \"1596\",
\"faceLibType\": \"blackFD\"
}
}"' \
--form 'image=@"/Users/xavier/Downloads/xavier.jpg"'

Access Control Devices > Rostro > Eliminar rostro

curl --digest -u admin:12345abc --location --request PUT 'http://192.168.0.100:8080/ISAPI/Intelligent/FDLib/FDSearch/Delete?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"FaceInfoDelCond":
{
"faceLibType": "blackFD",
"EmployeeNoList" :
[{
"employeeNo": "100"
}]
}
}
'

Access Control Devices > Rostro > Obtener rostro usuario

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/Intelligent/FDLib/FDSearch?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"FaceInfoSearchCond":
{
"searchID": "1",
"searchResultPosition": 1,
"maxResults": 10,
"faceLibType": "blackFD",
"employeeNo": "1596"
}
}'

Access Control Devices > Tarjeta > Registrar tarjeta

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/AccessControl/CardInfo/Record?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"CardInfo" :
{
"employeeNo": "1596",
"cardNo": "123456789",
"cardType": "normalCard"
}
}'

Access Control Devices > Tarjeta > Consultar no. tarjeta por no. empleado

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/AccessControl/CardInfo/Search?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"CardInfoSearchCond":
{
"searchID":"0",
"searchResultPosition":0,
"maxResults":30,
"CardNoList":
[
{
"cardNo":"123456789"
}
]
}
}'

Access Control Devices > Tarjeta > Eliminar tarjeta

curl --digest -u admin:12345abc --location --request PUT 'http://192.168.0.100:8080/ISAPI/AccessControl/CardInfo/Delete?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"CardInfoDelCond":
{
"CardNoList":
[
{
"cardNo":"123456789"
}
]
}
}'

Access Control Devices > Usuario > Agregar usuario

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/AccessControl/UserInfo/Record?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"UserInfo": [
{
"employeeNo": "1596",
"name": "Xavier",
"Valid": {
"beginTime": "2017-01-01T00:00:00",
"endTime": "2027-12-31T23:59:59"
}
}
]
}'

Access Control Devices > Usuario > Eliminar usuario

curl --digest -u admin:12345abc --location --request PUT 'http://192.168.0.100:8080/ISAPI/AccessControl/UserInfoDetail/Delete?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"UserInfoDetail":
{
"mode": "byEmployeeNo",
"EmployeeNoList" :
[
{
"employeeNo": "1596"
}
]
}
}'

Access Control Devices > Usuario > Consultar usuarios

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/AccessControl/UserInfo/Search?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"UserInfoSearchCond":
{
"searchID":"0",
"searchResultPosition":0,
"maxResults":30
}
}
'

Access Control Devices > Eventos > Buscar historico

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/AccessControl/AcsEvent?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"AcsEventCond":
{
"searchID": "123",
"searchResultPosition": 0,
"maxResults": 30
}
}'

Access Control Devices > Agregar dispositivo

curl --digest -u admin:12345abc --location 'http://192.168.0.100:8080/ISAPI/ContentMgmt/DeviceMgmt/addDevice?format=json' \
--header 'Content-Type: application/json' \
--data '{
"DeviceInList":
[{
"Device":
{
"protocolType": "ehomeV5",
"EhomeParams":
{
"EhomeID":"1002",
"EhomeKey":"12345abc"
},
"devName": "DeepinMind",
"devType": "AccessControl"
}
}]
}'

Access Control Devices > Ejecutar relevador

curl --digest -u admin:12345abc --location --request PUT 'http://192.168.0.100:8080/ISAPI/AccessControl/RemoteControl/door/1?format=json&devIndex=0CEDB969-7318-4D62-B81A-741C6709FAED' \
--header 'Content-Type: application/json' \
--data '{
"RemoteControlDoor":
{
"cmd":"open"
}
}'
¿Ha quedado contestada tu pregunta?