CameraCameraPtzPresets
View or change camera pan, tilt, and zoom (PTZ) presets.
If you want the camera to return to the position that was defined in a PTZ preset, use it in a PTZ command. See Example: Move a camera to position "PTZ_preset_1".
Permissions required include Camera configuration.
| HTTP Methods |
To create a new PTZ preset, use PTZ commands (see CameraCamera) to position the camera, and then use To update the PTZ preset, use PTZ commands to change the position, and then use |
| URL |
For HTTP
For HTTP
where variables are:
|
|
Request JSON |
Leave empty. |
|
Response JSON |
Responses vary by HTTP method, URL ( {
"objectID": "CameraCameraPtzPresets:PTZ_preset2{P:door_cam}",
"reqAction": 2,
"nodePermission": 3,
"parent_mkey": "door_cam",
"mkey": "PTZ_preset1",
"pan": 0,
"tilt": 0,
"zoom": 0
}
|
Example: Create "PTZ_preset_1" with the camera's current position
curl -X POST -H "Content-Type:application/json" -d "{}" -b cookie.txt https://HOST_OR_IP/api/v1/CameraCamera/CAMERA_NAME/CameraCameraPtzPresets/PTZ_preset_1
After you move the camera, you can return to the preset position by following Example: Move a camera to position "PTZ_preset_1".
Example: Update "PTZ_preset_1" with the camera's current position
curl -X PUT -H "Content-Type:application/json" -d "{}" -b cookie.txt https://HOST_OR_IP/api/v1/CameraCamera/CAMERA_NAME/CameraCameraPtzPresets/PTZ_preset_1
Example: Delete "PTZ_preset_1"
curl -X DELETE -b cookie.txt https://HOST_OR_IP/api/v1/CameraCamera/CAMERA_NAME/CameraCameraPtzPresets/PTZ_preset_1