Skip to main content

HTTP API Getting Started

The PTZOptics HTTP API uses CGI paths and query parameters. The examples in the reference show the request the camera receives. They are intentionally not rewritten as conventional REST endpoints.

Before you send a command​

  • Identify the camera IP address or hostname.
  • Confirm that the camera model supports the command you plan to use.
  • If HTTP Authentication is enabled, use the camera credentials with HTTP Digest authentication.
  • Use the complete CGI path shown in the reference, including its query parameters.

For camera-side HTTP Authentication settings, see Camera Control Issues After Firmware Update.

Send a movement command​

This example sends the documented Pan/Tilt Control command for an up-right movement with pan and tilt speeds of 15 and 13:

curl --digest --user "USERNAME:PASSWORD" \
"http://CAMERA-IP-ADDRESS/cgi-bin/ptzctrl.cgi?ptzcmd&rightup&15&13"

Replace CAMERA-IP-ADDRESS, USERNAME, and PASSWORD with the camera values. If HTTP Authentication is disabled on the camera, omit the --digest --user options.

Use the exact parameter ordering and CGI path from the Pan/Tilt Control reference. The reference also documents the command without speed parameters.

HTTP conventions in this reference​

The API can use query parameters for operations that might be represented as a request body in a conventional REST API. Some documented POST requests require an empty body and a Content-Length: 0 header. Do not change a command's method, path, query format, or headers only to make it look more conventional.

When a page shows a request template and a runnable example, treat the runnable example as the on-camera request. Report any apparent disagreement through the documentation feedback process rather than guessing which form the camera accepts.

Next steps​

Ask PTZOptics AI

Ask a question about PTZOptics products or documentation.