All URIs are relative to https://api.bitbucket.org/2.0
Method | HTTP request | Description |
---|---|---|
HookEventsGet | Get /hook_events | |
HookEventsSubjectTypeGet | Get /hook_events/{subject_type} | |
RepositoriesUsernameRepoSlugHooksGet | Get /repositories/{username}/{repo_slug}/hooks | |
RepositoriesUsernameRepoSlugHooksPost | Post /repositories/{username}/{repo_slug}/hooks | |
RepositoriesUsernameRepoSlugHooksUidDelete | Delete /repositories/{username}/{repo_slug}/hooks/{uid} | |
RepositoriesUsernameRepoSlugHooksUidGet | Get /repositories/{username}/{repo_slug}/hooks/{uid} | |
RepositoriesUsernameRepoSlugHooksUidPut | Put /repositories/{username}/{repo_slug}/hooks/{uid} | |
TeamsUsernameHooksGet | Get /teams/{username}/hooks | |
TeamsUsernameHooksPost | Post /teams/{username}/hooks | |
TeamsUsernameHooksUidDelete | Delete /teams/{username}/hooks/{uid} | |
TeamsUsernameHooksUidGet | Get /teams/{username}/hooks/{uid} | |
TeamsUsernameHooksUidPut | Put /teams/{username}/hooks/{uid} | |
UsersUsernameHooksGet | Get /users/{username}/hooks | |
UsersUsernameHooksPost | Post /users/{username}/hooks | |
UsersUsernameHooksUidDelete | Delete /users/{username}/hooks/{uid} | |
UsersUsernameHooksUidGet | Get /users/{username}/hooks/{uid} | |
UsersUsernameHooksUidPut | Put /users/{username}/hooks/{uid} |
SubjectTypes HookEventsGet(ctx, )
Returns the webhook resource or subject types on which webhooks can be registered. Each resource/subject type contains an events
link that returns the paginated list of specific events each individual subject type can emit. This endpoint is publicly accessible and does not require authentication or scopes. Example: $ curl https://api.bitbucket.org/2.0/hook_events { \"repository\": { \"links\": { \"events\": { \"href\": \"https://api.bitbucket.org/2.0/hook_events/repository\" } } }, \"team\": { \"links\": { \"events\": { \"href\": \"https://api.bitbucket.org/2.0/hook_events/team\" } } }, \"user\": { \"links\": { \"events\": { \"href\": \"https://api.bitbucket.org/2.0/hook_events/user\" } } } }
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedHookEvents HookEventsSubjectTypeGet(ctx, subjectType)
Returns a paginated list of all valid webhook events for the specified entity. This is public data that does not require any scopes or authentication. Example: NOTE: The following example is a truncated response object for the team
subject_type
. We return the same structure for the other subject_type
objects. $ curl https://api.bitbucket.org/2.0/hook_events/team { \"page\": 1, \"pagelen\": 30, \"size\": 21, \"values\": [ { \"category\": \"Repository\", \"description\": \"Whenever a repository push occurs\", \"event\": \"repo:push\", \"label\": \"Push\" }, { \"category\": \"Repository\", \"description\": \"Whenever a repository fork occurs\", \"event\": \"repo:fork\", \"label\": \"Fork\" }, ... { \"category\": \"Repository\", \"description\": \"Whenever a repository import occurs\", \"event\": \"repo:imported\", \"label\": \"Import\" } ] }
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
subjectType | string | A resource or subject type. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedWebhookSubscriptions RepositoriesUsernameRepoSlugHooksGet(ctx, username, repoSlug)
Returns a paginated list of webhooks installed on this repository.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | ||
repoSlug | string |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSubscription RepositoriesUsernameRepoSlugHooksPost(ctx, username, repoSlug)
Creates a new webhook on the specified repository. Example: $ curl -X POST -u credentials -H 'Content-Type: application/json' https://api.bitbucket.org/2.0/repositories/username/slug/hooks -d ' { \"description\": \"Webhook Description\", \"url\": \"https://example.com/\", \"active\": true, \"events\": [ \"repo:push\", \"issue:created\", \"issue:updated\" ] }'
Note that this call requires the webhook scope, as well as any scope that applies to the events that the webhook subscribes to. In the example above that means: webhook
, repository
and issue
. Also note that the url
must properly resolve and cannot be an internal, non-routed address.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | ||
repoSlug | string |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepositoriesUsernameRepoSlugHooksUidDelete(ctx, username, repoSlug, uid)
Deletes the specified webhook subscription from the given repository.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | ||
repoSlug | string | ||
uid | string | The installed webhook's id |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSubscription RepositoriesUsernameRepoSlugHooksUidGet(ctx, username, repoSlug, uid)
Returns the webhook with the specified id installed on the specified repository.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | ||
repoSlug | string | ||
uid | string | The installed webhook's id. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSubscription RepositoriesUsernameRepoSlugHooksUidPut(ctx, username, repoSlug, uid)
Updates the specified webhook subscription. The following properties can be mutated: * description
* url
* active
* events
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | ||
repoSlug | string | ||
uid | string | The installed webhook's id |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedWebhookSubscriptions TeamsUsernameHooksGet(ctx, username)
Returns a paginated list of webhooks installed on this team.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSubscription TeamsUsernameHooksPost(ctx, username)
Creates a new webhook on the specified team. Team webhooks are fired for events from all repositories belonging to that team account. Note that only admins can install webhooks on teams.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TeamsUsernameHooksUidDelete(ctx, username, uid)
Deletes the specified webhook subscription from the given team account.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | ||
uid | string | The installed webhook's id |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSubscription TeamsUsernameHooksUidGet(ctx, username, uid)
Returns the webhook with the specified id installed on the given team account.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | ||
uid | string | The installed webhook's id. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSubscription TeamsUsernameHooksUidPut(ctx, username, uid)
Updates the specified webhook subscription. The following properties can be mutated: * description
* url
* active
* events
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | ||
uid | string | The installed webhook's id |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedWebhookSubscriptions UsersUsernameHooksGet(ctx, username)
Returns a paginated list of webhooks installed on this user account. Note that the username path parameter has been deprecated due to privacy changes. Use the account's UUID or account_id instead.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSubscription UsersUsernameHooksPost(ctx, username)
Creates a new webhook on the specified user account. Account-level webhooks are fired for events from all repositories belonging to that account. Note that one can only register webhooks on one's own account, not that of others. Also, note that the username path parameter has been deprecated due to privacy changes. Use the account's UUID or account_id instead.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UsersUsernameHooksUidDelete(ctx, username, uid)
Deletes the specified webhook subscription from the given user account. Note that the username path parameter has been deprecated due to privacy changes. Use the account's UUID or account_id instead.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | ||
uid | string | The installed webhook's id |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSubscription UsersUsernameHooksUidGet(ctx, username, uid)
Returns the webhook with the specified id installed on the given user account. Note that the username path parameter has been deprecated due to privacy changes. Use the account's UUID or account_id instead.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | ||
uid | string | The installed webhook's id. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSubscription UsersUsernameHooksUidPut(ctx, username, uid)
Updates the specified webhook subscription. The following properties can be mutated: * description
* url
* active
* events
Note that the username path parameter has been deprecated due to privacy changes. Use the account's UUID or account_id instead.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
username | string | ||
uid | string | The installed webhook's id |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]