-
Suggestion
-
Resolution: Timed out
-
None
-
0
-
2
-
Issue
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.
How to repository test connection
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)
# replace "5341185" with "repository id" # replace "file:///nothing" with repository URL curl -k -u admin:admin \ -H 'Content-type: application/json' \ -H 'Accept: application/json' \ -d '{"repositoryId":"5341185","selectedRepository":"com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-git:gitv2","repository.git.repositoryUrl":"file:///nothing"}' \ -X PUT http://localhost:8085/rest/api/latest/repository/testConnection
- 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
Suggestion
The endpoint should only consume the repository ID, e.g:
curl -k -u admin:admin \ -H 'Accept: application/json' \ -X PUT http://localhost:8085/rest/api/latest/repository/{repositoryId}/testConnection
As response, Bamboo should provide information about the repository, e.g:
{ "repositoryID": "1234567890", "repositoryName": "Name given in Bamboo" "repositoryHost": "Git", "repositoryURL": "ssh://git@hostname/proj/repository.git", "branch": "master", "testConnection": "Successful" }
[BAM-20020] (REST) As an admin, I would like to test repository connection from REST API
Resolution | New: Timed out [ 10 ] | |
Status | Original: Gathering Interest [ 11772 ] | New: Closed [ 6 ] |
Labels | Original: pse-request | New: bamboo-bugs-grooming pse-request |
Workflow | Original: JAC Suggestion Workflow [ 3019249 ] | New: JAC Suggestion Workflow 3 [ 3599704 ] |
Workflow | Original: Confluence Workflow - Public Facing v4 [ 2752360 ] | New: JAC Suggestion Workflow [ 3019249 ] |
Remote Link | New: This issue links to "Page (Confluence)" [ 393738 ] |
Support reference count | Original: 1 | New: 2 |
Remote Link | New: This issue links to "Page (Confluence)" [ 387204 ] |
UIS | New: 0 |
Support reference count | New: 1 |
Description |
Original:
h3. Issue
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. h3. How to repository test connection 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_) {noformat} # replace "5341185" with "repository id" # replace "file:///nothing" with repository URL curl -k -u admin:admin \ -H 'Content-type: application/json' \ -H 'Accept: application/json' \ -d '{"repositoryId":"5341185","selectedRepository":"com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-git:gitv2","repository.git.repositoryUrl":"file:///nothing"}' \ -X PUT http://localhost:8085/rest/api/latest/repository/testConnection {noformat} * *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 h3. Suggestion The endpoint should only consume the repository ID, e.g: {noformat} curl -k -u admin:admin \ -H 'Accept: application/json' \ -X PUT http://localhost:8085/rest/api/latest/repository/{repositoryId}/testConnection {noformat} As response, Bamboo should provide information about the repository, e.g: {noformat} { "repositoryID": "1234567890", "repositoryName": "Name given in Bamboo" "repositoryHost": "Git", "repositoryURL": "ssh://git@hostname/proj/repository.git", "branch": "master", "testConnection": "Successful" } {noformat} |
New:
h3. Issue
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. h3. How to repository test connection 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_) {noformat} # replace "5341185" with "repository id" # replace "file:///nothing" with repository URL curl -k -u admin:admin \ -H 'Content-type: application/json' \ -H 'Accept: application/json' \ -d '{"repositoryId":"5341185","selectedRepository":"com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-git:gitv2","repository.git.repositoryUrl":"file:///nothing"}' \ -X PUT http://localhost:8085/rest/api/latest/repository/testConnection {noformat} * *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 h3. Suggestion The endpoint should only consume the repository ID, e.g: {noformat} curl -k -u admin:admin \ -H 'Accept: application/json' \ -X PUT http://localhost:8085/rest/api/latest/repository/{repositoryId}/testConnection {noformat} As response, Bamboo should provide information about the repository, e.g: {noformat} { "repositoryID": "1234567890", "repositoryName": "Name given in Bamboo" "repositoryHost": "Git", "repositoryURL": "ssh://git@hostname/proj/repository.git", "branch": "master", "testConnection": "Successful" } {noformat} |