Bitbucket Workspaces API

A workspace is where you create repositories, collaborate on your code, and organize different streams of work in your Bitbucket Cloud account. Workspaces replace the use of teams and users in API calls.

Operations 18

GET /user/permissions/workspaces List workspaces for the current user
GET /user/workspaces List workspaces for the current user
GET /user/workspaces/{workspace}/permission Get user permission on a workspace
GET /workspaces List workspaces for user
GET /workspaces/{workspace} Get a workspace
GET /workspaces/{workspace}/hooks List webhooks for a workspace
POST /workspaces/{workspace}/hooks Create a webhook for a workspace
DELETE /workspaces/{workspace}/hooks/{uid} Delete a webhook for a workspace
GET /workspaces/{workspace}/hooks/{uid} Get a webhook for a workspace
PUT /workspaces/{workspace}/hooks/{uid} Update a webhook for a workspace
GET /workspaces/{workspace}/members List users in a workspace
GET /workspaces/{workspace}/members/{member} Get user membership for a workspace
GET /workspaces/{workspace}/permissions List user permissions in a workspace
GET /workspaces/{workspace}/permissions/repositories List all repository permissions for a workspace
GET /workspaces/{workspace}/permissions/repositories/{repo_slug} List a repository permissions for a workspace
GET /workspaces/{workspace}/projects List projects in a workspace
GET /workspaces/{workspace}/projects/{project_key} Get a project for a workspace
GET /workspaces/{workspace}/pullrequests/{selected_user} List workspace pull requests for a user

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/bitbucket-workspaces-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

bitbucket-workspaces-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Bitbucket Addon Workspaces API
  description: Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework.
  version: '2.0'
  termsOfService: https://www.atlassian.com/legal/customer-agreement
  contact:
    name: Bitbucket Support
    url: https://support.atlassian.com/bitbucket-cloud/
    email: support@bitbucket.org
servers:
- url: https://api.bitbucket.org/2.0
tags:
- name: Workspaces
  description: 'A workspace is where you create repositories, collaborate on

    your code, and organize different streams of work in your Bitbucket

    Cloud account. Workspaces replace the use of teams and users in API

    calls.

    '
paths:
  /user/permissions/workspaces:
    parameters: []
    get:
      tags:
      - Workspaces
      description: '**This endpoint is deprecated. Please use the supported alternatives:**

        * [List workspaces for user](/cloud/bitbucket/rest/api-group-workspaces/#api-user-workspaces-get)

        * [Get user permission on a workspace](/cloud/bitbucket/rest/api-group-workspaces/#api-user-workspaces-workspace-permission-get)


        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](/cloud/bitbucket/deprecation-notice-collaborator-role/).**


        **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](/cloud/bitbucket/announcement-breaking-change-workspace-membership/).**


        Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) 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`.'
      summary: List workspaces for the current user
      responses:
        '200':
          description: All of the workspace memberships for the authenticated user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paginated_workspace_memberships'
              example:
                pagelen: 10
                page: 1
                size: 1
                values:
                - type: workspace_membership
                  permission: owner
                  last_accessed: '2019-03-07T12:35:02.900024+00:00'
                  added_on: '2018-10-11T17:42:02.961424+00:00'
                  user:
                    type: user
                    uuid: '{470c176d-3574-44ea-bb41-89e8638bcca4}'
                    nickname: evzijst
                    display_name: Erik van Zijst
                  workspace:
                    type: workspace
                    uuid: '{a15fb181-db1f-48f7-b41f-e1eff06929d6}'
                    slug: bbworkspace1
                    name: Atlassian Bitbucket
        '401':
          description: The request wasn't authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      parameters:
      - name: q
        in: query
        description: '

          Query string to narrow down the response. See

          [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details.'
        required: false
        schema:
          type: string
      - name: sort
        in: query
        description: '

          Name of a response property to sort results. See

          [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results)

          for details.

          '
        required: false
        schema:
          type: string
      security:
      - oauth2:
        - account
      - basic: []
      - api_key: []
      deprecated: true
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:workspace:bitbucket
        - read:user:bitbucket
      x-atlassian-auth-types:
      - api-token
  /user/workspaces:
    parameters: []
    get:
      tags:
      - Workspaces
      description: '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](/cloud/bitbucket/rest/intro/#sorting-query-results) or

        [filtering](/cloud/bitbucket/rest/intro/#filtering) by `slug`. Results can

        be [paginated](/cloud/bitbucket/rest/intro/#pagination).'
      summary: List workspaces for the current user
      responses:
        '200':
          description: The list of workspaces accessible by the authenticated user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paginated_workspace_access'
              example:
                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}'
        '400':
          description: The request was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: The request wasn't authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      parameters:
      - name: sort
        in: query
        description: Name of a response property to sort results (only slug is supported).
        required: false
        schema:
          type: string
      - name: administrator
        in: query
        description: Filter workspaces based on which ones the caller has admin permissions or not.
        required: false
        schema:
          type: boolean
      security:
      - oauth2:
        - account
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:workspace:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
  /user/workspaces/{workspace}/permission:
    parameters:
    - name: workspace
      in: path
      description: 'This can either be the workspace ID (slug) or the workspace UUID

        surrounded by curly-braces, for example: `{workspace UUID}`.

        '
      required: true
      schema:
        type: string
    get:
      tags:
      - Workspaces
      description: '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:


        * `owner`

        * `create-project`

        * `collaborator` (deprecated; see this

        [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/) for more details)

        * `member`'
      summary: Get user permission on a workspace
      responses:
        '200':
          description: The user that is part of a workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/workspace_membership'
        '401':
          description: The request wasn't authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: The requesting user does not have access to the workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - account
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:workspace:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
  /workspaces:
    parameters: []
    get:
      tags:
      - Workspaces
      description: '**This endpoint is deprecated. Please use the

        [supported alternative](/cloud/bitbucket/rest/api-group-workspaces/#api-user-workspaces-get).**


        Returns a list of workspaces accessible by the authenticated user.


        Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) 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](/cloud/bitbucket/deprecation-notice-collaborator-role/).**'
      summary: List workspaces for user
      responses:
        '200':
          description: The list of workspaces accessible by the authenticated user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paginated_workspaces'
              example:
                pagelen: 10
                page: 1
                size: 1
                values:
                - uuid: '{a15fb181-db1f-48f7-b41f-e1eff06929d6}'
                  links:
                    owners:
                      href: https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members?q=permission%3D%22owner%22
                    self:
                      href: https://api.bitbucket.org/2.0/workspaces/bbworkspace1
                    repositories:
                      href: https://api.bitbucket.org/2.0/repositories/bbworkspace1
                    snippets:
                      href: https://api.bitbucket.org/2.0/snippets/bbworkspace1
                    html:
                      href: https://bitbucket.org/bbworkspace1/
                    avatar:
                      href: https://bitbucket.org/workspaces/bbworkspace1/avatar/?ts=1543465801
                    members:
                      href: https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members
                    projects:
                      href: https://api.bitbucket.org/2.0/workspaces/bbworkspace1/projects
                  created_on: '2018-11-14T19:15:05.058566+00:00'
                  type: workspace
                  slug: bbworkspace1
                  is_private: true
                  name: Atlassian Bitbucket
        '401':
          description: The request wasn't authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      parameters:
      - name: role
        in: query
        description: "\n            Filters the workspaces based on the authenticated user's role on each workspace.\n\n            * **member**: returns a list of all the workspaces which the caller is a member of\n                at least one workspace group or repository\n            * **collaborator**: returns a list of workspaces which the caller has write access\n                to at least one repository in the workspace\n            * **owner**: returns a list of workspaces which the caller has administrator access\n            "
        required: false
        schema:
          type: string
          enum:
          - owner
          - collaborator
          - member
      - name: q
        in: query
        description: '

          Query string to narrow down the response. See

          [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details.'
        required: false
        schema:
          type: string
      - name: sort
        in: query
        description: '

          Name of a response property to sort results. See

          [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results)

          for details.

          '
        required: false
        schema:
          type: string
      security:
      - oauth2:
        - account
      - basic: []
      - api_key: []
      deprecated: true
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:user:bitbucket
        - read:workspace:bitbucket
      x-atlassian-auth-types:
      - api-token
  /workspaces/{workspace}:
    parameters:
    - name: workspace
      in: path
      description: 'This can either be the workspace ID (slug) or the workspace UUID

        surrounded by curly-braces, for example: `{workspace UUID}`.

        '
      required: true
      schema:
        type: string
    get:
      tags:
      - Workspaces
      description: Returns the requested workspace.
      summary: Get a workspace
      responses:
        '200':
          description: The workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/workspace'
        '404':
          description: If no workspace exists for the specified name or UUID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2: []
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:workspace:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
  /workspaces/{workspace}/hooks:
    parameters:
    - name: workspace
      in: path
      description: 'This can either be the workspace ID (slug) or the workspace UUID

        surrounded by curly-braces, for example: `{workspace UUID}`.

        '
      required: true
      schema:
        type: string
    get:
      tags:
      - Workspaces
      description: Returns a paginated list of webhooks installed on this workspace.
      summary: List webhooks for a workspace
      responses:
        '200':
          description: The paginated list of installed webhooks.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paginated_webhook_subscriptions'
        '403':
          description: If the authenticated user is not an owner on the specified workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: If the specified workspace does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - webhook
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:webhook:bitbucket
      x-atlassian-auth-types:
      - api-token
    post:
      tags:
      - Workspaces
      description: "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        \"issue:created\",\n        \"issue:updated\"\n      ]\n    }'\n```\n\nWhen the `secret` is provided it will be used as the key to generate a HMAC\ndigest value sent in the `X-Hub-Signature` header at delivery time. Passing\na `null` or empty `secret` or not passing a `secret` will leave the webhook's\nsecret unset. Bitbucket only generates the `X-Hub-Signature` when the webhook's\nsecret is set.\n\nThis call requires the webhook scope, as well as any scope\nthat applies to the events that the webhook subscribes to. In the\nexample above that means: `webhook`, `repository` and `issue`.\n\nThe `url` must properly resolve and cannot be an internal, non-routed address.\n\nOnly workspace owners can install webhooks on workspaces."
      summary: Create a webhook for a workspace
      responses:
        '201':
          description: If the webhook was registered successfully.
          headers:
            Location:
              description: The URL of new newly created webhook.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_subscription'
        '403':
          description: If the authenticated user does not have permission to install webhooks on the specified workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: If the specified workspace does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - webhook
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:webhook:bitbucket
        - write:webhook:bitbucket
      x-atlassian-auth-types:
      - api-token
  /workspaces/{workspace}/hooks/{uid}:
    parameters:
    - name: uid
      in: path
      description: Installed webhook's ID
      required: true
      schema:
        type: string
    - name: workspace
      in: path
      description: 'This can either be the workspace ID (slug) or the workspace UUID

        surrounded by curly-braces, for example: `{workspace UUID}`.

        '
      required: true
      schema:
        type: string
    delete:
      tags:
      - Workspaces
      description: Deletes the specified webhook subscription from the given workspace.
      summary: Delete a webhook for a workspace
      responses:
        '204':
          description: When the webhook was deleted successfully
        '403':
          description: If the authenticated user does not have permission to delete the webhook.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: If the webhook or workspace does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - webhook
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - delete:webhook:bitbucket
      x-atlassian-auth-types:
      - api-token
    get:
      tags:
      - Workspaces
      description: 'Returns the webhook with the specified id installed on the given

        workspace.'
      summary: Get a webhook for a workspace
      responses:
        '200':
          description: The webhook subscription object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_subscription'
        '404':
          description: If the webhook or workspace does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - webhook
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:webhook:bitbucket
      x-atlassian-auth-types:
      - api-token
    put:
      tags:
      - Workspaces
      description: '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.'
      summary: Update a webhook for a workspace
      responses:
        '200':
          description: The webhook subscription object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_subscription'
        '403':
          description: If the authenticated user does not have permission to update the webhook.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: If the webhook or workspace does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - webhook
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:webhook:bitbucket
        - write:webhook:bitbucket
      x-atlassian-auth-types:
      - api-token
  /workspaces/{workspace}/members:
    parameters:
    - name: workspace
      in: path
      description: 'This can either be the workspace ID (slug) or the workspace UUID

        surrounded by curly-braces, for example: `{workspace UUID}`.

        '
      required: true
      schema:
        type: string
    get:
      tags:
      - Workspaces
      description: 'Returns all members of the requested workspace.


        This endpoint additionally supports [filtering](/cloud/bitbucket/rest/intro/#filtering) by

        email address, if called by a workspace administrator, integration or workspace access

        token. This is done by adding the following query string parameter:


        * `q=user.email IN ("user1@org.com","user2@org.com")`


        When filtering by email, you can query up to 90 addresses at a time.

        Note that the query parameter values need to be URL escaped, so the final query string

        should be:


        * `q=user.email%20IN%20(%22user1@org.com%22,%22user2@org.com%22)`


        Email addresses that you filter by (and only these email addresses) can be included in the

        response using the `fields` query parameter:


        * `&fields=+values.user.email` - add the `email` field to the default `user` response object

        * `&fields=values.user.email,values.user.account_id` - only return user email addresses and

        account IDs


        Once again, all query parameter values must be URL escaped.'
      summary: List users in a workspace
      responses:
        '200':
          description: The list of users that are part of a workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paginated_workspace_memberships'
        '400':
          description: When more than 90 emails were provided when querying by email.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: The request wasn't authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - account
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:workspace:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
  /workspaces/{workspace}/members/{member}:
    parameters:
    - name: member
      in: path
      description: Member's UUID or Atlassian ID.
      required: true
      schema:
        type: string
    - name: workspace
      in: path
      description: 'This can either be the workspace ID (slug) or the workspace UUID

        surrounded by curly-braces, for example: `{workspace UUID}`.

        '
      required: true
      schema:
        type: string
    get:
      tags:
      - Workspaces
      description: 'Returns the workspace membership, which includes

        a `User` object for the member and a `Workspace` object

        for the requested workspace.'
      summary: Get user membership for a workspace
      responses:
        '200':
          description: The user that is part of a workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/workspace_membership'
        '401':
          description: The request wasn't authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: A workspace cannot be found, or a user cannot be found, or the user is not a a member of the workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - account
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:workspace:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
  /workspaces/{workspace}/permissions:
    parameters:
    - name: workspace
      in: path
      description: 'This can either be the workspace ID (slug) or the workspace UUID

        surrounded by curly-braces, for example: `{workspace UUID}`.

        '
      required: true
      schema:
        type: string
    get:
      tags:
      - Workspaces
      description: '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](/cloud/bitbucket/deprecation-notice-collaborator-role/).**


        **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](/cloud/bitbucket/announcement-breaking-change-workspace-membership/).**


        Results may be further [filtered](/cloud/bitbucket/rest/intro/#filtering) by

        permission by adding the following query string parameters:


        * `q=permission="owner"`'
      summary: List user permissions in a workspace
      responses:
        '200':
          description: The list of users that are part of a workspace, along with their permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paginated_workspace_memberships'
              example:
                pagelen: 10
                values:
                - permission: owner
                  type: workspace_membership
                  user:
                    type: user
                    uuid: '{470c176d-3574-44ea-bb41-89e8638bcca4}'
                    display_name: Erik van Zijst
                  workspace:
                    type: workspace
                    uuid: '{a15fb181-db1f-48f7-b41f-e1eff06929d6}'
                    slug: bbworkspace1
                    name: Atlassian Bitbucket
                - permission: member
                  type: workspace_membership
                  user:
                    type: user
                    nickname: seanaty
                    display_name: Sean Conaty
                    uuid: '{504c3b62-8120-4f0c-a7bc-87800b9d6f70}'
                  workspace:
                    type: workspace
                    uuid: '{a15fb181-db1f-48f7-b41f-e1eff06929d6}'
                    slug: bbworkspace1
                    name: Atlassian Bitbucket
                page: 1
                size: 2
        '401':
          description: The request wasn't authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      parameters:
      - name: q
        in: query
        description: '

          Query string to narrow down the response as per

          [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).'
        required: false
        schema:
          type: string
      security:
      - oauth2:
        - account
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:workspace:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
  /workspaces/{workspace}/permissions/repositories:
    parameters:
    - name: workspace
      in: path
      description: 'This can either be the workspace ID (slug) or the workspace UUID

        surrounded by curly-braces, for example: `{workspace UUID}`.

        '
      required: true
      schema:
        type: string
    get:
      tags:
      - Workspaces
      description: '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](/cloud/bitbucket/rest/intro/#filtering)

        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`.'
      summary: List all repository permissions for a workspace
      responses:
        '200':
          description: List of workspace's repository permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paginated_repository_permissions'
              example:
                pagelen: 10
                values:
                - type: repository_permission
                  user:
                    type: user
                    display_name: Erik van Zijst
                    uuid: '{d301aafa-d676-4ee0-88be-962be7417567}'
                  repository:
                    type: repository
                    name: geordi
                    full_name: atlassian_tutorial/geordi
                    uuid: '{85d08b4e-571d-44e9-a507-fa476535aa98}'
                  permission: admin
                - type: repository_permission
                  user:
                    type: user
                    display_name: Sean Conaty
                    uuid: '{504c3b62-8120-4f0c-a7bc-87800b9d6f70}'
                  repository:
        

# --- truncated at 32 KB (207 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/openapi/bitbucket-workspaces-api-openapi.yml