@truenas/api-client
    Preparing search index...

    Class TrueNasApiClientV2510

    API client for TrueNAS API v25.10.x

    Protocol: JSON-RPC 2.0 WebSocket Path: /api/v25.10.{patch}

    Container operations use virt.instance.* APIs:

    • containerQuery → virt.instance.query (filtered by type=CONTAINER)
    • containerStart → virt.instance.start (emits Job updates)
    • containerStop → virt.instance.stop (emits Job updates)
    • containerRestart → virt.instance.restart (emits Job updates)

    Hierarchy (View Summary)

    Index
    api: TrueNasApi<v25_10_0.ApiDirectory>

    API call handler

    authenticator: TrueNasAuthenticator

    Authentication manager

    connection: TrueNasConnection

    WebSocket connection manager

    enabled: boolean

    Initial connection gate, forwarded to the connection. The app flips it later via connection.setEnabled() (mapping its SystemState.Active -> true).

    hostnames: string[]

    System hostnames (primary and fallback)

    logger: Logger

    Logger forwarded to the connection (defaults to a no-op).

    Version-agnostic operation mappings

    Provides a unified interface for operations that differ between API versions. Each version-specific client implements these operations using its own endpoints.

    Usage:

    truenas.ops.containerQuery().subscribe(containers => ...);
    truenas.ops.containerStart(id).subscribe(jobId => ...);
    systemName: string | undefined

    System name (optional)

    uuid: string

    System UUID

    version: ApiVersion

    API version information for this client

    • get authenticated(): boolean

      Get current authentication status.

      Returns boolean

      true if authenticated with the system

    • get connected(): boolean

      Get current connection status.

      Returns boolean

      true if WebSocket is connected