GO consuming HIKIVISION ISAPI.
Extend functionality over cctv hikivision devices.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Golang v13
Give examples
brew install golang
Give the example
And repeat
until finished
End with an example of getting some data out of the system or using it for a little demo.
go test -v ./.../...
Add notes about how to use the system.
Add additional notes about how to deploy this on a live system.
- [Golang]
- @kylelobo - Idea & Initial work
See also the list of contributors who participated in this project.
- Hat tip to anyone whose code was used
- Inspiration
- References
The OPEN Intelligent Security Application Programming Interface (ISAPI) is a text protocol in RESTful style based on HTTP for communicating between security devices/servers (e.g., cameras, DVR, NVR, etc.) and client software/system. It defines the communication standard between device/server and client software/system via the Internet Protocol (IP)
- POST: Create resources. This method is only available for adding resource that does not exist before.
- GET: Retrieve resources. This method cannot change the system status, only return data as the response to the requester.
- PUT: Update resources. This method is usually for update the resource that already exists, but it can also be used to create the resource if the specific resource does not exist.
- DELETE: Delete resources.
- ://[:port][abs_path [?query]]
- For ISAPI protocol, the request and response messages generated among the interaction between devices and platform are data in XML format or JSON format.
- For configuration Content-Type in the JSON format message is "application/json; charset='UTF-8'"
- For data Content-Type in the JSON format message is "application/octet-stream"
- The time format in the ISAPI protocol adopts ISO8601 standard (see details in http:// www.w3.org/TR/NOTE-datetime-970915 ), that is, YYY-MM-DDThh:mm:ss.sTZD (e.g., 2017-08-16T20:17:06+08:00).
- During the integration applications of ISAPI protocol, when the error of URL based on HTTP occurred, the ResponseStatus message (in XML or JSON format) which contains error code will be returned.
- The authentication must based on HTTP Authentication: Basic and Digest Access Authentication, see https://tools.ietf.org/html/rfc2617 for details.
- The request session must contain authentication information, otherwise, device will return 401 error code.
- The message digest, which contains user name, password, specific nonce value, HTTP or RTSP operation methods, and request URL, is generated by the MD5 algorithm, see the calculation rules below. qop=Undefined Digest=MD5(MD5(A1)::MD5(A2)) qop="auth:" Digest=MD5(MD5(A1):::::MD5(A2)) qop="auth-int:" Digest=MD5(MD5(A1):::::MD5(A2))