This article will introduce CGI and API protocols for you.

Protocols Definition
Common Gateway Interface (CGI) Common Gateway Interface (CGI)An interface specification for web servers to execute programs like console applications running on a server that generates web pages dynamically. In brief, an HTTP GET or POST request from the client may send HTML form data to the CGI program via standard input.
Application Program Interface (API) A set of routines, protocols, and tools for building software applications. Basically, an API specifies how software components should interact. Additionally, APIs are used when programming graphical user interface (GUI) components. 

Attachment is the latest Reolink Camera API User Guide: https://drive.google.com/file/d/1KvPbjRVqsgCEzJsUS--zEyxw6cP-pkSI/view?usp=sharing