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 Summary
ConstructorsConstructorDescriptionJobConfigShortcutResource(RestJobService restJobService, JobService jobService, InputParser inputParser, JobConversionFunction jobConversionFunction) -
Method Summary
Modifier and TypeMethodDescriptiongetJob(String jobKeyString, ExpansionParam expansion, jakarta.ws.rs.core.UriInfo uriInfo) Retrieves the details of a specific job of a stage of a build plan.jakarta.ws.rs.core.ResponseremoveJob(String jobKeyString, @Nullable ConfirmationToken confirmationToken, jakarta.ws.rs.core.UriInfo uriInfo) Deletes a specific job of a build plan.updateJob(String jobKeyString, @Nullable ConfirmationToken confirmationToken, ExpansionParam expansion, jakarta.ws.rs.core.UriInfo uriInfo, RestJob restJob) Updates a job partially, not overriding any field that it's not specified.
-
Constructor Details
-
JobConfigShortcutResource
@Inject public JobConfigShortcutResource(RestJobService restJobService, JobService jobService, InputParser inputParser, JobConversionFunction jobConversionFunction)
-
-
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 forexpansion- 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 forconfirmationToken- 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 seeJobConfigResource.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 retrieverestJob- 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 deleteconfirmationToken- 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 seeJobConfigResource.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:
Responsean empty response- Throws:
WebValidationException
-