import Alert from "@/components/DocsAlert";

# REST API

Welcome to Firezone's REST API v0 documentation.

## Getting started

To get started with the REST API, you'll first need an API token. This can be
generated in the UI at `/settings/account` or via the CLI with:

```bash
docker compose -f $HOME/.firezone/docker-compose.yml exec firezone bin/create-api-token
```

**Note**: The token is written to `STDOUT` by default. You may wish to redirect
its output to a file instead:

```bash
docker compose -f $HOME/.firezone/docker-compose.yml exec firezone bin/create-api-token > fz_token
```

<Alert
  color="warning"
  html={`
API tokens generated from the CLI are owned by the primary administrator
specified by the <code>DEFAULT_ADMIN_EMAIL</code> environment variable.
`}
/>
