The HTTP API commands can be used in a couple of  different ways, either via a browser window, via Command Line using cURL or a program like Postman


The complete list of commands can be found in here


We'll start off with the browser version, in this specific example we will send a command to the camera to Pan Left with a speed of 50. 


Our camera is located at IP address 172.26.40.26



A command to Pan left could look like this: 

http://172.26.40.26/ajaxcom?szCmd={%22SysCtrl%22:{%22PtzCtrl%22:{%22nChanel%22:0,%22szPtzCmd%22:%22left_start%22,%22byValue%22:50}}}


Or like this: 

http://172.26.40.26/ajaxcom?szCmd={"SysCtrl":{"PtzCtrl":{"nChanel":0,"szPtzCmd":"left_start","byValue":50}}}


But never like this (pay attention to the quotation marks):

http://172.26.40.26/ajaxcom?szCmd={“SysCtrl”:{“PtzCtrl”:{“nChanel”:0,”szPtzCmd”:”left_start”,”byValue”:50}}}


The quotation marks " are a representation of ASCII Hex 22 and can be written as %22 in the API command, to avoid confusion between the different notations of quotation marks.


The answer from the camera to this command should look like this: 


HTTP API Answer


When using a program like cURL, it can sometimes be necessary to double up on quotation marks, the same command should look like this: 


curl "http://172.26.40.26/ajaxcom" --data-raw "szCmd={""SysCtrl"":{""PtzCtrl"":{""nChanel"":0,""szPtzCmd"":""left_start"",""byValue"":50}}}"

HTTP API Command