All URIs are relative to https://api.bitbucket.org/2.0
Method | HTTP request | Description |
---|---|---|
UserPermissionsWorkspacesGet | Get /user/permissions/workspaces | List workspaces for the current user |
WorkspacesGet | Get /workspaces | List workspaces for user |
WorkspacesWorkspaceGet | Get /workspaces/{workspace} | Get a workspace |
WorkspacesWorkspaceHooksGet | Get /workspaces/{workspace}/hooks | List webhooks for a workspace |
WorkspacesWorkspaceHooksPost | Post /workspaces/{workspace}/hooks | Create a webhook for a workspace |
WorkspacesWorkspaceHooksUidDelete | Delete /workspaces/{workspace}/hooks/{uid} | Delete a webhook for a workspace |
WorkspacesWorkspaceHooksUidGet | Get /workspaces/{workspace}/hooks/{uid} | Get a webhook for a workspace |
WorkspacesWorkspaceHooksUidPut | Put /workspaces/{workspace}/hooks/{uid} | Update a webhook for a workspace |
WorkspacesWorkspaceMembersGet | Get /workspaces/{workspace}/members | List users in a workspace |
WorkspacesWorkspaceMembersMemberGet | Get /workspaces/{workspace}/members/{member} | Get user membership for a workspace |
WorkspacesWorkspacePermissionsGet | Get /workspaces/{workspace}/permissions | List user permissions in a workspace |
WorkspacesWorkspacePermissionsRepositoriesGet | Get /workspaces/{workspace}/permissions/repositories | List all repository permissions for a workspace |
WorkspacesWorkspacePermissionsRepositoriesRepoSlugGet | Get /workspaces/{workspace}/permissions/repositories/{repo_slug} | List a repository permissions for a workspace |
WorkspacesWorkspaceProjectsGet | Get /workspaces/{workspace}/projects | List projects in a workspace |
WorkspacesWorkspaceProjectsProjectKeyGet | Get /workspaces/{workspace}/projects/{project_key} | Get a project for a workspace |
PaginatedWorkspaceMemberships UserPermissionsWorkspacesGet(ctx, optional) List workspaces for the current user
Returns an object for each workspace the caller is a member of, and their effective role - the highest level of privilege the caller has. If a user is a member of multiple groups with distinct roles, only the highest level is returned. Permissions can be: * owner
* collaborator
* member
The collaborator
role is being removed from the Bitbucket Cloud API. For more information, see the deprecation announcement. When you move your administration from Bitbucket Cloud to admin.atlassian.com, the following fields on workspace_membership
will no longer be present: last_accessed
and added_on
. See the deprecation announcement. Results may be further filtered or sorted by workspace or permission by adding the following query string parameters: * q=workspace.slug=\"bbworkspace1\"
or q=permission=\"owner\"
* sort=workspace.slug
Note that the query parameter values need to be URL escaped so that =
would become %3D
.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *WorkspacesApiUserPermissionsWorkspacesGetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a WorkspacesApiUserPermissionsWorkspacesGetOpts struct
Name | Type | Description | Notes |
---|---|---|---|
q | optional.String | Query string to narrow down the response. See filtering and sorting for details. | |
sort | optional.String | Name of a response property to sort results. See filtering and sorting for details. | |
page | optional.Int32 | page |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedWorkspaces WorkspacesGet(ctx, optional) List workspaces for user
Returns a list of workspaces accessible by the authenticated user. Results may be further filtered or sorted by workspace or permission by adding the following query string parameters: * q=slug=\"bbworkspace1\"
or q=is_private=true
* sort=created_on
Note that the query parameter values need to be URL escaped so that =
would become %3D
. The collaborator
role is being removed from the Bitbucket Cloud API. For more information, see the deprecation announcement.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *WorkspacesApiWorkspacesGetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a WorkspacesApiWorkspacesGetOpts struct
Name | Type | Description | Notes |
---|---|---|---|
role | optional.String | Filters the workspaces based on the authenticated user's role on each workspace. * member: returns a list of all the workspaces which the caller is a member of at least one workspace group or repository * collaborator: returns a list of workspaces which the caller has write access to at least one repository in the workspace * owner: returns a list of workspaces which the caller has administrator access | |
q | optional.String | Query string to narrow down the response. See filtering and sorting for details. | |
sort | optional.String | Name of a response property to sort results. See filtering and sorting for details. | |
page | optional.Int32 | page |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Workspace WorkspacesWorkspaceGet(ctx, workspace) Get a workspace
Returns the requested workspace.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedWebhookSubscriptions WorkspacesWorkspaceHooksGet(ctx, workspace, optional) List webhooks for a workspace
Returns a paginated list of webhooks installed on this workspace.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | |
optional | *WorkspacesApiWorkspacesWorkspaceHooksGetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a WorkspacesApiWorkspacesWorkspaceHooksGetOpts struct
Name | Type | Description | Notes |
---|
page | optional.Int32| page |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSubscription WorkspacesWorkspaceHooksPost(ctx, workspace) Create a webhook for a workspace
Creates a new webhook on the specified workspace. Workspace webhooks are fired for events from all repositories contained by that workspace. Example: $ curl -X POST -u credentials -H 'Content-Type: application/json' https://api.bitbucket.org/2.0/workspaces/my-workspace/hooks -d ' { \"description\": \"Webhook Description\", \"url\": \"https://example.com/\", \"active\": true, \"secret\": \"this is a really bad secret\", \"events\": [ \"repo:push\", \"issue:created\", \"issue:updated\" ] }'
When the secret
is provided it will be used as the key to generate a HMAC digest value sent in the X-Hub-Signature
header at delivery time. Passing a null
or empty secret
or not passing a secret
will leave the webhook's secret unset. Bitbucket only generates the X-Hub-Signature
when the webhook's secret is set. 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
. The url
must properly resolve and cannot be an internal, non-routed address. Only workspace owners can install webhooks on workspaces.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkspacesWorkspaceHooksUidDelete(ctx, uid, workspace) Delete a webhook for a workspace
Deletes the specified webhook subscription from the given workspace.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
uid | string | Installed webhook's ID | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSubscription WorkspacesWorkspaceHooksUidGet(ctx, uid, workspace) Get a webhook for a workspace
Returns the webhook with the specified id installed on the given workspace.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
uid | string | Installed webhook's ID | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSubscription WorkspacesWorkspaceHooksUidPut(ctx, uid, workspace) Update a webhook for a workspace
Updates the specified webhook subscription. The following properties can be mutated: * description
* url
* secret
* active
* events
The hook's secret is used as a key to generate the HMAC hex digest sent in the X-Hub-Signature
header at delivery time. This signature is only generated when the hook has a secret. Set the hook's secret by passing the new value in the secret
field. Passing a null
value in the secret
field will remove the secret from the hook. The hook's secret can be left unchanged by not passing the secret
field in the request.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
uid | string | Installed webhook's ID | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedWorkspaceMemberships WorkspacesWorkspaceMembersGet(ctx, workspace, optional) List users in a workspace
Returns all members of the requested workspace.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | |
optional | *WorkspacesApiWorkspacesWorkspaceMembersGetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a WorkspacesApiWorkspacesWorkspaceMembersGetOpts struct
Name | Type | Description | Notes |
---|
page | optional.Int32| page |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkspaceMembership WorkspacesWorkspaceMembersMemberGet(ctx, member, workspace) Get user membership for a workspace
Returns the workspace membership, which includes a User
object for the member and a Workspace
object for the requested workspace.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
member | string | Member's UUID or Atlassian ID. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedWorkspaceMemberships WorkspacesWorkspacePermissionsGet(ctx, workspace, optional) List user permissions in a workspace
Returns the list of members in a workspace and their permission levels. Permission can be: * owner
* collaborator
* member
The collaborator
role is being removed from the Bitbucket Cloud API. For more information, see the deprecation announcement. When you move your administration from Bitbucket Cloud to admin.atlassian.com, the following fields on workspace_membership
will no longer be present: last_accessed
and added_on
. See the deprecation announcement. Results may be further filtered by permission by adding the following query string parameters: * q=permission=\"owner\"
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | |
optional | *WorkspacesApiWorkspacesWorkspacePermissionsGetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a WorkspacesApiWorkspacesWorkspacePermissionsGetOpts struct
Name | Type | Description | Notes |
---|
q | optional.String| Query string to narrow down the response as per filtering and sorting. | page | optional.Int32| page |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedRepositoryPermissions WorkspacesWorkspacePermissionsRepositoriesGet(ctx, workspace, optional) List all repository permissions for a workspace
Returns an object for each repository permission for all of a workspace's repositories. Permissions returned are effective permissions: the highest level of permission the user has. This does not distinguish between direct and indirect (group) privileges. Only users with admin permission for the team may access this resource. Permissions can be: * admin
* write
* read
Results may be further filtered or sorted by repository, user, or permission by adding the following query string parameters: * q=repository.name=\"geordi\"
or q=permission>\"read\"
* sort=user.display_name
Note that the query parameter values need to be URL escaped so that =
would become %3D
.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | |
optional | *WorkspacesApiWorkspacesWorkspacePermissionsRepositoriesGetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a WorkspacesApiWorkspacesWorkspacePermissionsRepositoriesGetOpts struct
Name | Type | Description | Notes |
---|
q | optional.String| Query string to narrow down the response as per filtering and sorting. | sort | optional.String| Name of a response property sort the result by as per filtering and sorting. | page | optional.Int32| page |
PaginatedRepositoryPermissions
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedRepositoryPermissions WorkspacesWorkspacePermissionsRepositoriesRepoSlugGet(ctx, repoSlug, workspace, optional) List a repository permissions for a workspace
Returns an object for the repository permission of each user in the requested repository. Permissions returned are effective permissions: the highest level of permission the user has. This does not distinguish between direct and indirect (group) privileges. Only users with admin permission for the repository may access this resource. Permissions can be: * admin
* write
* read
Results may be further filtered or sorted by user, or permission by adding the following query string parameters: * q=permission>\"read\"
* sort=user.display_name
Note that the query parameter values need to be URL escaped so that =
would become %3D
.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
repoSlug | string | This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | |
optional | *WorkspacesApiWorkspacesWorkspacePermissionsRepositoriesRepoSlugGetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a WorkspacesApiWorkspacesWorkspacePermissionsRepositoriesRepoSlugGetOpts struct
Name | Type | Description | Notes |
---|
q | optional.String| Query string to narrow down the response as per filtering and sorting. | sort | optional.String| Name of a response property sort the result by as per filtering and sorting. | page | optional.Int32| page |
PaginatedRepositoryPermissions
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedProjects WorkspacesWorkspaceProjectsGet(ctx, workspace, optional) List projects in a workspace
Returns the list of projects in this workspace.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. | |
optional | *WorkspacesApiWorkspacesWorkspaceProjectsGetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a WorkspacesApiWorkspacesWorkspaceProjectsGetOpts struct
Name | Type | Description | Notes |
---|
page | optional.Int32| page |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Project WorkspacesWorkspaceProjectsProjectKeyGet(ctx, projectKey, workspace) Get a project for a workspace
Returns the requested project.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project in question. This is the actual `key` assigned to the project. | |
workspace | string | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]