Display a list of active repositories

Platform Notice: Cloud Only - This article only applies to Atlassian apps 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, choose one of the available authentication methods. The examples below use Basic authentication with the Atlassian account email address of a user and an API token for that user with the scope read:repository:bitbucket, and an access token. Please keep in mind that a repository or project access token will not give you access to all the repos of the workspace; you will need to use a workspace access token or an OAuth access token instead.

  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:

    • <atlassian_account_email> with your Atlassian account email address

    • <api_token> with an API token for your account

    • {AccessToken} with an OAuth or workspace access token

    • {WorkspaceID} with the ID of the workspace

    • the date in the query, if you filter by updated date

    # Simple repository list - API token curl -X GET --user <atlassian_account_email>:<api_token> 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 - API token curl -X GET \ --url 'https://api.bitbucket.org/2.0/repositories/{WorkspaceID}?sort=-updated_on' \ --user <atlassian_account_email>:<api_token> # 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) - API token curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/{WorkspaceID}?q=updated_on%3E2025-01-01' \ --user <atlassian_account_email>:<api_token> # 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) - API token curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/{WorkspaceID}?q=updated_on%3C2025-01-01' \ --user <atlassian_account_email>:<api_token> # 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 September 4, 2025

Still need help?

The Atlassian Community is here for you.