How to identify repository name from repository ID (on disk)?

This question is in reference to Atlassian Documentation: Identifying a Repository on the Stash Server

This is only repository name to <repository-id> mapping. How to figure out repository when I have an ID. With more than 2000 repositories, clicking on all "Settings" for each repo is ridiculous.

1 answer

1 accepted

Use the "/repos" REST API GET request to get a dump of all repos quickly.  Be sure to authenticate first as an admin so that all are visible.  Since you have over 2,000 repos, you'll need to use the paging API.  It would be something like this:




The result includes an "id" attribute inside each returned repository JSON object:

values: [
  slug: "aui",
  id: 2,
  name: "aui",
  scmId: "git",
  // etc...
  slug: "my_repo",
  id: 11,
  name: "my_repo",
  scmId: "git",
  // etc...


You can use this data to build up your ID -> Repo-Name reverse-lookup table.


Here's an example using my flaky demo VM (might not respond):


p.s.  I'm the author of a Marketplace add-on:  Bit-Booster Commit Graph And More

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,768 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you