Skip to main content

Introduction

1.1 Commom Gateway Interface for cameras and recorders

CGI (Common Gateway Interface) is a set of interfaces based on http protocol provided by IP Camera and NVR. Client programs can operate various devices through CGI programs.

CGI programs support URL access and form access. Different URLs accessed by users correspond to different CGI programs. When users use CGI programs through forms, they should ensure that the URL used to access the CGI program is consistent with the corresponding parameters of the CGI program to be accessed. The encoding format of the URL is UTF8 and must comply with the RFC_3986 standard. Other encoding formats may cause exceptions.

1.2 CGI User Authentication

  • From a security perspective, access to CGI requires account and password verification.
  • The account and password give visitors corresponding permissions.
  • Basic security authentication mechanism and Digest summary verification specified in the http protocol;

1.3 Description of main CGI modules

Module NameDescription
video.cgiLive Video
record.cgiVideo
image.cgiSnapshot
alarm.cgiCall the police
ptz.cgiPTZ Operation
param.cgiGet and configure device parameters
operate.cgiDevice operations, such as restart, reset, etc.
sensor.cgiFront-end configuration
audio.cgiReal-time audio

1.4 Group text rules

The specific Returned plain text, image data body and URL address are determined by different access requests:

1. Some operation requests need to Return image data bodies, such as snapshots and video streams under the HTTP protocol.

2. Device configuration, device operation and other related requests generally Return plain text.

3. Under the RTSP protocol, all relevant command requests Return URL addresses.

4. Alarm information and other related requests generally Return plain text. When requesting in attach mode, a plain list will be obtained.