Developer
News and Updates
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
  • Addon
  • Branch restrictions
  • Branching model
  • Commit statuses
  • Commits
  • Deployments
  • Downloads
  • GPG
  • Pipelines
  • Projects
  • Pullrequests
  • Refs
  • Reports
  • Repositories
  • SSH
  • Snippets
  • Source
  • Users
  • Webhooks
  • Workspaces
  • Other operations
Cloud
Bitbucket Cloud / Reference / REST APIs

Workspaces

Postman Collection
OpenAPI
GET

List workspaces for the current user

Returns an object for each workspace accessible to the caller. This object also contains details on whether the caller has admin permissions on the workspace ("administrator" = true) or not ("administrator" = false).

Queries support filtering based on administrator permissions, sorting or filtering by slug. Results can be paginated.

Scopes
account
read:workspace:bitbucket

Request

Query parameters

sort

string

administrator

boolean

Responses

The list of workspaces accessible by the authenticated user.

application/json

Paginated Workspace Permissions

A paginated list of workspace permissions.

GET/user/workspaces
1 2 3 4 curl --request GET \ --url 'https://api.bitbucket.org/2.0/user/workspaces' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 { "pagelen": 25, "page": 1, "size": 1, "values": [ { "administrator": true, "type": "workspace_access", "workspace": { "links": { "avatar": { "href": "https://api.bitbucket.org/workspaces/bbworkspace1/avatar/" }, "self": { "href": "https://api.bitbucket.org/2.0/workspaces/bbworkspace1" } }, "slug": "bbworkspace1", "type": "workspace_base", "uuid": "{470c176d-3574-44ea-bb41-89e8638bcca4}" } } ] }
GET

Get user permission on a workspace

Returns the caller's effective role; as in, the highest level of privilege the caller has for the workspace. If the calling user is a member of multiple groups with distinct roles, only the highest level is returned.

Permissions can be:

Scopes
account
read:workspace:bitbucket

Request