Display a list of active repositories

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

  • The purpose of this knowledge article is to provide methods for displaying a list of active repositories within your workspace, as well as exporting this information

  • At present, Bitbucket Cloud lists your repositories based on their last activity dates - but there is no way of exporting this information natively within the product

Solution

Procedure

Option 1 - Bitbucket Cloud UI

To simply list your repositories within the UI, you can follow the steps below:

  1. First, ensure you have selected the correct workspace where you wish to view the repositories by clicking your avatar in the top-right hand corner and selecting All Workspaces from the dropdown menu, then select the correct workspace from the list

  2. Click the Repositories tab in the top navigation bar

  3. You will now see the list of repositories in your workspace, these are ordered chronologically based on when they were last active by default

Option 2 - Bitbucket Cloud API

You can also use our REST API to filter through the repositories under your workspace and display only active repositories by following the steps below:

  1. First, ensure that you have configured an authentication method such as an App Password or a repository access token with repository read access permissions (minimum) as you will need to use one of these authentication methods to access our API endpoint

  2. You can then execute cURL commands using a terminal (or a utility such as Postman/Insomnia) against the /2.0/repositories endpoint to list all of your workspace repositories, with the option of filtering & sorting these to show only active repositories

    Example:

    You will need to replace the placeholder values contained within the { } symbols with actual values (do not include the { } symbols in your commands)

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 # Simple repository list - App Password curl -X GET --user {Username}:{AppPassword} https://api.bitbucket.org/2.0/repositories/{WorkspaceID} # Simple repository list - Access Token curl -X GET \ --url https://api.bitbucket.org/2.0/repositories/{WorkspaceID} \ --header 'Authorization: Bearer {AccessToken}' # Repository list sorted from most recently to least recently updated - App Password curl -X GET \ --url 'https://api.bitbucket.org/2.0/repositories/{WorkspaceID}?sort=-updated_on' \ --user {Username}:{AppPassword} # Repository list sorted from most recently to least recently updated - Access Token curl -X GET \ --url 'https://api.bitbucket.org/2.0/repositories/{WorkspaceID}?sort=-updated_on' \  --header 'Authorization: Bearer {AccessToken}' # Repository list that only shows repositories updated after a certain date (YYYY-MM-DD) - App Password curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/{WorkspaceID}?q=updated_on%3E2025-01-01' \ --user {Username}:{AppPassword} # Repository list that only shows repositories updated after a certain date (YYYY-MM-DD) - Access Token curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/{WorkspaceID}?q=updated_on%3E2025-01-01' \ --header 'Authorization: Bearer {AccessToken}' # Repository list that only shows repositories updated before a certain date (YYYY-MM-DD) - App Password curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/{WorkspaceID}?q=updated_on%3C2025-01-01' \ --user {Username}:{AppPassword} # Repository list that only shows repositories updated before a certain date (YYYY-MM-DD) - Access Token curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/{WorkspaceID}?q=updated_on%3C2025-01-01' \ --header 'Authorization: Bearer {AccessToken}'

Option 3 - Python Script

There is also an unofficial Python script that may be used to gather a list of repositories with their last active dates, and export these in .csv format:

This is a third-party script that is not formally supported by Atlassian, if you encounter any issues we will not be able to provide scripting assistance as this falls outside of our support scope. We would suggest having your team review this before executing it in production.

The updated_on field in the workspace repositories list (or in the API) shows a timestamp based on the last commit activity, which includes branch creation/deletion, pull request source branch updates, and commit history rewrites on the repository. It does not include pull request edits, pipeline build updates, or pipeline repository clone/read events. please use pull requests API endpoint or pipelines API endpoint in order fetch the pull requests/pipelines activity on the repository

  1. Ensure Python is installed on your local machine

  2. Download the script here and read its instructions, then execute it locally on your machine

If you are unable to successfully gather the information that you require after following this article - please feel free to raise a support ticket or raise a community support ticket for further assistance. 

Updated on April 10, 2025

Still need help?

The Atlassian Community is here for you.