Skip to content

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

NameInTypeRequiredDescription
namepathstringyes-

Responses

StatusDescriptionBody
200List of webhooksapplication/json: object
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error
404Repository not found-

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
webhooksarray of Webhookno-

POST /api/v1/repositories/{name}/webhooks ​

Create repository webhook

Create a new webhook for a repository

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Request body (required)

application/json: object

FieldTypeRequiredDescription
content_typestringno-
enabledbooleanno-
eventsarray of stringyesItems: one of: artifact.uploaded, artifact.deleted, repository.created, repository.deleted, artifact.restored, artifact.purged, repository.restored, repository.purged, bundle.promoted.
max_retriesintegerno-
namestringyes-
payload_formatstringnoDelivery 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.
secretstringno-
ssl_verifybooleanno-
timeout_secondsintegerno-
urlstring (uri)yes-

Responses

StatusDescriptionBody
201Webhook createdapplication/json: Webhook
400Invalid requestapplication/json: Error
403Forbiddenapplication/json: Error
404Repository or addressed resource not foundapplication/json: Error

GET /api/v1/webhooks ​

List webhooks

List all webhooks

Responses

StatusDescriptionBody
200List of webhooksapplication/json: object
403Forbiddenapplication/json: Error

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
webhooksarray of Webhookno-

POST /api/v1/webhooks ​

Create webhook

Create a new webhook

Request body (required)

application/json: object

FieldTypeRequiredDescription
content_typestringno-
enabledbooleanno-
eventsarray of stringyesItems: one of: artifact.uploaded, artifact.deleted, repository.created, repository.deleted, artifact.restored, artifact.purged, repository.restored, repository.purged, bundle.promoted.
max_retriesintegerno-
namestringyes-
payload_formatstringnoDelivery 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.
secretstringno-
ssl_verifybooleanno-
timeout_secondsintegerno-
urlstring (uri)yes-

Responses

StatusDescriptionBody
201Webhook createdapplication/json: Webhook
400Invalid requestapplication/json: Error
403Forbiddenapplication/json: Error

GET /api/v1/webhooks/{id} ​

Get webhook

Get details of a specific webhook

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Responses

StatusDescriptionBody
200Webhook detailsapplication/json: Webhook
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error
404Webhook not found-

PUT /api/v1/webhooks/{id} ​

Update webhook

Update a webhook

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Request body (required)

application/json: object

FieldTypeRequiredDescription
content_typestringno-
enabledbooleanno-
eventsarray of stringnoItems: one of: artifact.uploaded, artifact.deleted, repository.created, repository.deleted, artifact.restored, artifact.purged, repository.restored, repository.purged, bundle.promoted.
max_retriesintegerno-
namestringno-
payload_formatstringnoDelivery 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.
secretstringno-
ssl_verifybooleanno-
timeout_secondsintegerno-
urlstring (uri)no-

Responses

StatusDescriptionBody
200Webhook updatedapplication/json: Webhook
400Invalid requestapplication/json: Error
403Forbiddenapplication/json: Error
404Webhook not found-

DELETE /api/v1/webhooks/{id} ​

Delete webhook

Delete a webhook

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Responses

StatusDescriptionBody
204Webhook deleted-
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error
404Webhook not found-

GET /api/v1/webhooks/{id}/deliveries ​

List webhook deliveries

List deliveries for a specific webhook

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Responses

StatusDescriptionBody
200List of deliveriesapplication/json: object
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error
404Webhook not found-

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
deliveriesarray of WebhookDeliveryno-

POST /api/v1/webhooks/{id}/test ​

Test webhook

Send a test event to a webhook

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Responses

StatusDescriptionBody
200Test event queuedapplication/json: object
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
404Webhook not found-

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
messagestringno-

Free software under the AGPL-3.0-or-later.