Stash's REST API uses a paged system and will, in general never just return all of something. This is to ensure performance of the system is maintained and REST requests can be processed very quickly.
You can check the REST documentation here for more info on how the paging works.
To retrieve all repositories on any given Stash instance, you would need to:
The REST response for the repos contains that repository's clone URLs (for HTTP and SSH, depending on availability).
Another thing of note: the caller needs to have at least read access to all projects and repos for this to work.
Hi @Shuaibing Li, sorry for the confusion in my answer above. Yes, as you rightly pointed out, you can use the /rest/api/1.0/repos endpoint with no query parameters. That will save you having to query all the projects. That endpoint is also paged and, depending on the number of repos your Stash instance contains, you will still need to make multiple requests to retrieve all repos .
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
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 ...
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!
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