Class JobConfigShortcutResource

java.lang.Object
com.atlassian.bamboo.plugins.rest.plan.stage.job.JobConfigShortcutResource

@Path("config/job") @Consumes("application/json") @Produces("application/json") @ExperimentalApi public class JobConfigShortcutResource extends Object
Provides RESTful operations on jobs for the configuration of build plans. For operations on a specific job, we just need to specify its job key, and not the build plan and stage it belongs to. For more operations on jobs, see JobConfigResource.
Since:
5.9
  • Constructor Details

  • Method Details

    • getJob

      @GET @Path("{jobKey}") public RestJob getJob(@PathParam("jobKey") String jobKeyString, @BeanParam ExpansionParam expansion, @Context jakarta.ws.rs.core.UriInfo uriInfo) throws WebValidationException
      Retrieves the details of a specific job of a stage of a build plan.
      Parameters:
      jobKeyString - identifier of the job to retrieve details for
      expansion - represents an expansion tree of additional information we want to retrieve
      Returns:
      RestJob
      Throws:
      WebValidationException
    • updateJob

      @PUT @Path("{jobKey}") public RestJob updateJob(@PathParam("jobKey") String jobKeyString, @BeanParam @Nullable @Nullable ConfirmationToken confirmationToken, @BeanParam ExpansionParam expansion, @Context jakarta.ws.rs.core.UriInfo uriInfo, RestJob restJob) throws WebValidationException
      Updates a job partially, not overriding any field that it's not specified.
      Parameters:
      jobKeyString - identifier of the job to retrieve details for
      confirmationToken - token to validate that the job being updated has not been modified in the meantime, in which case the operation would be rejected. To get this validation token see JobConfigResource.getMoveWarnings(String, long, String, long, ExpansionParam, UriInfo). This token in optional, if not specified it won't be checked and the operation will be forced.
      expansion - represents an expansion tree of additional information we want to retrieve
      restJob - representation of the job to update
      Returns:
      RestJob
      Throws:
      WebValidationException - if there's validation errors, which maps into a 400 Bad Request
    • removeJob

      @DELETE @Path("{jobKey}") public jakarta.ws.rs.core.Response removeJob(@PathParam("jobKey") String jobKeyString, @BeanParam @Nullable @Nullable ConfirmationToken confirmationToken, @Context jakarta.ws.rs.core.UriInfo uriInfo) throws WebValidationException
      Deletes a specific job of a build plan.
      Parameters:
      jobKeyString - identifier of the job to delete
      confirmationToken - token to validate that the job being deleted has not been modified in the meantime, in which case the operation would be rejected. To get this validation token see JobConfigResource.getDeletionWarnings(String, long, String, ExpansionParam, UriInfo). This token in optional, if not specified it won't be checked and the operation will be forced.
      Returns:
      Response an empty response
      Throws:
      WebValidationException