IPCAM CGI SDK 1.
Contents IPCAM CGI SDK 1.7......................................................................................................................1 summary ..........................................................................................................................................3 snapshot.cgi ....................................................................................................................................4 videostream.cgi.......................................................
summary The CGI APIs is based on http protocal. Different CGI with different Permissions:visitor、operator and Administrator. In this article cgi only support get and post method. upgrade_firmware.cgi and upgrade_htmls.cgi only support post method,otherscgi only support get method. next_url:an option param. If you don’t want only return a simple “OK” when set succeed,you can add a param in the end——next_url.The param is the next file it jump to when set succeed.The param must be a Relative path.
snapshot.cgi description To obtain the snapshot Permission visitor Syntax /snapshot.cgi[?user=&pwd=&next_url=] Parameters user:username pwd:password next_url:the name of snapshot Note 1 If not use the parameter “next_url”, the snapshot name is:device id(Alias)_ Current time.jpg 2 Use “next_url” (for example:next_url=1 the name of photo:1.jpg) 3 support 2 Authentication Metheds: http Basic64 encode and use username/password in the param directly. videostream.
get_status.cgi description To obtain the Device status info. Permission everyone Syntax /get_status.cgi return now:The count of seconds form 1970-1-1 0:0:0 to now alarm_status: 0:no alarm 1:motion alarm 2:input alarm ddns_status:DDNS status(details see below) upnp_status:UPNP status(details see below) Note support 2 Authentication Metheds: http Basic64 encode and use username/password in the param directly.
upnp_status Return description 0 No Action 1 Succeed 2 Device System Error 3 Errors in Network Communication 4 Errors in Chat with UPnP Device 5 Rejected by UPnP Device, Maybe Port Conflict get_camera_params.cgi description obtain camera params Permission visitor Syntax /get_camera_params.
0 up 1 Stop up 2 down 3 Stop down 4 left 5 Stop left 6 right 7 Stop right … Reserved 25 center 26 Vertical patrol 27 Stop vertical patrol 28 Horizon patrol 29 Stop horizon patrol … Reserved 94 IO output high 95 IO output low camera_control.cgi description To control camera sensor Parameters Permission operator Syntax /camera_control.
reboot.cgi description Reboot device Permission Administrator Syntax /reboot.cgi[?next_url=] restore_factory.cgi description Restore factory settings Permission Administrator Syntax /restore_factory.cgi[?next_url=] get_params.cgi description To obtain the device settings info. Permission Administrator Syntax /get_params.
user1_pri User1 permission … … user8_name User8 name user8_pwd User8 password user8_pri User8 permission dev2_alias The 2nd Device alias dev2_host The 2nd Device host(IP or Domain name) dev2_port The 2nd Device port dev2_user The 2nd Device user name dev2_pwd The 2nd Device password … … dev9_alias The 9th Device alias dev9_host The 9th Device host(IP or Domain name) dev9_port The 9th Device port dev9_user The 9th Device user name dev9_pwd The 9th Device password ip IP addres
wifi_key3_bits 0:64 bits 1:128 bits wifi_key4_bits 0:64 bits 1:128 bits wifi_channel Channel (default 5) wifi_mode Mode (default 0) wifi_wpa_psk wpa_psk pppoe_enable 0:disable 1:enable pppoe_user pppoe user pppoe_pwd pppoe password upnp_enable 0:disable 1:enable ddns_service 0:disable DDNS 1:oray.cn 2:Dyndns.org(dyndns) 3:Dyndns.org(statdns) 4:Dyndns.org(custom) 5: Reserved 6: Reserved 7: Reserved 8:3322.org(dyndns) 9:3322.
ftp_dir catalogue ftp_mode 0:post 1:pasv ftp_upload_interval Upload interval (Seconds) 0:disable alarm_motion_armed 0:motion disable 1:enable alarm_motion_sensitivity Sensitivity 0:high alarm_input_armed 0:input detect disable 1:enable alarm_iolinkage 0:when alarm disable IO linkage 1:enable alarm_mail 0:when alarm disable mail send 1:enable alarm_upload_interval Upload interval (Seconds) 0:disable 1:medium 2:low 3:ultra low upgrade_firmware.
set_datetime.cgi description Set device data time Permission Administrator Syntax /set_datetime.cgi?tz=&ntp_enable=&ntp_svr=[&now=&next_url=] Parameters now: The count of seconds form 1970-1-1 0:0:0 to now;if use, the device will calibration time depend on it. tz:set time zone. The current time zone settings contrast with the standard time zone GMT (Unit: Seconds) ntp_enable:0:disable 1:enable ntp_svr:ntp server length <= 64 set_users.
&dev4_alias=&dev4_host=&dev4_port=&dev4_user=&dev4_pwd=&dev5_ alias=&dev5_host=&dev5_port=&dev5_user=&dev5_pwd=&dev6_alias=& dev6_host=&dev6_port=&dev6_user=&dev6_pwd=&dev7_alias=&dev7_h ost=&dev7_port=&dev7_user=&dev7_pwd=&dev8_alias=&dev8_host=&de v8_port=&dev8_user=&dev8_pwd=&dev9_alias=&dev9_host=&dev9_port =&dev9_user=&dev9_pwd=[&next_url=] Parameters dev2_alias:The 2nd Device alias dev2_host:The 2nd Device host(IP or Domain name) dev2_port:The 2nd Device port dev2_user:The 2nd Device user name dev2_p
encrypt: 0:disable encrypt 1:web 2:wpa tkip 3:wpa aes 4:wpa2 aes 5:wpa2 tkip+aes defkey: 0~3(web encrypt) key1:wep key1 … key4:wep key4 authtype: Authetication type 0:open 1:share keyformat: Keyformat 0:Hex 1:ASCII key1_bits: 0:64 bits 1:128 bits … key4_bits: 0:64 bits 1:128 bits channel: Channel (default 5) mode: Mode (default 0) wpa_psk: wpa_psk length <= 64;if not use,set null. set_pppoe.cgi description Set device pppoe settings Permission Administrator Syntax /set_pppoe.
1:enable set_ddns.cgi description Set device DDNS settings Permission Administrator Syntax /set_ddns.cgi?service=&user=&pwd=&host=&proxy_svr=&proxy_port= [&next_url=] Parameters service : 0:disable DDNS; 1:oray.cn; 2: DynDns.org(dyndns); 3: DynDns.org(statdns); 4: DynDns.org(custom) 5: Reserved 6: Reserved 7: Reserved 8:3322.org(dyndns) 9:3322.
upload_interval: Upload interval (Seconds) 0:disable (range:0-65535) set_mail.cgi description Set device mail settings Permission Administrator Syntax /set_mail.
Syntax /comm_write.cgi?port=&baud=&bytes=&data=[&next_url=] Parameters Port: 0-3 Baud: 9: B1200 11: B2400 12: B4800 13: B9600 14: B19200 15: B38400 4097: B57600 4098: B115200 Bytes: < 256 Data: use url code Set_forbidden.cgi description Setting the forbidden for checking video/audio Permission administrator Syntax /set_forbidden.
Schedule_thu_2 Schedule_fri_0 Schedule_fri_1 Schedule_fri_2 Schedule_sat_0 Schedule_sat_1 Schedule_sat_2 get_forbidden.cgi description Access the forbidding for checking audio/video Permission Administrator Syntax /get_forbidden.cgi return See set_forbidden.cgi Set_misc.cgi description Set rotational Parameters of camera Permission Administrator Syntax /set_misc.
Ptz_patrol_h_round: Ptz_patrol_v_round: Ptz_patrol_rate: Ptz_patrol_up_rate: Ptz_patrol down_rate Ptz_patrol left_rate: Ptz_patrol right_rate: 0: Infinite 0: Infinite 0-100, 0: the fastest 0-100, 0: the slowest 0-100, 0: the slowest 0-100, 0: the slowest 0-100, 0: the slowest get_misc.cgi description Obtain rotational Parameters of camera Permission Administrator Syntax /get_misc.cgi? Parameters See get_misc.cgi set_decoder.