Registry stack documentation: machine-readable Markdown.
Index of all pages: https://docs.registrystack.org/dev/llms.txt
Full corpus: https://docs.registrystack.org/dev/llms-full.txt

# caseworkctl api command reference

> Generated syntax and options for caseworkctl api.

{/* Generated from crates/registry-cli-docs/catalog.json and the workspace version in Cargo.toml by scripts/generate-cli-reference.mjs. Run npm run generate. */}

Call the Casework HTTP API with a saved connection or retained local client.

## Contract status

This page is generated from the public Clap command tree for Registry Stack source version `0.45.0` and catalog SHA-256 `18546dbdf436972522108829ab0f8c804142a7474cfe3841e0b8ff10e061c842`. Hidden implementation commands are omitted.

## Usage

```text
caseworkctl api [OPTIONS] <PATH>
```

## Constraints

| Condition | Requirement |
| --- | --- |
| `--token-file <TOKEN_FILE>` is present | `--url <URL>` is required. |
| `--ca-file <CA_FILE>` is present | `--url <URL>` is required. |
| Command invocation | `--client <CLIENT>` and `--connection <CONNECTION>` cannot be used together. |
| Command invocation | `--client <CLIENT>` and `--url <URL>` cannot be used together. |
| Command invocation | `--connection <CONNECTION>` and `--url <URL>` cannot be used together. |

## Arguments

| Argument | Always required | Default | Values | Environment | Description |
| --- | --- | --- | --- | --- | --- |
| `<PATH>` | Yes | n/a | n/a | n/a | Relative API path. A leading slash is accepted without discarding a deployment prefix |

## Options

| Option | Always required | Repeatable | Default | Values | Environment | Description |
| --- | --- | --- | --- | --- | --- | --- |
| `--project <PROJECT>` | No | No | n/a | n/a | n/a | Project directory, or a descendant from which the exact product root is found |
| `--client <CLIENT>` | No | No | n/a | n/a | n/a | Named local development client resolved by the product adapter |
| `--connection <CONNECTION>` | No | No | n/a | n/a | n/a | Named saved remote connection |
| `--url <URL>` | No | No | n/a | n/a | n/a | Explicit service base URL for an advanced one-off request |
| `--token-file <TOKEN_FILE>` | No | No | n/a | n/a | n/a | Bearer credential file used only with `--url` |
| `--ca-file <CA_FILE>` | No | No | n/a | n/a | n/a | PEM certificate authority bundle for an explicit private-institution endpoint |
| `--method <METHOD>` | No | No | n/a | n/a | n/a | HTTP method. Defaults to GET, or POST when `--input` is present |
| `--input <INPUT>` | No | No | n/a | n/a | n/a | Request body file, or `-` for standard input |
| `--header <HEADER>` | No | Yes | n/a | n/a | n/a | Request header as `NAME: VALUE`; use `NAME: @FILE` for a value or `@FILE` for complete lines |
| `--accept <ACCEPT>` | No | No | n/a | n/a | n/a | Value of the HTTP Accept header |
| `--output <OUTPUT>` | No | No | n/a | n/a | n/a | Write response bytes to this file instead of standard output |
| `--include` | No | No | n/a | n/a | n/a | Include the HTTP status and response headers before the response body |
| `--idempotency-key <IDEMPOTENCY_KEY>` | No | No | n/a | n/a | n/a | Value of the Idempotency-Key header |
| `--if-match <IF_MATCH>` | No | No | n/a | n/a | n/a | Literal HTTP If-Match value, including quotes when the endpoint requires them |
| `--format <FORMAT>` | No | No | `human` | `human`, `json` | n/a | Write human diagnostics and reports, or one typed JSON report |
| `-h, --help` | No | No | n/a | n/a | n/a | Print help |

## Generation contract

After changing a public command, argument, option, default, environment binding, or help description, run `cargo run --locked -p registry-cli-docs -- --write`, commit `crates/registry-cli-docs/catalog.json`, then run `npm run generate` from `docs/site`.