Forums

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

How to get all private repos owned by team when there is a space in the team name

BackupOperator
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 23, 2019

I read Lukas Nostro's question and the reply (How to get all private repos owned by team, April 2 2018) which looked like a great answer. However I've realised that our team name has a space in it... and I can't find how to specify a team name that contains a space!

As example using the following via wget

wget --user <user> --password <password> https://api.bitbucket.org/2.0/repositories/{Team Name}

 gets me a 404: Not Found and then a message about failing to resolve http://Name%7D/ - it's breaking into two URIs. WHich TBH is kind of what I'd expect.

I've tried replacing the space with %20 ... and I get a 404 Not Found returned. I've tried various ways of quoting or escaping the space or the %20, which all return a 404 Not Found.

Is  there any working way that will allow a team name with spaces to be used? Is there any alternative that can be used? The team name clearly isn't 'Team Name' but I've used that instead of the real team name!

 

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 24, 2019

Hi, and welcome! 

While the name of the team might contain a space, the workspace ID associated with the team will not (as spaces are not allowed in the URL) and that's what you have to use. For clarity, have a look at this screenshot:

Screen Shot 2019-05-24 at 16.45.16.png

The part in between parenthesis is the workspace ID.

If you're unsure of what the workspace ID is in your case, you can see it by logging into your Bitbucket Cloud account, navigating to the team and visiting the Settings page. 

Hope that helps you. If you're still having difficulties to find it, please let us know. 

Kind regards,

Ana

BackupOperator
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 28, 2019

Unfortunately that doesn't solve the problem... using

wget --user <User> --password <password> https://api.bitbucket.org/2.0/repositories/(<workspace ID>}

also gets me a 404 error, which means it's not finding the identified resource. The <User> i've tried is either an account with read only access to the repositories (the account that opened this request for help) or my account that has admin rights (but AFAIK isn't the owner, I took over from the previous admin who set it all up) of the workspace.

If I miss the braces off, I get a one-line output {"pagelen": 10, "values": [], "page": 1, "size": 0}

BTW, the attached screenshot appears to be just your face / name... which doesn't show me where I might see the workspace ID - maybe the website doesn't like Chrome browser? However I 've found the workspace ID... which also appears to be the last component of the path in the URI of the Settings page / the first component on the repository overview

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events