Description

Webhook receiver for Bitbucket to request or update the archival of a repository when new commits are pushed to it.

To add such webhook to one of your git repository hosted on Bitbucket, please follow Bitbucket's webhooks guide.

The expected content type for the webhook payload must be application/json.

Please not that to avoid abusing the archival service offered by Software Heritage at most one request per hour is created so the effective loading of the repository into the archive might be delayed.


URL Allowed Methods

https://archive.softwareheritage.org/api/1/origin/save/webhook/bitbucket/

HEAD, OPTIONS, POST

Returns

object

an object containing the following keys:

  • id (number): the save request identifier

  • request_url (string): Web API URL to follow up on that request

  • origin_url (string): the url of the origin to save

  • visit_type (string): the type of visit to perform

  • save_request_date (string): the date (in iso format) the save request was issued

  • save_request_status (string): the status of the save request, either accepted, rejected or pending

  • save_task_status (string): the status of the origin saving task, either not created, pending, scheduled, running, succeeded or failed

  • save_task_next_run (string): the date and time from which the request is executed


HTTP status codes

200

save request for repository has been successfully created from the webhook payload.

400

no save request has been created due to invalid POST request or missing data in webhook payload


back to top