Declare the Snowflake role the shared dispatcher task runs as for this org (DVT-4797).
Records an admin's own choice of role so dvt can render it back into the admin setup SQL and compare it against what a run actually reports (roleMismatch on GET /v1/email-dispatcher). dvt never chooses this role itself (ADR-0069) — this endpoint only RECORDS the admin's declaration; the admin still runs the setup SQL by hand to actually create/own the role in Snowflake.
Requires schedule:activate (D8, admin-ranked) — the same capability POST .../activate needs — checked explicitly. Same 404-feature-disabled gate as the rest of the email-schedule group.
Every validation (role shape, this install's application name, ?warehouse=) runs BEFORE the declared role is written (DVT-4797 r1, M-2) — none of the failure responses below can fire anymore after the write has already happened. The 200 response is rendered from the write's own result, with no separate read after it.
Request
- Base URL: http://localhost:8080
- URL: http://localhost:8080/v1/email-dispatcher
- Auth: one of:
- API key in cookie dvt_session
- HTTP bearer
Query parameters
Same as GET /v1/email-dispatcher's ?warehouse=: renders adminSetupSql in the response with a real warehouse instead of the <your_warehouse> placeholder. Validated the same way, before the declared role is written.
Request body
Response
The declared role was recorded. The updated dispatcher state and admin setup statements.
Changes
No recorded changes to this operation across all 1 revision of this API.