Skip to main content
The 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.kt

Methods

Performs a 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.kt

Example: no authentication needed

Because check() requires no authentication, you can call it before the user has signed in or provided an API key:
health_no_auth.kt

Example: handle transport failures

Wrap check() in a try/catch to detect network or DNS issues. Transport failures surface as FigraniumException with code: "NETWORK_ERROR":
health_transport.kt
The check() method accepts the standard RequestOptions as its options argument, so you can pass custom headers or a per-request timeout when needed.

Errors

Handle FigraniumException responses, including NETWORK_ERROR.

Request options

Pass custom headers and per-request timeout overrides.

Client configuration

Configure baseUrl, timeouts, and default headers.