CameraCamera
View and change camera profiles and other settings, and make pan, tilt, and zoom (PTZ) movements.
Permissions required include Camera configuration.
| HTTP Methods |
|
||
| URL |
For HTTP
For HTTP
where variables are:
|
||
| Request JSON |
For HTTP For HTTP For HTTP For example, you can use {
"profile": "HighResContinuous"
}
or use {
"reqAction": 7,
"camMove": TYPE,
"magnitude": SPEED,
"presetName": PRESET
}
where attributes often self-explanatory, except:
|
||
|
Response JSON |
For HTTP For HTTP {
"objectID": "CameraCamera:cd51",
"reqAction": 1,
"nodePermission": 3,
"mkey": "cd51",
"location": "",
"tags": "",
"floor": "",
"floorarea": "",
"position_x": "",
"position_y": "",
"face_recognition": false,
"face_recognition_schedule": "",
"face_recognition_processing_order": 0,
"camera_type": 1,
"vendor_name": "Fortinet",
"model_name": "FCM-CD51",
"status": false,
"wired_status": 1,
"wired_addr": "0.0.0.0",
"index": 6,
"light_detection": 1,
"wlan_status": 1,
"wlan_addr": "0.0.0.0",
"face_recognition_video_processing_decimation_factor": 0,
"area": [],
"fw_version": "",
"management_mode": 0,
"cloud_region": "",
"management": 0,
"username": "",
"password": "",
"comm_type": 1,
"comm_http_port": 0,
"comm_https_port": 443,
"push_config": true,
"login_password": "CAMERA_ADMIN_PASSWORD",
"operator_password": "CAMERA_VIEWER_PASSWORD",
"address_mode": 0,
"addr": "172.168.1.10",
"port": 443,
"wired_mode": 0,
"wired_netmask": "0.0.0.0",
"wired_gateway": "0.0.0.0",
"wired_primary_dns": "0.0.0.0",
"wired_secondary_dns": "0.0.0.0",
"mac": "d4:76:a0:09:fa:2d",
"lan_mac": "d4:76:a0:09:fa:2d",
"wlan_mac": "d4:76:a0:09:fa:2e",
"serial_number": "CDC51ATF20000004",
"transport_type": 0,
"transport_udp_port": 554,
"transport_http_port": 0,
"transport_https_port": 0,
"transport_tcp_port": 0,
"motion": [],
"profile": "HighResContinuous",
"view_angle": 1,
"video_brightness": 50,
"video_contrast": 50,
"video_saturation": 50,
"video_sharpness": 50,
"power_frequency": 1,
"video_aspect": 1,
"recording_media_profile": "",
"viewing_media_profile": "",
"video_display_mode": 0,
"mount": 0,
"video_orientation": 0,
"zoom": 0,
"exposure_mode": 2,
"exposure_wdr_digital": 0,
"exposure_wdr_shutter": 0,
"exposure_gain_max": 1,
"exposure_time_max": 4,
"image_dnr": 1,
"image_dnr_level": 1,
"image_dnr_smart": 0,
"image_dis": false,
"image_digital_zoom": false,
"overlay_mode": 7,
"overlay_date_format": 1,
"alarm_pre": 10,
"alarm_post": 30,
"mask": [],
"mask_button": false,
"indication_led": true,
"digital_input": 0,
"digital_output": 0,
"infrared_mode": 1,
"infrared_led": 1,
"infrared_enable_threshold": 5,
"infrared_disable_threshold": 15,
"infrared_dwell_time": 5,
"infrared_sensitivity": 0,
"infrared_led_intensity": 1,
"infrared_led_level": 10,
"light_mode": 1,
"light_enable_threshold": 5,
"light_disable_threshold": 15,
"light_dwell_time": 5,
"audio_input": 2,
"audio_input_level": 90,
"audio_output": 0,
"audio_output_mute": false,
"audio_output_level": 60,
"audio_output_echo_cancel": false,
"audio_detect_sensitivity": 30,
"audio_codec": 1,
"audio_bitrate": 64000,
"audio_samplerate": 8000,
"pir_sensitivity": 30,
"tamper_detect_sensitivity": 30,
"motion_sensitivity": 70,
"people_detect_sensitivity": 50,
"vehicle_detect_sensitivity": 50,
"view_calibration_mode": 0,
"view_calibration_height": 0,
"view_calibration_tilt": 0,
"view_calibration_roll": 0,
"wifi_status": false,
"wifi_ssid": "",
"wifi_wmm": false,
"wifi_security": 0,
"wifi_wep_auth": 0,
"wifi_wep_keylength": 1,
"wifi_wep_keyindex": 1,
"wifi_wep_key": "",
"wifi_wpa_encrypt": 1,
"wifi_wpa_passphrase": "******",
"wifi_wpa_protocol": 1,
"wifi_wpa_username": "",
"wifi_wpa_password": "******",
"wlan_addr_mode": 0,
"wlan_mask": "0.0.0.0",
"wlan_gateway": "0.0.0.0",
"wlan_primary_dns": "0.0.0.0",
"wlan_secondary_dns": "0.0.0.0",
"ready": false,
"unready_state": 0,
"unready_state_detail": "",
"onvif_recording_stream_uris": "",
"onvif_viewing_stream_uris": "",
"onvif_snapshot_uri": "",
"onvif_snapshot_port": 0,
"onvif_recording_width": 0,
"onvif_recording_height": 0,
"onvif_viewing_width": 0,
"onvif_viewing_height": 0,
"move_home": true,
"move_home_delay": 5,
"move_home_pan": 0,
"move_home_tilt": 0,
"move_home_zoom": 0,
"ptz_presets": [],
"edge_storage_status": false,
"edge_storage_network_failure": false,
"websocket_tls": true,
"area_type": 0,
"area_x1": 0,
"area_y1": 0,
"area_x2": 0,
"area_y2": 0,
"area_x3": 0,
"area_y3": 0,
"area_x4": 0,
"area_y4": 0,
"settings": []
}
|
Example: Apply the "HighResContinuous" profile to a camera
curl -X PUT -H "Content-Type: application/json" -d "{\"profile\":\"HighResContinuous\"}" -b cookie.txt https://HOST_OR_IP/api/v1/CameraCamera/CAMERA_NAME
Example: Move a camera to home position
curl -X POST -H "Content-Type: application/json" -d "{\"reqAction\":7,\"camMove\":0,\"magnitude\":4}" -b cookie.txt https://HOST_OR_IP/api/v1/CameraCamera/CAMERA_NAME
Example: Move a camera to position "PTZ_preset_1"
After Example: Create "PTZ_preset_1" with the camera's current position, you can enter:
curl -X POST -H "Content-Type: application/json" -d "{\"reqAction\":7,\"camMove\":16,\"presetName\":\"PTZ_preset_1\"}" -b cookie.txt https://HOST_OR_IP/api/v1/CameraCamera/CAMERA_NAME