exports

Add an envelope-encrypted delivery destination to a schedule.

Creates an export destination for a non-email delivery channel (Slack incoming webhook for MVP — DVT-729). Requires dashboard:write. Not available on xlsx/csv schedules (400): those are attached to email only and never stored, so a channel has nothing to link to.

The plaintext webhook URL is envelope-encrypted by the engine broker (AES-256-GCM, per-row DEK, AAD bound to the destination id and org — ADR-0051 §4, ADR-0012). Go never persists or logs the plaintext URL. Only the ciphertext is stored.

Strict URL validation: scheme must be https, host must be exactly hooks.slack.com (no port, no userinfo, no suffix), path must be non-empty.

On its tick the export runner (DVT-727) decrypts the URL on the engine and posts a Block Kit message to the channel (DVT-729). A duplicate (schedule_id, kind, label) is rejected with 409 to prevent duplicate posts per tick (DVT-744). Returns the read projection (id, scheduleId, kind, label, lastStatus); secret columns are never serialised.

post/v1/dashboards/{id}/export-schedules/{sid}/destinations

Request

  • Base URL: http://localhost:8080
  • URL: http://localhost:8080/v1/dashboards/{id}/export-schedules/{sid}/destinations
  • Auth: one of:
    • API key in cookie dvt_session
    • HTTP bearer

Request body

kind'slack_webhook' | 'teams_workflows' | 'google_chat' required

Destination type. One of slack_webhook (Slack incoming webhook), teams_workflows (Microsoft Teams / Power Automate workflow webhook), or google_chat (Google Chat incoming webhook).

labelstring required

Friendly channel label shown in the UI, e.g. "#leadership".

webhookUrlstring uri required

Incoming-webhook URL. Host rules vary by kind (ADR-0051 §9):

  • slack_webhook: must be https://hooks.slack.com/services/… (no port, non-empty path).
  • teams_workflows: host must end with .logic.azure.com at a label boundary (e.g. prod.westus.logic.azure.com); port must be absent or 443; path must start with /workflows/.
  • google_chat: must be https://chat.googleapis.com/v1/spaces/… (no port). Stored encrypted (write-only) — never returned on any read path.

Response

Destination created.

Changes

No recorded changes to this operation across all 1 revision of this API.