pub struct WebhooksApi { /* private fields */ }Expand description
Webhook subscriptions
Implementations§
Source§impl WebhooksApi
impl WebhooksApi
Sourcepub async fn create(
&self,
body: &CreateWebhookRequest,
) -> Result<WebhookSubscription>
pub async fn create( &self, body: &CreateWebhookRequest, ) -> Result<WebhookSubscription>
Create a webhook subscription
POST /api/v1/webhooks
Required scopes: webhooks:write.
Sourcepub async fn delete(&self, webhook_id: &str) -> Result<DeleteWebhookResponse>
pub async fn delete(&self, webhook_id: &str) -> Result<DeleteWebhookResponse>
Delete a webhook subscription
DELETE /api/v1/webhooks/{webhookId}
Required scopes: webhooks:write.
Sourcepub async fn get(&self, webhook_id: &str) -> Result<WebhookSubscription>
pub async fn get(&self, webhook_id: &str) -> Result<WebhookSubscription>
Get a webhook subscription
GET /api/v1/webhooks/{webhookId}
Required scopes: webhooks:read.
Sourcepub async fn list(&self) -> Result<ListWebhooksResponse>
pub async fn list(&self) -> Result<ListWebhooksResponse>
List webhook subscriptions
GET /api/v1/webhooks
Required scopes: webhooks:read.
Sourcepub async fn list_webhook_deliveries(
&self,
webhook_id: &str,
) -> Result<ListWebhookDeliveriesResponse>
pub async fn list_webhook_deliveries( &self, webhook_id: &str, ) -> Result<ListWebhookDeliveriesResponse>
List webhook deliveries
GET /api/v1/webhooks/{webhookId}/deliveries
Required scopes: webhooks:read.
Sourcepub async fn sensor_webhook(
&self,
webhook_id: &str,
body: &Map<String, Value>,
params: &SensorWebhookParams,
) -> Result<SensorWebhookResponse>
pub async fn sensor_webhook( &self, webhook_id: &str, body: &Map<String, Value>, params: &SensorWebhookParams, ) -> Result<SensorWebhookResponse>
Sensor webhook (HMAC-authenticated, triggers an agent run)
External-system webhook. Bypasses normal auth — X-Sensor-Signature header is HMAC-verified
against the per-subscription secret. On valid signature, fires an agent run with the request
body as input.
POST /api/v1/webhooks/sensor/{webhookId}
Sourcepub async fn test_webhook(
&self,
webhook_id: &str,
) -> Result<TestWebhookResponse>
pub async fn test_webhook( &self, webhook_id: &str, ) -> Result<TestWebhookResponse>
Send test delivery
Dispatch one synthetic event to this subscription’s receiver, so an operator can confirm the endpoint works before relying on it.
Only an active subscription is delivered to — WebhookManager.dispatch filters on
status and silently matches nothing otherwise. A disabled subscription therefore answers
422, not 200: until 2026-08-20 it answered {"test_sent": true} with nothing sent, no
delivery row written and no dispatch line in the server log, which turns a misconfigured
integration into a confirmed one.
POST /api/v1/webhooks/{webhookId}/test
Required scopes: webhooks:write.
Trait Implementations§
Source§impl Clone for WebhooksApi
impl Clone for WebhooksApi
Source§fn clone(&self) -> WebhooksApi
fn clone(&self) -> WebhooksApi
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more