---
title: "vakna health: check that the API is serving"
description: "Check that the API is serving."
command: "vakna health"
generated: scripts/generate.ts
verified:
  cli: "0.0.0-mock"
  date: "2026-10-20"
---

`vakna health`: check that the API is serving.

## Synopsis

```sh
vakna health
```

## Flags

| Flag | Default | What it does |
| -- | -- | -- |
| `--timeout <duration>` | `10s` | give up on the API after this long |
| `--format <format>` | `text` | text, or json: one JSON object per line |
| `--json` | `off` | the same as --format json |
| `-h, --help` | `off` | this help |

## Examples

### Example

```sh
$ vakna health
```

```prints
serving
```

Exit code 0.

### Another example

```sh
$ vakna health --format json
```

```prints
{"v":1,"event":"health","status":"serving","mocked":true}
```

Exit code 0.

### When it fails

```sh
$ vakna health --format yaml
```

```prints
vakna: unknown --format yaml
hint: vakna --help  # text or json
```

Exit code 2.

## Exit codes

| Code | Meaning |
| -- | -- |
| 0 | ok |
| 1 | vakna failed; under shell, run, try or fork, the command in the box failed |

## JSON output

With `--format json` (or `--json`) every line is one JSON object. `v` is the format's version; `mocked` marks numbers from the mock.

```sh
$ vakna health --format json
```

```prints
{"v":1,"event":"health","status":"serving","mocked":true}
```

## Errors

- [`vakna: unknown command, unknown flag or missing argument`](https://vakna.com/docs/errors/usage): Run `vakna <command> --help` and fix the command line it points to.

## --help

This page and the help text come from one definition.

```prints
vakna health · check that the API is serving

usage
  vakna health

flags
  --timeout <duration>  give up on the API after this long  (default: 10s)
  --format <format>     text, or json: one JSON object per line  (default: text)
  --json                the same as --format json  (default: off)
  -h, --help            this help  (default: off)

examples
  vakna health
  vakna health --format json

exit codes
  0  ok
  1  vakna failed; under shell, run, try or fork, the command in the box failed
```
