Currently, Bamboo does not provide an endpoint listing repositories (https://jira.atlassian.com/browse/BAM-20007 - (REST) No endpoint available for retrieving Linked Repository ID(s)). Even after gathering the repository ID information, extracted from Bamboo UI or web scraping, testing repository connection still need to much effort from users through REST API.
Based on Bamboo REST API documentation, there is an endpoint (http://myhost.com:8085/bamboo/rest/api/latest/repository/testConnection [PUT]) in which should provide this information easily, however, it is required to provide not only the repository ID information but also the pluginKey and repositoryURL (when testing connection against Git repository as Repository Host)
- selectedRepository attribute from payload is not available in Bamboo's UI, making it difficult for user to make use of the endpoint
- repository.git.repositoryUrl since providing repositoryID information, repository URL seems to be a redundant attribute since repository IDs are unique across Bamboo
The endpoint should only consume the repository ID, e.g:
As response, Bamboo should provide information about the repository, e.g: