{ "opencollection": "1.0.0", "info": { "name": "Bitbucket Addon Webhooks API", "version": "2.0" }, "items": [ { "info": { "name": "Webhooks", "type": "folder" }, "items": [ { "info": { "name": "Get a webhook resource", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/hook_events" }, "docs": "Returns the webhook resource or subject types on which webhooks can\nbe registered.\n\nEach resource/subject type contains an `events` link that returns the\npaginated list of specific events each individual subject type can\nemit.\n\nThis endpoint is publicly accessible and does not require\nauthentication or scopes." }, { "info": { "name": "List subscribable webhook types", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/hook_events/:subject_type", "params": [ { "name": "subject_type", "value": "", "type": "path", "description": "A resource or subject type." } ] }, "docs": "Returns a paginated list of all valid webhook events for the\nspecified entity.\n**The team and user webhooks are deprecated, and you should use workspace instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**\n\nThis is public data that does not require any scopes or authentication.\n\nNOTE: The example response is a truncated response object for the `workspace` `subject_type`.\nWe return the same structure for the oth" }, { "info": { "name": "List webhooks for a repository", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/repositories/:workspace/:repo_slug/hooks", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Returns a paginated list of webhooks installed on this repository." }, { "info": { "name": "Create a webhook for a repository", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/repositories/:workspace/:repo_slug/hooks", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Creates a new webhook on the specified repository.\n\nExample:\n\n```\n$ curl -X POST -u credentials -H 'Content-Type: application/json'\n https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo-slug/hooks\n -d '\n {\n \"description\": \"Webhook Description\",\n \"url\": \"https://example.com/\",\n \"active\": true,\n \"secret\": \"this is a really bad secret\",\n \"events\": [\n \"repo:push\",\n \"issue:created\",\n \"issue:updated\"\n ]\n }'\n```\n\nWhen the `secret` is" }, { "info": { "name": "Get a webhook for a repository", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/repositories/:workspace/:repo_slug/hooks/:uid", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "uid", "value": "", "type": "path", "description": "Installed webhook's ID" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Returns the webhook with the specified id installed on the specified\nrepository." }, { "info": { "name": "Update a webhook for a repository", "type": "http" }, "http": { "method": "PUT", "url": "{{baseUrl}}/repositories/:workspace/:repo_slug/hooks/:uid", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "uid", "value": "", "type": "path", "description": "Installed webhook's ID" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `secret`\n* `active`\n* `events`\n\nThe hook's secret is used as a key to generate the HMAC hex digest sent in the\n`X-Hub-Signature` header at delivery time. This signature is only generated\nwhen the hook has a secret.\n\nSet the hook's secret by passing the new value in the `secret` field. Passing a\n`null` value in the `secret` field will remove the secret from the hook. The\nhook's secret " }, { "info": { "name": "Delete a webhook for a repository", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/repositories/:workspace/:repo_slug/hooks/:uid", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "uid", "value": "", "type": "path", "description": "Installed webhook's ID" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Deletes the specified webhook subscription from the given\nrepository." }, { "info": { "name": "List webhooks for a workspace", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/workspaces/:workspace/hooks", "params": [ { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Returns a paginated list of webhooks installed on this workspace." }, { "info": { "name": "Create a webhook for a workspace", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/workspaces/:workspace/hooks", "params": [ { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Creates a new webhook on the specified workspace.\n\nWorkspace webhooks are fired for events from all repositories contained\nby that workspace.\n\nExample:\n\n```\n$ curl -X POST -u credentials -H 'Content-Type: application/json'\n https://api.bitbucket.org/2.0/workspaces/my-workspace/hooks\n -d '\n {\n \"description\": \"Webhook Description\",\n \"url\": \"https://example.com/\",\n \"active\": true,\n \"secret\": \"this is a really bad secret\",\n \"events\": [\n \"repo:push\",\n \"issu" }, { "info": { "name": "Get a webhook for a workspace", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/workspaces/:workspace/hooks/:uid", "params": [ { "name": "uid", "value": "", "type": "path", "description": "Installed webhook's ID" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Returns the webhook with the specified id installed on the given\nworkspace." }, { "info": { "name": "Update a webhook for a workspace", "type": "http" }, "http": { "method": "PUT", "url": "{{baseUrl}}/workspaces/:workspace/hooks/:uid", "params": [ { "name": "uid", "value": "", "type": "path", "description": "Installed webhook's ID" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `secret`\n* `active`\n* `events`\n\nThe hook's secret is used as a key to generate the HMAC hex digest sent in the\n`X-Hub-Signature` header at delivery time. This signature is only generated\nwhen the hook has a secret.\n\nSet the hook's secret by passing the new value in the `secret` field. Passing a\n`null` value in the `secret` field will remove the secret from the hook. The\nhook's secret " }, { "info": { "name": "Delete a webhook for a workspace", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/workspaces/:workspace/hooks/:uid", "params": [ { "name": "uid", "value": "", "type": "path", "description": "Installed webhook's ID" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Deletes the specified webhook subscription from the given workspace." } ] } ], "bundled": true }