HealthResource on client.health provides a lightweight liveness probe for any Figranium instance. Call check() to confirm the server is up, read its version, and verify that your SDK install and network path are working. No API key is required.
Client setup
HealthResource.swift
Methods
check
check
GET /api/health request and returns the server’s health status. This is the fastest way to verify connectivity and SDK configuration.Returns
HealthStatus with these fields:status: a human-readable status string such as"ok"version: the running Figranium server version
Example: verify connectivity
health_check.swift
Example: no authentication needed
Becausecheck() requires no authentication, you can call it before the user has signed in or provided an API key:health_no_auth.swift
Example: handle transport failures
Wrapcheck() in a do/catch to detect network or DNS issues. Transport failures surface as FigraniumError with code: "NETWORK_ERROR":health_transport.swift
The
check() method accepts the standard RequestOptions as its options argument, so you can pass custom headers or a per-request timeout when needed.Related resources
Errors
Handle
FigraniumError responses, including NETWORK_ERROR.Request options
Pass custom
headers and per-request timeout overrides.Client configuration
Configure
baseURL, timeouts, and default headers.