Webhooks API
9 endpoints. Request and response schemas are described on the schemas page; the other tags are listed in the API index.
Endpoints
GET /api/v1/repositories/{name}/webhooks
List repository webhooks
List webhooks for a specific repository
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes | - |
Responses
| Status | Description | Body |
|---|---|---|
200 | List of webhooks | application/json: object |
400 | Invalid request, including a NUL byte in the URL or the body | application/json: Error |
403 | Forbidden | application/json: Error |
404 | Repository not found | - |
Fields of the 200 response (application/json):
| Field | Type | Required | Description |
|---|---|---|---|
webhooks | array of Webhook | no | - |
POST /api/v1/repositories/{name}/webhooks
Create repository webhook
Create a new webhook for a repository
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes | - |
Request body (required)
application/json: object
| Field | Type | Required | Description |
|---|---|---|---|
content_type | string | no | - |
enabled | boolean | no | - |
events | array of string | yes | Items: one of: artifact.uploaded, artifact.deleted, repository.created, repository.deleted, artifact.restored, artifact.purged, repository.restored, repository.purged, bundle.promoted. |
max_retries | integer | no | - |
name | string | yes | - |
payload_format | string | no | Delivery body format. openartifact is the native JSON; cloudevents is CloudEvents 1.0 structured mode (application/cloudevents+json); slack, teams and discord are the services' incoming-webhook shapes. One of: openartifact, cloudevents, slack, teams, discord. Default: openartifact. |
secret | string | no | - |
ssl_verify | boolean | no | - |
timeout_seconds | integer | no | - |
url | string (uri) | yes | - |
Responses
| Status | Description | Body |
|---|---|---|
201 | Webhook created | application/json: Webhook |
400 | Invalid request | application/json: Error |
403 | Forbidden | application/json: Error |
404 | Repository or addressed resource not found | application/json: Error |
GET /api/v1/webhooks
List webhooks
List all webhooks
Responses
| Status | Description | Body |
|---|---|---|
200 | List of webhooks | application/json: object |
403 | Forbidden | application/json: Error |
Fields of the 200 response (application/json):
| Field | Type | Required | Description |
|---|---|---|---|
webhooks | array of Webhook | no | - |
POST /api/v1/webhooks
Create webhook
Create a new webhook
Request body (required)
application/json: object
| Field | Type | Required | Description |
|---|---|---|---|
content_type | string | no | - |
enabled | boolean | no | - |
events | array of string | yes | Items: one of: artifact.uploaded, artifact.deleted, repository.created, repository.deleted, artifact.restored, artifact.purged, repository.restored, repository.purged, bundle.promoted. |
max_retries | integer | no | - |
name | string | yes | - |
payload_format | string | no | Delivery body format. openartifact is the native JSON; cloudevents is CloudEvents 1.0 structured mode (application/cloudevents+json); slack, teams and discord are the services' incoming-webhook shapes. One of: openartifact, cloudevents, slack, teams, discord. Default: openartifact. |
secret | string | no | - |
ssl_verify | boolean | no | - |
timeout_seconds | integer | no | - |
url | string (uri) | yes | - |
Responses
| Status | Description | Body |
|---|---|---|
201 | Webhook created | application/json: Webhook |
400 | Invalid request | application/json: Error |
403 | Forbidden | application/json: Error |
GET /api/v1/webhooks/{id}
Get webhook
Get details of a specific webhook
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | yes | - |
Responses
| Status | Description | Body |
|---|---|---|
200 | Webhook details | application/json: Webhook |
400 | Invalid request, including a NUL byte in the URL or the body | application/json: Error |
403 | Forbidden | application/json: Error |
404 | Webhook not found | - |
PUT /api/v1/webhooks/{id}
Update webhook
Update a webhook
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | yes | - |
Request body (required)
application/json: object
| Field | Type | Required | Description |
|---|---|---|---|
content_type | string | no | - |
enabled | boolean | no | - |
events | array of string | no | Items: one of: artifact.uploaded, artifact.deleted, repository.created, repository.deleted, artifact.restored, artifact.purged, repository.restored, repository.purged, bundle.promoted. |
max_retries | integer | no | - |
name | string | no | - |
payload_format | string | no | Delivery body format. openartifact is the native JSON; cloudevents is CloudEvents 1.0 structured mode (application/cloudevents+json); slack, teams and discord are the services' incoming-webhook shapes. One of: openartifact, cloudevents, slack, teams, discord. Default: openartifact. |
secret | string | no | - |
ssl_verify | boolean | no | - |
timeout_seconds | integer | no | - |
url | string (uri) | no | - |
Responses
| Status | Description | Body |
|---|---|---|
200 | Webhook updated | application/json: Webhook |
400 | Invalid request | application/json: Error |
403 | Forbidden | application/json: Error |
404 | Webhook not found | - |
DELETE /api/v1/webhooks/{id}
Delete webhook
Delete a webhook
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | yes | - |
Responses
| Status | Description | Body |
|---|---|---|
204 | Webhook deleted | - |
400 | Invalid request, including a NUL byte in the URL or the body | application/json: Error |
403 | Forbidden | application/json: Error |
404 | Webhook not found | - |
GET /api/v1/webhooks/{id}/deliveries
List webhook deliveries
List deliveries for a specific webhook
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | yes | - |
Responses
| Status | Description | Body |
|---|---|---|
200 | List of deliveries | application/json: object |
400 | Invalid request, including a NUL byte in the URL or the body | application/json: Error |
403 | Forbidden | application/json: Error |
404 | Webhook not found | - |
Fields of the 200 response (application/json):
| Field | Type | Required | Description |
|---|---|---|---|
deliveries | array of WebhookDelivery | no | - |
POST /api/v1/webhooks/{id}/test
Test webhook
Send a test event to a webhook
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | yes | - |
Responses
| Status | Description | Body |
|---|---|---|
200 | Test event queued | application/json: object |
400 | Invalid request, including a NUL byte in the URL or the body | application/json: Error |
404 | Webhook not found | - |
Fields of the 200 response (application/json):
| Field | Type | Required | Description |
|---|---|---|---|
message | string | no | - |