Getting Started: Establishing a Connection to the VideoIPath Server
January 23, 2026 · View on GitHub
The following example shows how to establish a connection to the VideoIPath Server. All business logic is implemented in the VideoIPathApp class. Therefore, the user only needs to import the VideoIPathApp class from the videoipath_automation_tool package and initialize it with the required parameters.This could be done via environment variables or directly in the code.
The VideoIPathApp class provides all necessary methods to interact with the VideoIPath Server. Although methods are available on a lower level, it is strongly recommended to use the public methods of the VideoIPathApp class to interact with the VideoIPath Server. This guarantees easy handling, validation, logging, and reliability.
Prerequisite
Before establishing a connection to the VideoIPath Server, ensure that the following requirements are met:
User Account Settings (User Info)
- User Authorization:
The user account must be authorized using theVideoIPathauthentication method. - Permissions:
For a straightforward setup, enable bothAPIandAdministratoroptions for the user account (User Info). This ensures that the user has all necessary permissions to interact with the VideoIPath Server.
Driver Versioning
To ensure IntelliSense support and runtime validation of custom settings, the VideoIPath Server should be running a compatible version of the driver schema. By default, the package uses the latest Long-Term Support (LTS) version, which is currently 2024.4.30. If you need to use a different version, refer to the Driver Versioning Guide.
Example 1: Establishing a Connection to the VideoIPath Server via Environment Variables
Step 1: Configure Environment Variables (.env File)
Create a .env file and define the following environment variables to configure the connection:
VIPAT_ENVIRONMENT=DEV
VIPAT_VIDEOIPATH_SERVER_ADDRESS=10.1.100.10
VIPAT_VIDEOIPATH_USERNAME=api-user
VIPAT_VIDEOIPATH_PASSWORD=veryStrongPassword
VIPAT_USE_HTTPS=true
VIPAT_VERIFY_SSL_CERT=false
VIPAT_LOG_LEVEL=INFO
VIPAT_ADVANCED_DRIVER_SCHEMA_CHECK=true
VIPAT_TIMEOUT_HTTP_GET=10
VIPAT_TIMEOUT_HTTP_PATCH=10
VIPAT_TIMEOUT_HTTP_POST=10
Step 2: Code Example
To establish the connection, import the VideoIPathApp class and initialize it as follows:
# Import the `VideoIPathApp` class from the videoipath_automation_tool package
from videoipath_automation_tool import VideoIPathApp
# Initialize the VideoIPathApp
app = VideoIPathApp()
# Example: Get the server version
print(app.get_server_version())
# > 2024.4.30
Example 2: Establishing a Connection to the VideoIPath Server via parameters
# Import the `VideoIPathApp` class from the videoipath_automation_tool package
from videoipath_automation_tool import VideoIPathApp
# Initialize the VideoIPathApp
app = VideoIPathApp(server_address="10.1.100.10", username="api-user", password="veryStrongPassword", use_https=True, verify_ssl_cert=False, log_level="DEBUG")
# Example: Get the server version
print(app.get_server_version())
# > 2024.4.30
Additional Information
Parameters
server_address: The IP address or hostname of the VideoIPath Serverusername: Username for the API User.password: Password for the API User.use_https: Set toTrueif the VideoIPath Server uses HTTPS.verify_ssl_cert: Set toTrueif the SSL certificate should be verified.log_level: The log level for the logging module, possible values areDEBUG,INFO,WARNING,ERROR, andCRITICAL. If not set as a parameter or environment variable, it falls back to the root logger's level (default is set toWARNING).environment: The environment of the VideoIPath Server, possible values areDEVandPROD(for future use)advanced_driver_schema_check: If set toTrue, the local driver schema is checked against the server's driver schema (custom settings fields).timeout_http_get: Optional. Timeout in seconds for HTTP GET requests. Default is10.timeout_http_patch: Optional. Timeout in seconds for HTTP PATCH requests. Default is10.timeout_http_post: Optional. Timeout in seconds for HTTP POST requests. Default is10.
Environment Variables
| Variable | Values | Description |
|---|---|---|
VIPAT_ENVIRONMENT | DEV, PROD | Optional: Define the environment. Defaults to PROD. |
VIPAT_VIDEOIPATH_SERVER_ADDRESS | e.g. IP 10.200.10.21 or hostname vip.company.com | IP address or hostname of the VideoIPath server. |
VIPAT_VIDEOIPATH_USERNAME | e.g. api_user | Username for the API User. |
VIPAT_VIDEOIPATH_PASSWORD | e.g. very_strong_passw0rd | Password for the API User. |
VIPAT_USE_HTTPS | true, false | Optional: Use HTTPS for the connection. Defaults to true. |
VIPAT_VERIFY_SSL_CERT | true, false | Optional: Verify the SSL certificate. Defaults to true. |
VIPAT_LOG_LEVEL | debug, info, warning, error, critical | Optional: Set the log level. |
VIPAT_ADVANCED_DRIVER_SCHEMA_CHECK | true, false | Optional: Enable advanced driver schema checks. Defaults to true. |
VIPAT_TIMEOUT_HTTP_GET | Integer > 5 (e.g. 10) | Optional. Timeout in seconds for GET requests. Default is 10.Recommended: greater than 5 seconds. |
VIPAT_TIMEOUT_HTTP_PATCH | Integer > 5 (e.g. 10) | Optional. Timeout in seconds for PATCH requests. Default is 10.Recommended: greater than 5 seconds. |
VIPAT_TIMEOUT_HTTP_POST | Integer > 5 (e.g. 10) | Optional. Timeout in seconds for POST requests. Default is 10.Recommended: greater than 5 seconds. |
Log Levels
DEBUG: Detailed information, typically of interest only when diagnosing problemsINFO: Confirmation that things are working as expectedWARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g., ‘fallback used’, ‘deprecated method used’). The software is still working as expected, but future versions may not work the same way.ERROR: Due to a more serious problem, the software has not been able to perform some function.CRITICAL: Not used, reserved for future use