Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket REST API to get all project admins in all projects

Thembela Kwenene June 23, 2025

I want to return all users in our bitbucket projects which are project administrators using a rest API as I couldn't find an option on audit logs

1 answer

0 votes
Vitalii Rybka
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 23, 2025

Hey Thembela — great question. Bitbucket’s REST API doesn’t provide a single direct endpoint to list all project admins across all projects, but here’s a workaround approach that works well:

Step-by-step with Bitbucket Data Center/Server API:

  1. Get all projects
    Use this to list your projects:

    bash
    GET /rest/api/1.0/projects

    This returns a list of project keys.

  2. Get project permissions
    For each project key, run:

    bash
    GET /rest/api/1.0/projects/{projectKey}/permissions/users

    This will return all users with any level of access. You'll need to filter by PROJECT_ADMIN permission from the response.

  3. (Optional) Also check group permissions
    If you’re assigning admin rights via groups, also run:

    bash
    GET /rest/api/1.0/projects/{projectKey}/permissions/groups

    Then map users from those groups separately.


This process can be scripted using Python or any HTTP client to loop through all projects and compile a full list of admins.

Let me know if you’d like a script template happy to send one over or walk through it in DM if that helps

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events