Workspaces 7 endpoints

PUT /workspaces/{workspace}/hooks/{uid}

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.

operationId: Workspaces_updateWebhook

Parameters

Name In Required Type Description
uid path required string

Installed webhook’s ID

workspace path required string

This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}.

Responses

200

The webhook subscription object.

403

If the authenticated user does not have permission to update the webhook.

404

If the webhook or workspace does not exist.

PUT /workspaces/{workspace}/hooks/{uid}
GET /workspaces/{workspace}/members

Returns all members of the requested workspace.

operationId: Workspaces_listMembers

Parameters

Name In Required Type Description
workspace path required string

This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}.

Responses

200

The list of users that are part of a workspace.

401

The request wasn’t authenticated.

GET /workspaces/{workspace}/members
GET /workspaces/{workspace}/members/{member}

Returns the workspace membership, which includes
a User object for the member and a Workspace object
for the requested workspace.

operationId: Workspaces_getUserMembership

Parameters

Name In Required Type Description
member path required string

Member’s UUID or Atlassian ID.

workspace path required string

This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}.

Responses

200

The user that is part of a workspace.

401

The request wasn’t authenticated.

404

A workspace cannot be found, or a user cannot be found, or the user is not a a member of the workspace.

GET /workspaces/{workspace}/members/{member}
GET /workspaces/{workspace}/permissions

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"
operationId: Workspaces_listPermissions

Parameters

Name In Required Type Description
workspace path required string

This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}.

q query optional string

Query string to narrow down the response as per
filtering and sorting.

Responses

200

The list of users that are part of a workspace, along with their permission.

401

The request wasn’t authenticated.

GET /workspaces/{workspace}/permissions
GET /workspaces/{workspace}/permissions/repositories

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.

operationId: Workspaces_listRepositoryPermissions

Parameters

Name In Required Type Description
workspace path required string

This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}.

q query optional string

Query string to narrow down the response as per
filtering and sorting.

sort query optional string

Name of a response property sort the result by as per
filtering and sorting.

Responses

200

List of workspace’s repository permissions.

403

The requesting user isn’t an admin of the workspace.

GET /workspaces/{workspace}/permissions/repositories
GET /workspaces/{workspace}/permissions/repositories/{repo_slug}

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.

operationId: Workspaces_listRepositoryPermissions

Parameters

Name In Required Type Description
repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}.

q query optional string

Query string to narrow down the response as per
filtering and sorting.

sort query optional string

Name of a response property sort the result by as per
filtering and sorting.

Responses

200

The repository permission for all users in this repository.

403

The requesting user isn’t an admin of the repository.

GET /workspaces/{workspace}/permissions/repositories/{repo_slug}
GET /workspaces/{workspace}/projects

Returns the list of projects in this workspace.

operationId: Workspaces_listProjects

Parameters

Name In Required Type Description
workspace path required string

This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}.

Responses

200

The list of projects in this workspace.

404

A workspace doesn’t exist at this location.

GET /workspaces/{workspace}/projects