Class RepositoryResource
java.lang.Object
com.atlassian.bamboo.plugins.stash.rest.resource.RepositoryResource
@Path("/repository")
@Consumes("application/json")
@Produces("application/json")
@Singleton
public class RepositoryResource
extends Object
Allows to create linked repository by Bitbucket Server.
More details at https://hello.atlassian.net/wiki/spaces/SDT/pages/581292754/Bamboo+REST+endpoints+for+first+slice
-
Constructor Summary
ConstructorDescriptionRepositoryResource
(com.atlassian.applinks.api.ApplicationLinkService applicationLinkService, com.atlassian.sal.api.ApplicationProperties applicationProperties, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, CustomVariableContext customVariableContext, VcsRepositoryConfigurationService repositoryConfigurationService, VcsRepositoryManager vcsRepositoryManager, VcsBambooSpecsConfigurator vcsBambooSpecsConfigurator, VcsConfigurationHelper vcsConfigurationHelper, com.atlassian.sal.api.message.I18nResolver i18nResolver, com.atlassian.sal.api.web.context.HttpContext httpContext) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
createRepository
(@NotNull StashCreateRepositoryRequest createRepositoryRequest) Create BBS linked repository.
-
Constructor Details
-
RepositoryResource
@Inject public RepositoryResource(com.atlassian.applinks.api.ApplicationLinkService applicationLinkService, com.atlassian.sal.api.ApplicationProperties applicationProperties, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, CustomVariableContext customVariableContext, VcsRepositoryConfigurationService repositoryConfigurationService, VcsRepositoryManager vcsRepositoryManager, VcsBambooSpecsConfigurator vcsBambooSpecsConfigurator, VcsConfigurationHelper vcsConfigurationHelper, com.atlassian.sal.api.message.I18nResolver i18nResolver, com.atlassian.sal.api.web.context.HttpContext httpContext)
-
-
Method Details
-
createRepository
@POST public javax.ws.rs.core.Response createRepository(@NotNull @NotNull StashCreateRepositoryRequest createRepositoryRequest) throws WebValidationException Create BBS linked repository. Application link id is taken from request parameters that's why this endpoint will work only for Bitbucket Server requests.- Parameters:
createRepositoryRequest
- new repository settings.- Returns:
- created repository details
- Throws:
WebValidationException
- when validation failsUnauthorisedException
- when user don't have global CREATE_REPOSITORY permission
-