Skip to content

Health

Health

Bases: BaseModel

The server's state: its node connection, sync progress, tip, era and version.

version class-attribute instance-attribute

version: str | None = None

The Ogmios version, for example "v7.0.0 (ef123abd)".

network class-attribute instance-attribute

network: str | None = None

mainnet, preprod, preview or another network name.

connection_status class-attribute instance-attribute

connection_status: str | None = None

connected when Ogmios is connected to its node.

network_synchronization class-attribute instance-attribute

network_synchronization: float | None = None

How far the node is synced, from 0.0 to 1.0.

last_known_tip class-attribute instance-attribute

last_known_tip: dict[str, Any] | None = None

The node's tip: {"slot", "id", "height"}.

server_version property

server_version: tuple[int, int, int] | None

The Ogmios version as (major, minor, patch).

is_synced property

is_synced: bool

Whether the node is connected and fully synced.

parse_version

parse_version(
    text: str | None,
) -> tuple[int, int, int] | None

"v7.0.0 (ef123abd)" -> (7, 0, 0); None when there is no version number.

health_url

health_url(url: str) -> str

The /health URL for a ws://, wss://, http:// or https:// Ogmios URL.