Health checks — uptime monitoring for URLs and TCP endpoints.
Mutating calls (create, update) send an Idempotency-Key header automatically.
Example
client = Miosa.client(System.fetch_env!("MIOSA_API_KEY"))
{:ok, check} = Miosa.HealthChecks.create(client, %{
name: "API health",
url: "https://api.example.com/health",
interval_seconds: 60
})
{:ok, _} = Miosa.HealthChecks.get(client, check["id"])
Summary
Functions
Create a health check.
Delete a health check by ID.
Fetch a health check by ID.
List health checks for the authenticated tenant.
Update a health check.
Functions
@spec create(Miosa.Client.t(), map()) :: Miosa.Client.result(map())
Create a health check.
Required: :name, :url. Optional: :interval_seconds, :timeout_seconds,
:expected_status, :method, :headers, :idempotency_key.
@spec delete(Miosa.Client.t(), String.t()) :: Miosa.Client.result(map())
Delete a health check by ID.
@spec get(Miosa.Client.t(), String.t()) :: Miosa.Client.result(map())
Fetch a health check by ID.
@spec list(Miosa.Client.t(), keyword() | map()) :: Miosa.Client.result(map())
List health checks for the authenticated tenant.
Accepts optional filters as a keyword list or map (e.g. :limit, :cursor).
@spec update(Miosa.Client.t(), String.t(), map()) :: Miosa.Client.result(map())
Update a health check.
Pass any fields to update; nil values are dropped.