Documentation Reference REST API reference API: webhooks
Reference For: developers
API: webhooks
Operations of the webhooks tag of the native REST API.
Webhook subscriptions
GET /v1/webhooks
Lists subscriptions.
CLI kyvernon webhooks list
Responses
POST /v1/webhooks
Creates a subscription.
CLI kyvernon webhooks create <name> --url <url> --secret <secret>
Request body
application/json: CreateSubscriptionRequest
Name Type Required Description eventTypesarray of string Event types (empty = all). labelsarray of string Labels. maxAttemptsinteger (int32) or nullAttempts per event (default 5). namestringyes Name. secretstringyes Shared secret for X-Kyvernon-Signature (HMAC-SHA256); at least 16 bytes. tenantstring or nullDeliver only the self-service events of this tenant (tenant-N; §5). urlstringyes Target URL (https recommended).
Responses
PUT /v1/webhooks/{id}
Changes a subscription (Kyvernon.Webhook.Manage).
CLI kyvernon webhooks update <id> --body <json>
Parameters
Name In Type Required Description idpath stringyes Id of the webhook subscription
Request body
application/json: UpdateSubscriptionRequest
Name Type Required Description enabledboolean or nullOn or off. eventTypesarray of string or null Event types (empty: all). labelsarray of string or null Labels that alarm actions reference. maxAttemptsinteger (int32) or nullAttempts per event. namestringyes Name. secretstring or nullNew shared secret (at least 16 bytes); absent keeps the stored one. tenantstring or nullTenant filter (tenant-N); null removes it. urlstringyes Target URL (https://; loopback and private addresses need an allow-list entry).
Responses
DELETE /v1/webhooks/{id}
Deletes a subscription.
CLI kyvernon webhooks delete <id>
Parameters
Name In Type Required Description idpath stringyes Id of the webhook subscription
Responses
Status Description Schema 204 Done; no body
GET /v1/webhooks/{id}/dead-letters
Dead letters of a subscription.
CLI kyvernon webhooks dead-letters <id>
Parameters
Name In Type Required Description idpath stringyes Id of the webhook subscription
Responses
GET /v1/webhooks/{id}/deliveries
The delivery log of a subscription: its last deliveries (at most 50), newest first, test deliveries included. Kept in the replicated store with the subscription.
CLI kyvernon webhooks deliveries <id>
Parameters
Name In Type Required Description idpath stringyes Id of the webhook subscription
Responses
POST /v1/webhooks/{id}/test
Sends a test event.
CLI kyvernon webhooks test <id>
Parameters
Name In Type Required Description idpath stringyes Id of the webhook subscription
Responses
Guides
Previous API: vms Next API schemas
Version 0.1.