List all repositories of specific project

Eyal Goren December 22, 2021

Hi,

 

How can I detect for specific project which repositories exist in it using an API call ?

 

I need to implement a process that for specific project displays all the existing repositories.

2 answers

1 accepted

1 vote
Answer accepted
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 23, 2021

Hi @Eyal Goren

Use this API and let me know

curl -s -k --request GET --user "username:password" "https://<host>/rest/api/1.0/projects/<projectkey/repos"

 Bitbucket API.png

It's working fine for me. Let me know once you use this API

Thanks,
Pramodh

Eyal Goren December 23, 2021

Yes, this works, thanks!!!

 

Eyal

Like Pramodh M likes this
0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 22, 2021

Hi @Eyal Goren 

Using API Ref here

https://docs.atlassian.com/bitbucket-server/rest/5.15.0/bitbucket-rest.html

curl -s --request GET --user "${username}:${token}" https://stash.atlassian.com/rest/api/1.0/projects/{projectKey}/repos

You will get the JSON response from the curl request, which you later extract the data from jq tool

Thanks,
Pramodh

Eyal Goren December 23, 2021

Hi,

 

I tried it, it returned nothing-

 

curl -s --request GET --user "<user>:<token>" https://<host>/rest/api/1.0/projects/<proj name>/repos

Like Ben Bracha likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events