HTTP API Endpoints for CamDirector® (Version 1.4.0 and Above)

Starting from version 1.4.0, accessing CamDirector® API endpoints has become easier. While the old format is still supported for backward compatibility, it is recommended to use the newer format. This guide first outlines the most recent API version, followed by the backward-compatible endpoints.


Using the HTTP API

To use the HTTP API, you will need the following link:

http://{IP_ADDRESS}/api?szCmd=

This link allows users to interact with various CamDirector® features such as Privacy Mode, Manual Control, Tracking, and MultiShot through a web browser (e.g., Microsoft Edge, Google Chrome).


Key Terminology & Functions

  • Privacy Mode: Displays a black screen with the Avonic logo, providing privacy for the teacher.
  • Manual Control: Allows manual control of the follow and overview cameras. You can switch between video streams, but Manual Control only works when the Tracking function is OFF.
  • Tracking: Tracks the teacher when enabled. It requires the Manual Control Mode to be disabled.
  • MultiShot: Allows you to switch cameras, reboot software, or retrieve its status. This is useful when working with multiple cameras.

HTTP API Endpoints (Port 80)

The table below describes the available HTTP API endpoints over port 80:


Tracking Endpoints (/api/tt/tracking)

MethodEndpointBodyResponse DataDescription
GET/-{ "running": bool }Indicates if tracking is actively running.
GET/on-{}Starts tracking.
GET/off-{}Stops tracking.
GET/manual-control-{ "running": bool }Indicates if Manual Control mode is active.
GET/manual-control/on-{}Enables Manual Control mode.
GET/manual-control/off-{}Disables Manual Control mode.
GET/manual-control/switch-{}Switches the output stream while in Manual Control mode.
GET/manual-control/set-output/<id>-{}Switches output to a specific stream (0: Overview, 1: Tracking, 2: Live Output).
GET/privacy-mode/on-{}Enables Privacy Mode.
GET/privacy-mode/off-{}Disables Privacy Mode.


MultiShot Endpoints (/api/ms/switch)

MethodEndpointBodyResponse DataDescription
GET/status-{ "running": bool }Retrieves MultiShot status.
GET/POST/on--Turns MultiShot ON.
GET/POST/off--Turns MultiShot OFF.
GET/current-preset-{ "current-preset": int }Returns the ID of the currently streamed preset.
GET/POST/<int:preset>--Switches to a specific preset.
GET/POST/reboot--Reboots the MultiShot software.

Backward Compatibility Endpoints (Port 3002)

For older versions, the Multishot endpoints route through port 3002. Since this is not the standard HTTP port, the port must be specified in the URL.


Legacy Multishot Endpoints (/switch)

MethodEndpointBodyResponse DataDescription
GET/status-{ "running": bool }Retrieves MultiShot status.
GET/POST/on--Turns MultiShot ON.
GET/POST/off--Turns MultiShot OFF.
GET/current-preset-{ "current-preset": int }Returns the ID of the currently streamed preset.
GET/POST/<int:preset>--Switches to a specific preset.
GET/POST/reboot--Reboots the MultiShot software.

HTTP API Example: Old szCmd Command Format

For backward compatibility, the API also supports the old format using the szCmd command. These requests must include port 3002 in the URL.

Example:

http://{IP}:3002/switch

Tip: Replace brackets with % symbols in the browser URL.

Example API Call

http://192.168.5.50/api?szCmd={"SetENV":{"TeacherTracker":"on"}}
  • TeacherTracker ON: Starts tracking mode.
  • TeacherTracker OFF: Stops tracking mode.

Full API Commands

CommandURLFunctionCommand Packet
Teacher Tracker ONhttp://192.168.5.50/api?szCmd={"SetEnv": {"TeacherTracker": "on"}}Enables Teacher Tracker.on
Teacher Tracker OFFhttp://192.168.5.50/api?szCmd={"SetEnv": {"TeacherTracker": "off"}}Disables Teacher Tracker.off
Privacy Mode ONhttp://192.168.5.50/api?szCmd={"SetEnv": {"PrivacyMode": "on"}}Activates Privacy Mode.on
Privacy Mode OFFhttp://192.168.5.50/api?szCmd={"SetEnv": {"PrivacyMode": "off"}}Deactivates Privacy Mode.off
Manual Control ONhttp://192.168.5.50/api?szCmd={"SetEnv": {"ManualControl": "on"}}Enables Manual Control.on
Manual Control OFFhttp://192.168.5.50/api?szCmd={"SetEnv": {"ManualControl": "off"}}Disables Manual Control.off
Switch Streamshttp://192.168.5.50/api?szCmd={"SetEnv":{"ManualControl":"switch"}}Switches between cameras.switch

Troubleshooting

If the API call fails:

  1. Check for typing errors or extra spaces.
  2. Ensure you are using the correct IP address of the CamDirector®.
  3. Ensure no white spaces exist between key values.

You can verify changes via the CamDirector® WebInterface.


This structure ensures clarity, making it easier for users to navigate and execute API commands effectively.