openvasd v1¶
High-level API interface for interacting with openvasd HTTP services via logical modules (health, metadata, scans, etc.).
Usage:
from gvm.protocols.http.openvasd import OpenvasdHttpAPIv1
- class OpenvasdHttpAPIv1¶
High-level interface for accessing openvasd HTTP API v1 endpoints.
This class encapsulates modular sub-APIs (health, metadata, notus, scans, vts) and wires them to a shared httpx.Client configured for secure access.
Each sub-API provides methods for interacting with a specific openvasd domain.
- __init__(host_name, port=3000, *, api_key=None, server_ca_path=None, client_cert_paths=None, suppress_exceptions=False)¶
Initialize the OpenvasdHttpApiV1 entry point.
- Parameters:
host_name (str) – Hostname or IP of the openvasd server (e.g., “localhost”).
port (int) – Port of the openvasd service (default: 3000).
api_key (str | None) – Optional API key to be used for authentication.
server_ca_path (str | PathLike[str] | None) – Path to the server CA certificate (for HTTPS/mTLS).
client_cert_paths (str | PathLike[str] | Tuple[str | PathLike[str], str | PathLike[str]] | None) – Path to client certificate or (cert, key) tuple for mTLS.
suppress_exceptions (bool) – If True, suppress exceptions and return structured error responses. Default is False, which means exceptions will be raised.
- property health: HealthAPI¶
Access the health API module.
Provides methods to check the health status of the openvasd service.
- property metadata: MetadataAPI¶
Access the metadata API module.
Provides methods to retrieve metadata about the openvasd service, including version and feed information.
- property notus: NotusAPI¶
Access the Notus API module.
Provides methods to interact with the Notus service for package-based vulnerability scanning.