# Service inventory (complete pagination)

Enumerate every page of `GET /v1/services` for one workspace using the shared
`{ service, cursor }` reader. Cursors are opaque; pagination is not a frozen
snapshot of a changing workspace.

Downloadable from [`/examples/service-inventory/`](https://bex.co/examples/service-inventory/README.md).
The pager lives in [`../oauth-user-client/services.mjs`](../oauth-user-client/services.mjs).

## Fixture (offline)

```bash
BEX_OAUTH_FIXTURE=1 BEX_FIXTURE_SERVICE_COUNT=25 node inventory.mjs
```

## Live

```bash
export BEX_API_ORIGIN=https://api.bex.co
export BEX_ACCESS_TOKEN=…   # user or machine bearer with bex.read
export BEX_OWNER_ID=…       # workspace id
node inventory.mjs
```

Nonzero exit when enumeration is incomplete (`ok: false`). Successful output
lists sorted `serviceIds` only — never tokens.
