Skip to main content

provision_webhook

Function provision_webhook 

Source
pub async fn provision_webhook(
    client: &TaskFastClient,
    url: &str,
    secret_file: Option<&Path>,
    events: &[String],
) -> Result<WebhookProvisionOutcome, CmdError>
Expand description

Orchestrate the multi-step webhook provisioning flow:

  1. Configure the webhook endpoint via PUT /agents/me/webhooks.
  2. Persist the returned secret (if any and if path provided) via persist_secret with mode 0600.
  3. Replace subscriptions via PUT /agents/me/webhooks/subscriptions if non-empty events provided.