> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nelieo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /health — daemon liveness, version, and uptime

> Check whether the NSP daemon is running, read its version and uptime, and confirm how many processes are currently tracked — no API key required.

The `/health` endpoint is a lightweight liveness probe you can call without any authentication. It tells you whether the daemon process is up, what version is running, how long it has been alive, and whether API key enforcement is active. Use it from monitoring systems, load balancers, shell scripts, and CI pipelines.

## Endpoint

```http theme={null}
GET /health
```

No `X-Substrate-Key` header is required. The endpoint always returns `200 OK` as long as the daemon is alive and its internal HTTP server can accept connections. If you receive any connection error or non-200 status, treat the daemon as unhealthy and restart it.

## Response Fields

<ResponseField name="status" type="string" required>
  Always `"ok"` when the daemon is healthy. Future versions may return `"degraded"` if non-critical subsystems are failing.
</ResponseField>

<ResponseField name="version" type="string" required>
  Semantic version of the running daemon binary, e.g. `"1.0.0"`. Use this to verify you are running the expected release before automated deployments.
</ResponseField>

<ResponseField name="uptime_secs" type="integer" required>
  Number of seconds since the daemon process started. Useful for detecting unexpected restarts — a value that resets to a low number means the daemon crashed and recovered.
</ResponseField>

<ResponseField name="tracked_processes" type="integer" required>
  Number of OS processes the daemon is currently tracking. A value of `0` means no applications have been detected yet; the daemon may still be scanning or no supported runtimes are running.
</ResponseField>

<ResponseField name="auth_enabled" type="boolean" required>
  Whether API key authentication is enforced on all other endpoints. When `false`, you may omit `X-Substrate-Key` headers everywhere. Check this during initial setup to confirm your daemon configuration matches your intent.
</ResponseField>

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl http://127.0.0.1:7842/health
  ```

  ```python Python SDK theme={null}
  from nelieo import NspClient

  client = NspClient(base_url="http://127.0.0.1:7842")

  # ping() returns True if /health returns 200 — never raises.
  is_up = await client.ping()
  print(is_up)  # True

  # health() returns the full response object.
  health = await client.health()
  print(health.version)         # "1.0.0"
  print(health.uptime_secs)     # 7200
  print(health.auth_enabled)    # True
  ```
</CodeGroup>

### Expected Response

```json theme={null}
{
  "status": "ok",
  "version": "1.0.0",
  "uptime_secs": 7200,
  "tracked_processes": 4,
  "auth_enabled": true
}
```

## Notes

* If the daemon is starting up, `/health` may refuse connections for up to 2 seconds while the HTTP server binds its port. Retry with a short backoff before declaring the daemon unhealthy.
* The endpoint does not probe the health of individual runtime probes. A healthy `/health` response does not guarantee that all tracked processes are producing valid state — check `probe_status` per app via `GET /apps`.
* Calling `/health` does not count against any rate limit and does not appear in per-key usage metrics.
