Calling the group-privileges endpoint on workspaces with a large number of repositories results in API timeouts and 500 errors

XMLWordPrintable

    • 1
    • Severity 3 - Minor
    • 128

      Issue Summary

      The Bitbucket Cloud legacy API v1 endpoint GET /1.0/group-privileges/<workspace>/<workspace>/<group> fails with a timeout (500 error) in workspaces with a large number of repositories (e.g., 1,000+).

      Steps to Reproduce

      1. Identify a Bitbucket Cloud workspace with a large number of repositories (e.g., 1,000 - 5,000+).
      2. Attempt to call the group privileges endpoint for any group within that workspace:
        curl -X GET https://api.bitbucket.org/1.0/group-privileges/<workspace_ID>/<workspace_ID>/<group_slug>
      3. Observe the response time and the resulting status code.

      Expected Results

      The API should return a list of repository privileges for the specified group within a reasonable timeframe.

      Actual Results

      The request hangs and eventually returns a 500 Internal Server Error or a gateway timeout due to the backend process exceeding the allowed execution time while iterating through the repository list.

      Workaround

      To avoid the iteration timeout, users should use the repository-specific privileges API, which scopes the permission check to a single repository:

      GET /1.0/group-privileges/<workspace>/<repo_slug>/<workspace>/<group>
      

      While this requires multiple calls to cover all repositories, it avoids the architectural bottleneck of the workspace-wide iteration.

              Assignee:
              Unassigned
              Reporter:
              Mark C
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: