canopy CLI Reference

For an operator or developer driving a Canopy operation from a shell: canopy is the ADR-007 parity binary — every subcommand is one thin reqwest call to a service’s REST API, never a database (ADR-007; tools/canopy-cli/src/main.rs dispatches, tools/canopy-cli/src/cmd/<group>.rs builds the request). canopy --help and canopy <group> <sub> --help are authoritative for flags; the tables here add the endpoint and the route’s admission. The task runner cargo xtask is a different binary — cargo xtask Subcommand Catalog.

Build, profiles, login

cargo build -p canopy-cli                                   # [[bin]] name = "canopy" in tools/canopy-cli/Cargo.toml
./target/debug/canopy --help                                # target/release/canopy after --release; the service image carries it at /app/canopy (deployment-guide.adoc, #2099)
canopy --profile devstack login                             # prints canopy-web's device page and a code; approve it there
canopy --profile devstack token canopy-persons              # prints a canopy-persons token from the session
canopy --profile devstack logout                            # revokes and removes the session
  • Profiles. Every command except completion opens the session of --profile <PROFILE> (global, default default; session::Session::open, tools/canopy-cli/src/session.rs). A profile is a table in profiles.toml under dirs::config_dir()/canopy — ~/.config/canopy/ on Linux (config::load_profile, config::config_dir, tools/canopy-cli/src/config.rs); a missing file is created with a [default] table of Profile::default() values. Fields (config::Profile): identity_issuer, canopy-identity’s issuer identifier (:<port>/identity; http only under CANOPY_ENV=development), an optional ca_file, a PEM CA bundle trusted beside the system's roots when reaching it, and one base URL per service — persons_url, applications_url, eligibility_url, rules_url, security_url, notices_url, renewals_url, snap_url, tanf_url, medicaid_url, caps_url, wic_url, appeals_url, reporting_url; the last nine carry serde defaults, the rest are required.

  • The devstack profile names no table: it is derived on every run from the nearest .ports.env at or above the working directory (devstack::profile, tools/canopy-cli/src/devstack.rs), so it follows each bring-up’s ports. Its issuer is CANOPY_TESTIDENTITY_ISSUER (canopy-web’s https://web.canopy.test:<port>/identity), its CA CANOPY_TESTUPSTREAM_CA (.devstack/idp/kanidm-ca.pem), each service URL CANOPY_TEST<SERVICE>_URL, and the issuer’s host is pinned to CANOPY_TESTWEB_ADDR, the ingress’s published address, so no hosts entry is needed. A process variable of the same name wins over the file.

  • login is the RFC 8628 device flow at the profile’s issuer (ADR-049 §7; cmd::login::login over canopy-auth’s DeviceClient): it prints canopy-web’s device page and a user code on stderr, a worker signed in to canopy-web approves the device there (a fresh sign-in, the step-up the approval needs), and the command polls until then or the code expires. canopy-web’s identity edge serves every endpoint under the issuer, so the CLI needs no other URL. No credential is typed into the CLI. A new login revokes the profile’s prior session at the same issuer.

  • The session. A native session: a DPoP device key and a rotating refresh credential bound to it, in one owner-only directory per profile, identity/<profile> beside profiles.toml (canopy-auth’s DeviceStore, device_store_dir), every refresh under the store’s file lock so two invocations never present one credential. The session names its issuer: after the issuer moves (a devstack port move) or the session ends, a command answers no session for this issuer; log in, and you login again.

  • Calls. Each call to a service refreshes the session for that service’s own audience and sends the token through canopy_auth::send_with_retry (client::ApiClient): a token the receiver refuses (a 401 whose Bearer challenge names no error or invalid_token, canopy_auth::refuses_the_bearer) is re-minted once and resent; any other 401 is returned as it came. A command whose service canopy-cli has no edge to (identity_policy::call_graph's canopy-cli rows) fails before anything is sent.

  • token <SERVICE> prints one service’s token on stdout, for a caller sending its own request; it is the only command that prints a token. logout revokes the session and removes it; no session is no error.

Output, exit status, completion

--format table|json is global (output::Format, default table): table prints a list as tab-separated columns under a header (output::print_list) and one object as key: value lines (output::print_detail); json prints the response body pretty-printed. Commands whose route returns no body (person delete, application withdraw, the claim-delete / close-member closes, verification reject) print a one-line confirmation in either format. A non-2xx response fails the command with HTTP <status>: <detail> and a non-zero exit (output::check_status); the security chain-* commands also exit non-zero on their fail-closed arms (table below). canopy completion <SHELL> (bash, elvish, fish, powershell, zsh) writes the clap_complete script to stdout (cmd::completion::run) — source <(canopy completion bash); it needs no profile or token.

Getting the binary

Canopy builds canopy for others to download, so a pack author or a configuration repository's pipeline runs canopy config check without compiling canopy. The file is canopy-x86_64-unknown-linux-musl, with a .sha256 beside it. Two jobs offer it, each the CLI built alone by the line the car tests:

  • canopy-cli (#3634), in main's own pipeline after a merge, keeps it as the job's artifacts. It builds from the checkout with no cache, and keeps no binary that needs a shared library: the file is statically linked, so it runs on a pipeline image of another distribution. GitLab deletes a build a week after its job, and keeps the newest successful one on main whatever its age (the project's keep-latest-artifacts setting).

  • release (#3435), on a tag, uploads it to the project's package registry as canopy-cli/<version>/canopy-x86_64-unknown-linux-musl: the binary the job ships in the service image at /app/canopy, uploaded only after the images are tagged. It does not expire. A package protection rule on the project refuses an upload of canopy-cli from a pipeline started by a member below Maintainer (#3635).

A merge request's build is never offered: neither job runs on a merge-request pipeline or a train car, and lanes.rs tests hold both to that.

Not every commit of main has a build. When two merges land within seconds of each other, GitLab cancels the earlier pipeline before its jobs start; the later one, which contains it, builds, since the job runs on every merge, a docs-only one included. Jurisdiction onboarding shows both downloads.

Offline commands

canopy completion and canopy config check open no session: they read no profile, need no login, reach no network and no database, and write nothing under the configuration directory (dispatch in tools/canopy-cli/src/main.rs runs them before Session::open). ADR-007 Amendment 5 admits such file checks to the CLI and keeps database and key-material jobs out of it.

canopy config check <PACK_DIR> --federal <FEDERAL_DIR> runs canopy's pack checks on a working copy of a jurisdiction's configuration repository, over a copy of the federal layer. The checks are canopy-pack-check's (Shared Crates Reference), the ones the car runs on a pinned pack:

  • every top-level *.json decision of the pack compiles through zen-engine and is named after its file;

  • a pack decision that replaces a federal one is listed under overrides in the pack's canopy-config.toml, the rule canopy-rules applies at boot;

  • each fixture in the pack's own fixtures/rulesets/, when it has that directory, is replayed against the decision the stack evaluates: the pack's copy of the name, else the federal one;

  • jurisdiction.toml restates no constant federal law fixes, every key of it is cited in citations.toml, and its two names for each SNAP processing clock agree;

  • the Medicaid and CHIP class catalogue ([[medicaid.classes]]) loads, and every class the pack's cascade order, hierarchy and [medicaid.cooperation] lists name is a declared row (#3420).

The first line of the output names both directories and, when the federal directory is the root of a git checkout, the commit it has checked out, read from .git/HEAD and the ref it names without running git; any other directory (a linked worktree, or the tree cargo xtask config fetch publishes) reads commit unknown. The line also says that both are read as plain directories with no signature verified, and that a clean check is not a boot proof: a service's parameter loader can still refuse the pack (#3404), and the car of the commit config-sources.lock pins is the gate.

Every finding is printed, as its check and file with the message below; the run does not stop at the first. A note is something that fails nothing: a pack with no fixture directory, a fixture marked ignore, naming no decision, or listing packs that leave out this jurisdiction, a citation verified more than --max-staleness-days ago (default 365). --format json prints one document on stdout, {notice, pack, federal, federal_commit, findings: [{check, file, message}], notes: [{file, message}]}, and the notice on stderr as well.

Exit status Meaning

0

No finding.

1

At least one finding.

2

Nothing was checked, and stderr says why: a directory cannot be read or has no canopy-config.toml; <PACK_DIR>'s manifest does not declare layer = "jurisdiction"; the --federal directory carries a jurisdiction.toml; or a pack file a check reads (jurisdiction.toml, citations.toml) is missing or does not parse.

Every other command still exits 1 on any error.

Access

Every call bears a canopy-cli delegation token minted from the worker’s session, so a route admits it on the worker’s roles, through the admission its handler checks (principal.admit(&ADMISSION)?; ADR-049 Amendment 15; every route’s admission in Fleet authorization inventory). canopy-cli holds a delegation edge to each service these tables call (CANOPY_CLI in crates/canopy-auth/src/identity_policy/call_graph.rs). The last column of every table names the route’s admission and the roles it admits canopy-cli’s worker with:

  • An upper-case route name (PERSONS_POST_PERSONS) is a delegated-route row in crates/canopy-auth/src/delegated.rs (cargo xtask delegated-routes lists them all).

  • Any other name is a constant in the handler’s service, and a user_roles(…) cell an admission written inline in the handler (table below).

  • "via canopy-cli" means the admission’s via arm (user_roles_via) lists canopy-cli; "any actor" means a user arm (user_roles) that admits the roles through any client. The role bars are crates/canopy-auth/src/roles.rs's.

Admission Service Defined in

DATA_STEWARD

canopy-persons

services/canopy-persons/src/api/admission_rules.rs

WRITER

canopy-applications

services/canopy-applications/src/api/mod.rs

WRITER, READER

canopy-eligibility

services/canopy-eligibility/src/api/handlers.rs

OPERATOR

canopy-eligibility

services/canopy-eligibility/src/api/quarantine.rs

user_roles(CITATION_RENDER_ROLES)

canopy-notices

inline, services/canopy-notices/src/api/mod.rs

WRITER

canopy-renewals

services/canopy-renewals/src/api/mod.rs

OPERATOR_READ, OPERATOR_WRITE, OPERATION

canopy-appeals

services/canopy-appeals/src/api/mod.rs

SUPERVISORS

canopy-reporting

services/canopy-reporting/src/api/mod.rs

WRITER

canopy-snap

services/canopy-snap/src/api/mod.rs

user_roles(&["data_steward"])

canopy-snap, canopy-tanf, canopy-medicaid, canopy-caps, canopy-wic

inline, services/canopy-snap/src/api/determine_handler.rs, services/canopy-medicaid/src/api/handlers/determinations.rs and services/canopy-<program>/src/api/handlers.rs for the others

SERVICE_OR_ADMIN

canopy-security

services/canopy-security/src/api/mod.rs

A worker holding none of the roles is refused 403 required_role_missing. The nine data_steward redactions (person redact-ssn, income/asset/expense redact, the five determination redact) need the session of a worker holding data_steward (devstack user data.steward). A delegated call records the session’s worker as its actor (Principal::actor). canopy-persons takes a delegated claim’s or close’s author from the bearer, whatever --author-sub names (claim_author, close_author, services/canopy-persons/src/api/authors.rs), so the flag does not change the recorded author.

Command tables

One table per top-level command, rows in canopy <group> --help order; determine sits with eligibility (its alias), completion with login / logout / token, config after them, and the four program services share one table because they share one ProgramAction enum. The first cell of every row is the full command path in backticks — the marker tools/canopy-cli/tests/cli_reference_drift_test.rs reads to compare this page with the clap tree in both directions. [brackets] mark optional flags, <ID> a positional argument; the global --format / --profile are omitted. Endpoints are spelled as the command builds them; the service is the profile URL in the heading.

login, logout, token, completion — canopy-identity (identity_issuer) and local

Subcommand Key flags Endpoint Access

canopy login

—

POST {identity_issuer}/device_authorization, then POST {identity_issuer}/token (grant_type=urn:ietf:params:oauth:grant-type:device_code, DPoP-proved) until approved on canopy-web’s /device

any worker canopy-web admits, approving with a fresh sign-in

canopy logout

—

POST {identity_issuer}/revoke

the profile’s session

canopy token

<SERVICE> (e.g. canopy-persons)

POST {identity_issuer}/token (grant_type=refresh_token, resource=urn:canopy:service:<SERVICE>, DPoP-proved)

the profile’s session; a service canopy-cli has an edge to

canopy completion

<SHELL>

none

—

config — local files, offline

Subcommand Key flags Endpoint Access

canopy config check

<PACK_DIR> --federal <FEDERAL_DIR> [--max-staleness-days <N>] (default 365)

none: reads the two directories (Offline commands)

— (no session)

person — canopy-persons (persons_url)

Subcommand Key flags Endpoint Access

canopy person create

--first-name, --last-name, --dob, [--middle-name --suffix --gender --race (repeatable) --ethnicity --citizenship-status --language-preference --disability-status]

POST /v1/persons

PERSONS_POST_PERSONS (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy person list

[--search]

GET /v1/persons

PERSONS_GET_PERSONS (WORKER_READER_ROLES via canopy-cli)

canopy person get

<ID>

GET /v1/persons/{id}

PERSONS_GET_PERSONS_ID (CASE_READER_ROLES via canopy-cli)

canopy person update

<ID>, any create flag

PUT /v1/persons/{id}

PERSONS_PUT_PERSONS_ID (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy person delete

<ID>

DELETE /v1/persons/{id}

PERSONS_DELETE_PERSONS_ID (supervisor / admin via canopy-cli)

canopy person redact-ssn

<ID>, --reason

POST /v1/persons/{id}/redact-ssn

DATA_STEWARD (data_steward, any actor)

canopy person pregnancy add

--person-id, --expected-delivery-date, --fetus-count (1 to 8), --source, --author-sub, --valid-from, [--waive-family-size-increase --origin --valid-to --fact-id]

POST /v1/persons/{id}/pregnancies (#3143)

PERSONS_POST_PERSONS_ID_PREGNANCIES (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy person pregnancy end

--fact-id, --end-date, --author-sub

DELETE /v1/pregnancies/{fact_id}?end_date=&author_sub= (#3143)

PERSONS_DELETE_PREGNANCIES_FACT_ID (CASEWORKER_WRITER_ROLES via canopy-cli)

household — canopy-persons (persons_url)

Subcommand Key flags Endpoint Access

canopy household create

--effective-date

POST /v1/households

PERSONS_POST_HOUSEHOLDS (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy household get

<ID>

GET /v1/households/{id}

PERSONS_GET_HOUSEHOLDS_ID (WORKER_READER_ROLES via canopy-cli)

canopy household get-full

<ID>, [--as-of]

GET /v1/households/{id}/full

PERSONS_GET_HOUSEHOLDS_ID_FULL (CASE_READER_ROLES via canopy-cli)

canopy household claim-member

--household-id, --person-id, --relationship, --source, --author-sub, --valid-from, [--origin --valid-to --fact-id]

POST /v1/households/{id}/members/claims

PERSONS_POST_HOUSEHOLDS_ID_MEMBERS_CLAIMS (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy household close-member

--household-id, --fact-id, --author-sub, [--as-of]

DELETE /v1/households/{id}/members/claims/{fact_id}?author_sub=

PERSONS_DELETE_HOUSEHOLDS_ID_MEMBERS_CLAIMS_FACT_ID (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy household homelessness add

--household-id, --source, --author-sub, --valid-from, [--origin --valid-to --fact-id]

POST /v1/households/{id}/homelessness; --fact-id corrects that period (#3144)

PERSONS_POST_HOUSEHOLDS_ID_HOMELESSNESS (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy household homelessness end

--household-id, --fact-id, --end-date, --author-sub

DELETE /v1/households/{id}/homelessness/{fact_id}?end_date=&author_sub=; prints the superseded windows (#3144)

PERSONS_DELETE_HOUSEHOLDS_ID_HOMELESSNESS_FACT_ID (CASEWORKER_WRITER_ROLES via canopy-cli)

income — canopy-persons (persons_url)

Subcommand Key flags Endpoint Access

canopy income list-by-person

--person-id

GET /v1/persons/{id}/income

PERSONS_GET_PERSONS_ID_INCOME (WORKER_READER_ROLES via canopy-cli)

canopy income claim

--person-id, --income-type, --amount, --frequency, --source, --author-sub, --valid-from, [--employer-name --origin --valid-to --fact-id]

POST /v1/persons/{id}/income/claims; --source ievs is refused (422 verified_income_is_proposed): IEVS income goes through verification accept (#2546)

PERSONS_POST_PERSONS_ID_INCOME_CLAIMS (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy income claim-delete

--person-id, --fact-id, --author-sub, [--as-of]

DELETE /v1/persons/{id}/income/claims/{fact_id}?author_sub=

PERSONS_DELETE_PERSONS_ID_INCOME_CLAIMS_FACT_ID (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy income redact

--person-id, --fact-id, --reason

POST /v1/persons/{id}/facts/income/{fact_id}/redact

DATA_STEWARD (data_steward, any actor)

asset — canopy-persons (persons_url)

Subcommand Key flags Endpoint Access

canopy asset list-by-person

--person-id

GET /v1/persons/{id}/assets

PERSONS_GET_PERSONS_ID_ASSETS (CASEWORKER_OR_ABOVE_ROLES via canopy-cli)

canopy asset claim

--person-id, --asset-type, --value, --source, --author-sub, --valid-from, [--description --origin --valid-to --fact-id]

POST /v1/persons/{id}/assets/claims

PERSONS_POST_PERSONS_ID_ASSETS_CLAIMS (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy asset redact

--person-id, --fact-id, --reason

POST /v1/persons/{id}/facts/asset/{fact_id}/redact

DATA_STEWARD (data_steward, any actor)

expense — canopy-persons (persons_url)

Subcommand Key flags Endpoint Access

canopy expense list-by-person

--person-id

GET /v1/persons/{id}/expenses

PERSONS_GET_PERSONS_ID_EXPENSES (CASEWORKER_OR_ABOVE_ROLES via canopy-cli)

canopy expense claim

--person-id, --expense-type, --amount, --frequency, --source, --author-sub, --valid-from, [--origin --valid-to --fact-id]

POST /v1/persons/{id}/expenses/claims

PERSONS_POST_PERSONS_ID_EXPENSES_CLAIMS (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy expense redact

--person-id, --fact-id, --reason

POST /v1/persons/{id}/facts/expense/{fact_id}/redact

DATA_STEWARD (data_steward, any actor)

address — canopy-persons (persons_url)

Subcommand Key flags Endpoint Access

canopy address claim

--person-id, --address-type, --line-1, --city, --state, --zip, --source, --author-sub, --valid-from, [--line-2 --county-fips --origin --valid-to --fact-id]

POST /v1/persons/{id}/addresses/claims

PERSONS_POST_PERSONS_ID_ADDRESSES_CLAIMS (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy address claim-delete

--person-id, --fact-id, --author-sub, [--as-of]

DELETE /v1/persons/{id}/addresses/claims/{fact_id}?author_sub=

PERSONS_DELETE_PERSONS_ID_ADDRESSES_CLAIMS_FACT_ID (CASEWORKER_WRITER_ROLES via canopy-cli)

rules — canopy-rules (rules_url)

Subcommand Key flags Endpoint Access

canopy rules list

—

GET /v1/rule-sets

RULES_GET_RULE_SETS (CASEWORKER_OR_ABOVE_ROLES via canopy-cli)

canopy rules get

<NAME> — the ruleset’s logical name

GET /v1/rule-sets/{name}

RULES_GET_RULE_SETS_NAME (CASEWORKER_OR_ABOVE_ROLES via canopy-cli)

canopy rules evaluate

<NAME>, [--input '<json>'] (omitted → evaluates {})

POST /v1/evaluate

RULES_POST_EVALUATE (CASEWORKER_OR_ABOVE_ROLES via canopy-cli)

application — canopy-applications (applications_url)

Subcommand Key flags Endpoint Access

canopy application create

--household-id, --submitted-by, [--programs snap,tanf] [--channel in_person]

POST /v1/applications

APPLICATIONS_POST_APPLICATIONS (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy application list

[--household-id]

GET /v1/applications

APPLICATIONS_GET_APPLICATIONS (WORKER_READER_ROLES via canopy-cli)

canopy application caseload-trend

[--window 12w] [--bucket week] [--program]

GET /v1/applications/caseload-trend

APPLICATIONS_GET_APPLICATIONS_CASELOAD_TREND (CASEWORKER_OR_ABOVE_ROLES via canopy-cli)

canopy application get

<ID>

GET /v1/applications/{id}

APPLICATIONS_GET_APPLICATIONS_ID (WORKER_READER_ROLES via canopy-cli)

canopy application withdraw

<ID>

DELETE /v1/applications/{id}

APPLICATIONS_DELETE_APPLICATIONS_ID (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy application document-rescan

--application-id, --document-id

POST /v1/applications/{id}/documents/{document_id}/rescan

APPLICATIONS_POST_APPLICATIONS_ID_DOCUMENTS_DOCUMENT_ID_RESCAN (supervisor / admin via canopy-cli)

interview — canopy-applications (applications_url)

Subcommand Key flags Endpoint Access

canopy interview waive

--application-id, --reason

POST /v1/applications/{id}/interview/waive

APPLICATIONS_POST_APPLICATIONS_ID_INTERVIEW_WAIVE (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy interview complete

--application-id

POST /v1/applications/{id}/interview/complete

WRITER (CASEWORKER_WRITER_ROLES, any actor)

eligibility, determine — canopy-eligibility (eligibility_url)

Subcommand Key flags Endpoint Access

canopy eligibility determine

--application-id, --household-id, [--programs snap,tanf], --requested-by

POST /v1/eligibility/determine

WRITER (CASEWORKER_WRITER_ROLES, any actor)

canopy eligibility dry-run

--baseline-determination-id, --household-id, --as-of

POST /v1/eligibility/determine/dry-run

READER (CASEWORKER_OR_ABOVE_ROLES, any actor)

canopy eligibility get

<ID>

GET /v1/eligibility/requests/{id}

READER (CASEWORKER_OR_ABOVE_ROLES, any actor)

canopy eligibility results

--application-id

GET /v1/eligibility/results/{application_id}

READER (CASEWORKER_OR_ABOVE_ROLES, any actor)

canopy eligibility held list

--program snap|tanf|medicaid|chip|caps|wic, [--after <cursor>] [--limit 1-200]

GET /v1/eligibility/held-determinations?program=&after=&limit=

OPERATOR (DETERMINATION_OPERATOR_ROLES, any actor; a system token is refused)

canopy eligibility held adopt

<OPERATION_ID>, --note

POST /v1/eligibility/determination-operations/{operation_id}/adoptions

OPERATOR

canopy eligibility held drop

<DETERMINATION_ID>, --program, --note

POST /v1/eligibility/held-determinations/{determination_id}/drops

OPERATOR

canopy eligibility quarantine list

[--program <p>]…​, [--household-id], [--after-received-at <RFC 3339> --after-id <id>], [--limit 1-200]

GET /v1/eligibility/quarantined-determinations?programs=&household_id=&after_received_at=&after_id=&limit=

OPERATOR (DETERMINATION_OPERATOR_ROLES, any actor; a system token is refused)

canopy eligibility quarantine get

<ID>

GET /v1/eligibility/quarantined-determinations/{id}

OPERATOR

canopy eligibility quarantine resolve

<ID>, --action reverify|dismiss, --note

POST /v1/eligibility/quarantined-determinations/{id}/resolutions

OPERATOR

canopy determine

as eligibility determine

POST /v1/eligibility/determine

WRITER (CASEWORKER_WRITER_ROLES, any actor)

Held determinations (#3065). The eligibility held commands are the shell form of the held-determination runbook, which says how to decide each disposition and what each refusal code means. Each needs the session of a determination operator: eligibility_specialist, supervisor or admin (DETERMINATION_OPERATOR_ROLES). The ids parse as UUIDs and --program as a program slug, so a malformed one is refused before anything is sent. --note is the 1 to 500 characters the ledger row records.

canopy --profile devstack eligibility held list --program snap                  # canopy-snap's holds past its warning age, oldest first
canopy --profile devstack eligibility held list --program snap --after "$NEXT"  # the next page: the cursor the previous page printed
canopy --profile devstack eligibility held adopt "$OPERATION_ID" --note "dispatch timed out; the signed verdict stands"
canopy --profile devstack eligibility held drop "$DETERMINATION_ID" --program chip --note "direct caller, never recorded; case re-determined"
  • list prints one row per hold under --format table: determination_id, program, operation_id (empty for a direct caller's hold), held_since to the second, held_rows and disposition. The last line is next: <cursor>, the next page's --after, or next: (last page) (held_table, tools/canopy-cli/src/cmd/eligibility.rs).

  • adopt takes the operation_id a held item reports and prints one row per adopted determination's ledger row (adopted_table).

  • drop takes the item's own program: chip, not medicaid, for a CHIP hold, or the drop is 409 not_held. It prints the ledger row.

Quarantined envelopes (#2061, #3117). The eligibility quarantine commands are the shell form of canopy-web's quarantine worklist: a signed envelope canopy-eligibility quarantined instead of recording, which an operator reverifies or dismisses. Each needs a determination operator's session, as the held commands do. The envelope id and --household-id parse as UUIDs, --program as a program slug and --action as reverify or dismiss, so a malformed one is refused before anything is sent; --after-received-at and --after-id are refused one without the other. The household count, GET /v1/eligibility/households/{household_id}/quarantined-determinations/count, is served to canopy-web's delegation of a case reader only (#2321), so it has no command.

canopy --profile devstack eligibility quarantine list --program snap --program tanf   # open interactive envelopes, oldest first
canopy --profile devstack eligibility quarantine list --household-id "$HOUSEHOLD_ID" --after-received-at "$AFTER_RECEIVED_AT" --after-id "$AFTER_ID"  # one household, the next page
canopy --profile devstack eligibility quarantine get "$QUARANTINED_ID"
canopy --profile devstack eligibility quarantine resolve "$QUARANTINED_ID" --action reverify --note "signing key restored"
canopy --profile devstack eligibility quarantine resolve "$QUARANTINED_ID" --action dismiss --note "duplicate of a recorded determination"
  • list prints one row per envelope under --format table: id, program, household_id, person_id and claimed_status (each empty when the signed bytes claim none), quarantine_reason, received_at to the second and resolution_count. The last line is next: with the next page's --after-received-at and --after-id, the instant at full precision, or next: (last page) (quarantine_page_table, tools/canopy-cli/src/cmd/eligibility.rs).

  • get prints the envelope's fields as key: value lines, an absent claim as (none), then its newest 20 resolutions: revision, action, reason_before, reason_after, determination_id, actor and created_at (view_table). The notes are in --format json.

  • resolve prints the ledger row in the same columns (resolved_table). A reverify that verified and bound leaves reason_after empty and names the promoted determination_id. One that did not keeps a reason and leaves the envelope open. A repeated reverify of a reverified envelope answers its earlier row, writing nothing. Each refusal code is in the eligibility API page.

document — canopy-notices (notices_url)

Subcommand Key flags Endpoint Access

canopy document render

--template-key, --inputs <json or @file>, --output <pdf>, [--no-sign]

POST /v1/documents/render (PDF + X-Canopy-Signature)

user_roles(CITATION_RENDER_ROLES) (any actor)

Exported files are owner-only (#2890). document render and the report CSV exports write PII: applicant documents and federal-report extracts holding SSNs, names and benefit data. Each --output file is created owner-only on Unix: 0600, set when the file is created, or narrower under a stricter umask, never wider (canopy_common::owner_only::write_owner_only_file). The bytes go to a fresh sibling, .<name>.<pid>.<nanos>.tmp, which is renamed over the path:

  • a symbolic link already at the path is replaced, never written through;

  • an existing file is replaced by the owner-only one, never left wider;

  • the path must name a regular file’s place: a FIFO or a device link such as /dev/stdout is replaced or refused, never written into.

The directory’s mode is left as it is. A staged copy a crashed export left behind is removed by the next export of the same path once it is a minute old; no other file is touched. Off Unix the file takes the access-control list it inherits from its directory.

renewal — canopy-renewals (renewals_url)

Subcommand Key flags Endpoint Access

canopy renewal caseload-rollup-refresh

—

POST /v1/renewals/caseload-rollup/refresh (202 = lock held elsewhere)

RENEWALS_POST_RENEWALS_CASELOAD_ROLLUP_REFRESH (admin via canopy-cli)

canopy renewal caseload-trend

[--window 12w] [--bucket week] [--program]

GET /v1/renewals/caseload-trend

RENEWALS_GET_RENEWALS_CASELOAD_TREND (CASE_READER_ROLES via canopy-cli)

canopy renewal nudge list

--household-id, [--pending-only]

GET /v1/renewals/snap/nudges

RENEWALS_GET_RENEWALS_SNAP_NUDGES (CASE_READER_ROLES via canopy-cli)

canopy renewal nudge action

<ID>, --household-id, --action filed_recert|dismissed (the recorded actor is the profile’s bearer, #1008; a nudge of another household than --household-id is 409 nudge_household_mismatch, #2545)

POST /v1/renewals/snap/nudges/{id}/action

WRITER (CASEWORKER_WRITER_ROLES, any actor)

appeal — canopy-appeals (appeals_url)

canopy-appeals' fair-hearing operator routes: no service calls them and canopy-web has no page for them, so each admits canopy-cli’s operators by the route’s effect (ADR-049 Amendment 15; the constants in services/canopy-appeals/src/api/mod.rs). Filing an appeal and recording the hearing decision are canopy-web’s. --actor is the recording worker’s identity the route stores on the appeal; the timeline row records the session’s worker.

Subcommand Key flags Endpoint Access

canopy appeal hearing-view

<ID>

GET /v1/appeals/{id}/hearing-view

OPERATOR_READ (CASEWORKER_OR_ABOVE_ROLES via canopy-cli)

canopy appeal schedule

<ID>, --hearing-date YYYY-MM-DD, --hearing-officer-id <OIDC subject>

PUT /v1/appeals/{id}/schedule

OPERATOR_WRITE (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy appeal postpone

<ID>, --days, --reason, --actor

POST /v1/appeals/{id}/postponements

OPERATOR_WRITE

canopy appeal final-appeal

<ID>, --filed-date YYYY-MM-DD, --actor, [--continue-benefits]

PUT /v1/appeals/{id}/final-appeal

OPERATOR_WRITE

canopy appeal final-decision

<ID>, --outcome affirmed|reversed, --received-date YYYY-MM-DD, --actor

PUT /v1/appeals/{id}/final-decision

OPERATOR_WRITE

canopy appeal withdrawal request

<ID>, --method written|oral, --actor

PUT /v1/appeals/{id}/withdraw

OPERATOR_WRITE

canopy appeal withdrawal confirm

<ID>, --actor

PUT /v1/appeals/{id}/withdraw/confirm

OPERATOR_WRITE

canopy appeal withdrawal reinstate

<ID>, --actor

PUT /v1/appeals/{id}/withdraw/reinstate

OPERATOR_WRITE

canopy appeal withdrawal finalize

<ID>, --actor

PUT /v1/appeals/{id}/withdraw/finalize (releases the enrollment stay)

OPERATOR_WRITE

canopy appeal clock-check

—

POST /v1/internal/appeals/clock-check

OPERATION (admin via canopy-cli)

canopy appeal reconcile

—

POST /v1/internal/appeals/reconcile (the #1100 report)

OPERATION

ipv — canopy-appeals (appeals_url)

The IPV case operator routes, admitted as appeal's are (services/canopy-appeals/src/ipv/api.rs). canopy-cli has no command for the referral, POST /v1/ipv/cases (WORKER_WRITE).

Subcommand Key flags Endpoint Access

canopy ipv list

--person-id

GET /v1/ipv/cases?person_id=

OPERATOR_READ (CASEWORKER_OR_ABOVE_ROLES via canopy-cli)

canopy ipv get

<ID>

GET /v1/ipv/cases/{id}

OPERATOR_READ

canopy ipv schedule-adh

<ID>, --adh-date YYYY-MM-DD

PUT /v1/ipv/cases/{id}/schedule-adh

OPERATOR_WRITE (CASEWORKER_WRITER_ROLES via canopy-cli)

canopy ipv send-notice

<ID>

PUT /v1/ipv/cases/{id}/send-notice (400 inside the advance-notice period)

OPERATOR_WRITE

canopy ipv record-decision

<ID>, --decision ipv_confirmed|ipv_not_confirmed|default_decision

PUT /v1/ipv/cases/{id}/record-decision

OPERATOR_WRITE

canopy ipv waiver

<ID>, --waiver-signed-date YYYY-MM-DD

PUT /v1/ipv/cases/{id}/waiver

OPERATOR_WRITE

canopy ipv impose-disqualification

<ID>

PUT /v1/ipv/cases/{id}/impose-disqualification

OPERATOR_WRITE

canopy ipv withdraw

<ID>

PUT /v1/ipv/cases/{id}/withdraw

OPERATOR_WRITE

canopy ipv active-disqualification

--person-id

GET /v1/ipv/disqualifications/active?person_id=

OPERATOR_READ

report — canopy-reporting (reporting_url)

Every route admits a supervisor or admin through any actor (SUPERVISORS, services/canopy-reporting/src/api/mod.rs); canopy-web reads only the overpayment summary, so these commands are the operators' path to the federal reports. A generation that enqueues a durable run answers 202 with the run’s handle, polled with report runs get; ACF-196, the WPR and CMS-64 compute inline (201). --output writes an export’s CSV body owner-only ([exported-files]); a page’s --after-* flags are the prior page’s next_cursor, each pair together or not at all.

Subcommand Key flags Endpoint Access

canopy report fns-388 generate

--report-month YYYY-MM-DD (any day of the month)

POST /v1/reporting/snap/fns-388

SUPERVISORS

canopy report fns-388 list

—

GET /v1/reporting/snap/fns-388

SUPERVISORS

canopy report fns-388 get

<MONTH> (YYYY-MM)

GET /v1/reporting/snap/fns-388/{month}

SUPERVISORS

canopy report fns-388 submission

<MONTH>, --target-status final|submitted|accepted|rejected, [--fns-confirmation-number] (exactly for accepted)

POST /v1/reporting/snap/fns-388/{month}/submission

SUPERVISORS

canopy report qc-universe generate

--snapshot-date YYYY-MM-DD

POST /v1/reporting/snap/qc-universe

SUPERVISORS

canopy report qc-universe get

<DATE>, [--limit --after-household-id]

GET /v1/reporting/snap/qc-universe/{date}

SUPERVISORS

canopy report qc-universe csv

<DATE>, --output <csv>

GET /v1/reporting/snap/qc-universe/{date}/csv

SUPERVISORS

canopy report acf-199 generate

--report-month YYYY-MM-DD

POST /v1/reporting/tanf/acf-199

SUPERVISORS

canopy report acf-199 list

[--month YYYY-MM --limit --after-report-month --after-case-id]

GET /v1/reporting/tanf/acf-199

SUPERVISORS

canopy report acf-199 csv

[--month YYYY-MM], --output <csv>

GET /v1/reporting/tanf/acf-199/csv

SUPERVISORS

canopy report acf-196 generate

--fiscal-year, --fiscal-quarter 1-4

POST /v1/reporting/tanf/acf-196

SUPERVISORS

canopy report acf-196 list

—

GET /v1/reporting/tanf/acf-196

SUPERVISORS

canopy report wpr generate

--report-month YYYY-MM-DD

POST /v1/reporting/tanf/wpr

SUPERVISORS

canopy report wpr list

—

GET /v1/reporting/tanf/wpr

SUPERVISORS

canopy report tmsis generate

--report-month YYYY-MM-DD

POST /v1/reporting/medicaid/tmsis

SUPERVISORS

canopy report tmsis list

[--month YYYY-MM --limit --after-report-month --after-enrollment-id]

GET /v1/reporting/medicaid/tmsis

SUPERVISORS

canopy report tmsis csv

[--month YYYY-MM], --output <csv>

GET /v1/reporting/medicaid/tmsis/csv

SUPERVISORS

canopy report cms-64 generate

--fiscal-year, --fiscal-quarter 1-4

POST /v1/reporting/medicaid/cms-64

SUPERVISORS

canopy report cms-64 list

—

GET /v1/reporting/medicaid/cms-64

SUPERVISORS

canopy report cms-416 generate

--report-year

POST /v1/reporting/medicaid/cms-416

SUPERVISORS

canopy report cms-416 list

[--year --limit --after-report-year --after-age-group]

GET /v1/reporting/medicaid/cms-416

SUPERVISORS

canopy report overpayments

--program snap|tanf|medicaid, [--status], --output <csv>

GET /v1/reporting/overpayments

SUPERVISORS

canopy report runs list

[--kind fns_388|qc_7176|acf_199|tmsis|cms_416 --period YYYY-MM-DD --limit]

GET /v1/reporting/runs

SUPERVISORS

canopy report runs get

<ID>

GET /v1/reporting/runs/{id}

SUPERVISORS

verification — canopy-snap (snap_url) and canopy-persons (persons_url)

Subcommand Key flags Endpoint Access

canopy verification list-discrepancies

--application-id

GET /v1/verification/discrepancies

SNAP_GET_VERIFICATION_DISCREPANCIES (CASE_READER_ROLES via canopy-cli)

canopy verification accept

--discrepancy-id, --household-id, --income-type, --verified-amount, --valid-from, [--frequency monthly] [--fact-id] [--employer-name]

GET /v1/verification/discrepancies/{id} (snap, for its subject), GET /v1/persons/{subject}/income/proposals?discrepancy_id= (a pending proposal’s fact to reuse), POST /v1/persons/{subject}/income/proposals (persons: the income held as a proposal, #2546), then PUT /v1/verification/discrepancies/{id}/resolve (snap) naming household_id (#3103) and the proposal’s fact; canopy-persons applies the income when it consumes that resolution

canopy-snap’s READER, PERSONS_GET_PERSONS_ID_INCOME_PROPOSALS and PERSONS_POST_PERSONS_ID_INCOME_PROPOSALS (via canopy-cli), then canopy-snap’s WRITER (CASEWORKER_WRITER_ROLES, any actor); the proposal and the resolution record the session’s worker

canopy verification reject

--discrepancy-id, --household-id, [--notes]

PUT /v1/verification/discrepancies/{id}/resolve (naming household_id, #3103)

WRITER (CASEWORKER_WRITER_ROLES, any actor); records the session’s worker (#874)

snap — canopy-snap (snap_url)

Subcommand Key flags Endpoint Access

canopy snap determination snapshot

--id

GET /v1/determinations/{id}/snapshot

SNAP_GET_DETERMINATIONS_ID_SNAPSHOT (admin / quality_control, any actor; its via arm lists canopy-eligibility alone)

canopy snap determination hearing-view

--id

GET /v1/determinations/{id}/hearing-view

SNAP_GET_DETERMINATIONS_ID_HEARING_VIEW (CASE_READER_ROLES via canopy-cli)

canopy snap determination redact

--id, --reason

POST /v1/determinations/{id}/redact

user_roles(&["data_steward"]) (any actor)

canopy snap overpayment recompute

<ID>, --correction-as-of YYYY-MM-DD, --claim-basis agency-error|inadvertent-household-error, --discovered-in-qc-review (flag: a quality control review found it, #936)

POST /v1/determinations/{id}/overpayment-recompute

WRITER (CASEWORKER_WRITER_ROLES, any actor)

tanf, medicaid, caps, wic — the program services (<program>_url)

Subcommand Key flags Endpoint Access

canopy tanf determination redact

--id, --reason

POST /v1/determinations/{id}/redact on canopy-tanf

user_roles(&["data_steward"]) (any actor)

canopy medicaid determination redact

--id, --reason

POST /v1/determinations/{id}/redact on canopy-medicaid

user_roles(&["data_steward"]) (any actor)

canopy caps determination redact

--id, --reason

POST /v1/determinations/{id}/redact on canopy-caps

user_roles(&["data_steward"]) (any actor)

canopy wic determination redact

--id, --reason

POST /v1/determinations/{id}/redact on canopy-wic

user_roles(&["data_steward"]) (any actor)

security — canopy-security (security_url)

Subcommand Key flags Endpoint Access

canopy security events

[--source] [--limit 20]

GET /v1/security/events

SECURITY_GET_SECURITY_EVENTS (WORKER_READER_ROLES via canopy-cli)

canopy security event

<ID>

GET /v1/security/events/{id}

SECURITY_GET_SECURITY_EVENTS_ID (AUDIT_READER_ROLES via canopy-cli)

canopy security alerts

[--limit 20]

GET /v1/security/alerts

SECURITY_GET_SECURITY_ALERTS (AUDIT_READER_ROLES via canopy-cli)

canopy security nist-controls

—

GET /v1/security/nist-controls

SECURITY_GET_SECURITY_NIST_CONTROLS (AUDIT_READER_ROLES via canopy-cli)

canopy security summary

—

GET /v1/security/summary

SECURITY_GET_SECURITY_SUMMARY (AUDIT_READER_ROLES via canopy-cli)

canopy security chain-status

--family audit|fti, [--service canopy-tanf|canopy-medicaid]

GET /v1/security/chain/status; exits non-zero on the 503 fail-closed arm

SECURITY_GET_SECURITY_CHAIN_STATUS (WORKER_READER_ROLES via canopy-cli)

canopy security chain-verify

--family, [--service] [--loop tail|scrub|family-full] [--wait]

POST /v1/security/chain/verify; --wait polls GET /v1/security/chain/verify-jobs/{id}

SERVICE_OR_ADMIN (admin, any actor), the enqueue and the poll

canopy security chain-attest

--event-id, --family, [--service]

GET /v1/security/chain/attest; exits non-zero when not attested

SECURITY_GET_SECURITY_CHAIN_ATTEST (AUDIT_READER_ROLES via canopy-cli)

canopy security fact-history

--person, --resource income|asset|expense

GET /v1/security/persons/{person_id}/fact-history/{resource}

SECURITY_GET_SECURITY_PERSONS_PERSON_ID_FACT_HISTORY_RESOURCE (WORKER_READER_ROLES via canopy-cli)

Edit this page · default