Class StashBulkActionsResource

java.lang.Object
com.atlassian.bamboo.plugins.stash.v2.configurator.BitbucketServerSshKeyHandler
com.atlassian.bamboo.plugins.stash.rest.resource.StashBulkActionsResource

@Path("/bulk") @Consumes("application/json") @Produces("application/json") @Singleton public class StashBulkActionsResource extends BitbucketServerSshKeyHandler
  • Constructor Details

  • Method Details

    • updateMirrors

      @POST @Path("{appLinkId}/mirror") public javax.ws.rs.core.Response updateMirrors(@PathParam("appLinkId") String appLinkId, BulkUpdateMirrorRequest updateRequest) throws WebValidationException
      Bulk update of mirrors for all repositories connected to Bitbucket Server by applink id.
      Parameters:
      appLinkId - id of AppLink which used for repository
      updateRequest - set of configuration for update
      Returns:
      200 if update happened successfully or StashPageEntity<com.atlassian.bamboo.plugins.stash.rest.resource.StashBulkActionsResource.UpdateMirrorDryRunResult> if dryRun option is provided
      Throws:
      WebValidationException - if user has no OAuth authorization for Bitbucket Server, or provided wrong mirror id
    • refreshKeysIfNeeded

      @POST @Path("keys/repair") public javax.ws.rs.core.Response refreshKeysIfNeeded(@Nullable @Nullable BulkKeysRepairRequest keysRepairPayload)
      The bulk operation that refreshes ssh keys of all Bitbucket Server/DC repositories if the existing one cannot establish a connection with the origin repository. This operation is performed against all existing app links.
      Parameters:
      keysRepairPayload - optional filtering criteria
      Returns:
      200 if at least one repository was processed successfully
    • refreshKeysIfNeeded

      @POST @Path("keys/repair/{appLinkId}") public javax.ws.rs.core.Response refreshKeysIfNeeded(@PathParam("appLinkId") String appLinkId, @Nullable @Nullable BulkKeysRepairRequest keysRepairPayload) throws WebValidationException
      The bulk operation that refreshes ssh keys of all Bitbucket Server/DC repositories if the existing one cannot establish a connection with the origin repository. This operation is performed only against repositories related to specified AppLink ID.
      Parameters:
      appLinkId - id of AppLink used for repositories searching
      keysRepairPayload - optional filtering criteria
      Returns:
      200 if at least one repository was processed successfully
      Throws:
      WebValidationException