HikVision DS-K1T804AMF - ISAPI AccessControl Event Retrieval Fails with "Invalid Content" Error

kurdking

n3wb
Jan 26, 2025
7
0
Iraq,Erbil
I'm attempting to retrieve access control events from a HikVision DS-K1T804AMF terminal using the ISAPI endpoint:


URL: Method: POSTAuthentication: Digest


Request Body:
JSON:
{
    "AcsEventCond": {
        "searchID": "12345678-1234-1234-1234-123456789012",
        "searchResultPosition": 0,
        "maxResults": 10,
        "major": 5
    }
}


Response:

JSON:
{
    "requestURL": "/ISAPI/AccessControl/AcsEvent?format=json",
    "statusCode": 6,
    "statusString": "Invalid Content",
    "subStatusCode": "badParameters",
    "errorCode": 1610612737,
    "errorMsg": "0x60000001"
}

I've tried multiple variations of the request body, but consistently receive an "Invalid Content" error.


Questions:


  • What could be causing the "Invalid Content" error?
  • Are there specific parameter requirements for this model's event retrieval?
  • Any known API quirks with the DS-K1T804AMF terminal?
Firmware is latest updated.

Your answer is really appreciated.
 
Try with starttime and endtime, perhaps it expects boundaries

{
"AcsEventCond": {
"searchID": "Search9",
"searchResultPosition": 0,
"maxResults": 30,
"major": 5,
"startTime":"2024-12-18T00:00:00+01:00",
"endTime":"2025-12-18T23:59:59+01:00"
}
}

Or check if your fw is too old. As i see here is from 24'

Firmware_V1.4.1_240318
 
Here my new request:

JSON:
{"AcsEventCond":{"searchID":"40e4ccc6-d819-4a57-b5fa-10591c9997d8","searchResultPosition":0,"maxResults":10,"major":5,"startTime":"2025-01-27T08:44:18\u002B00:00","endTime":"2025-01-28T08:44:18\u002B00:00"}}

but still getting the same, Invalid Content,bad parameter,
 
here is the capablitity for GetEvent:
JSON:
{
  "AcsEvent": {
    "AcsEventCond": {
      "searchID": {
        "@min": 1,
        "@max": 20
      },
      "searchResultPosition": {
        "@min": 0,
        "@max": 100000
      },
      "maxResults": {
        "@min": 1,
        "@max": 10
      },
      "major": {
        "@opt": "0,1,2,3,5"
      },
      "minorAlarm": {
        "@opt": "1028,1029,1034,1030,1031,1032,1033,1039,1040,1035,1036,1090"
      },
      "minorException": {
        "@opt": "39,1024,1031,1039,1040,1064,1065"
      },
      "minorOperation": {
        "@opt": "80,81,90,112,113,121,122,123,126,134,135,1024,1025,1026,1027,1028,1029,1030,1031,1034,1036,1038,1039,1049,1050,1055,1056,1057,1058"
      },
      "minorEvent": {
        "@opt": "1,9,6,7,8,19,20,21,22,23,24,25,26,27,28,29,30,31,32,38,39,49,119,151,152,153,154,155,162,164,168,169,170,171,172,173,174,175,176,177,178,181"
      },
      "startTime": {
        "@min": 1,
        "@max": 25
      },
      "endTime": {
        "@min": 1,
        "@max": 25
      },
      "cardNo": {
        "@min": 1,
        "@max": 20
      },
      "beginSerialNo": {
        "@min": 1,
        "@max": 3000000000
      },
      "endSerialNo": {
        "@min": 1,
        "@max": 3000000000
      },
      "employeeNoString": {
        "@min": 1,
        "@max": 8
      },
      "eventAttribute": {
        "@opt": "attendance,other"
      }
    }
  }
}
 
here is the device info :
XML:
<?xml version="1.0" encoding="UTF-8"?>

-<DeviceInfo xmlns="http://www.isapi.org/ver20/XMLSchema" version="2.0">

<deviceName>T&A Access Controller</deviceName>

<deviceID>255</deviceID>

<model>DS-K1T804AMF</model>

<serialNumber>F44711929</serialNumber>

<macAddress>2C:A5:9C:B2:E0:DF</macAddress>

<firmwareVersion>V1.4.1</firmwareVersion>

<firmwareReleasedDate>build 240318</firmwareReleasedDate>

<deviceType>ACS</deviceType>

<supportBeep>true</supportBeep>

<alarmOutNum>1</alarmOutNum>

<relayNum>1</relayNum>

<electroLockNum>1</electroLockNum>

<RS485Num>1</RS485Num>

<customizedInfo/>

</DeviceInfo>

I'm currently building API integration for HikVision, and this device we have makes me crazy.
 
I understand you :) I had similar problems with some endpoints via OpenAPI.



1738329775818.png

Now im migrating everything on HikPartnerPro OpenApi and cloud varriant. Im Tired of opening ports as some users dont want to pay for VPN implementation.


So far so good i guess :)

1738330318069.png1738330378041.png1738330433581.png1738330460994.png1738330484482.png1738330510949.png
 
Oh very interesting, well done!

so is this still the ISAPI? the one I'm using is not cloud or VPN, am just directly accessing the ISAPI using the devices IP.
i have followed this: Intelligent Security API (Access Control on Person) Developer Guide

but I'm having general problems, some routes just doesn't work , one fingerprint, the other one adding card. its like each device has its own implementation(expecting different parameters for its ISAPI), feels like its not a unified API.

i have followed : Intelligent Security API (Access Control on Person) Developer Guide documentation.
 
I integrated local isapi with most devices. If you are using public documentation. Tat may be the problem. Tpp.hikvision.com got newest available. But you need to sign NDA.

Now i switched to cloud based solution. Only backend i have is licensing server. Besides that i use hik partner pro sdk
 
sorry, but im a bit confused, ISAPI,cloud based solution, Hik partner pro sdk which is for what? i have two use cased, either there is a department where their access control devices are localized, or the devices are scattered across multiple remote places.

further more, how can I access the latest ISAPI documentation? I'm using the one I attached below.
 

Attachments

there is Hik partner PRO sdk for live view playback downloading files

and there is Hik partner pro OpenAPI documentation for configuring devices and adminstering.

Some ISAPI nodes are allowed to be used over hik partner pro

This requires NDA sign and registration at tpp.hikvision.com


So in my case im covering remote locations without opening ports. Device only has to be added to hik partner pro