Class SprintResource

java.lang.Object
com.atlassian.greenhopper.web.AbstractResource
com.atlassian.greenhopper.web.rapid.sprint.SprintResource

@Path("sprint") @Consumes("application/json") @Produces("application/json") public class SprintResource extends AbstractResource
  • Constructor Details

  • Method Details

    • listSprints

      @GET @Path("/picker") public jakarta.ws.rs.core.Response listSprints(@DefaultValue("") @QueryParam("query") String searchQuery, @DefaultValue("50") @QueryParam("maxResults") int maxResults, @DefaultValue("true") @QueryParam("excludeCompleted") boolean excludeCompleted, @Nullable @QueryParam("project") String projectKey)
    • getEditModel

      @GET @Path("{sprintId}/edit/model") public jakarta.ws.rs.core.Response getEditModel(@PathParam("sprintId") Long sprintId)
      Returns the model of a sprint that can be used to edit the details of the sprint.
      Parameters:
      sprintId - The ID of the sprint
      Returns:
      a model containing the details of the sprint
    • createSprint

      @POST @Path("{rapidViewId}") public jakarta.ws.rs.core.Response createSprint(com.atlassian.greenhopper.api.rest.bean.SprintCreateBean sprintCreateBean, @PathParam("rapidViewId") Long rapidViewId)
      Create a new sprint from existing data in SprintCreateBean for a given rapid view. If no name is provided, the name will be suggested. All other parameters are optional.
    • getCreateSprintModel

      @GET @Path("{rapidViewId}/create/model") public jakarta.ws.rs.core.Response getCreateSprintModel(@PathParam("rapidViewId") Long rapidViewId, @QueryParam("suggestDates") @DefaultValue("false") boolean suggestDates)
      Returns default sprint model for creating a sprint
    • updateSprint

      @PUT @Path("{sprintId}") public jakarta.ws.rs.core.Response updateSprint(@PathParam("sprintId") Long sprintId, UpdateSprintRequest updateSprintRequest)
      Updates a sprint with the given ID with the given update object. The name, startDate, endDate, goal and autoStartStop sprint properties of a sprint can be updated. If the autoStartStop sprint property is equal to null, this property will be not updated and original value will remain the same.
      Parameters:
      sprintId - The ID of a sprint
      updateSprintRequest - An update request containing the name, startDate, endDate and goal with which the sprint will be updated.
      Returns:
      The updated sprint
    • moveSprint

      @PUT @Path("{sprintId}/swap") public jakarta.ws.rs.core.Response moveSprint(@PathParam("sprintId") Long sprintId, SwapSprintRequest swapSprintRequest)
      Changes the sequence of two sprints by swapping their sequence
      Parameters:
      sprintId - The ID of a sprint
      swapSprintRequest - An update request containing the sprint to swap with
      Returns:
      the updated sprint object
    • deleteSprint

      @DELETE @Path("{sprintId}") public jakarta.ws.rs.core.Response deleteSprint(@PathParam("sprintId") Long sprintId, @QueryParam("rapidViewId") Long rapidViewId)
      Delete a sprint given its id.

      Specify the rapid view to automatically add issues in the sprint to the next upcoming sprint

    • autoStartSprints

      @POST @Path("autoStartSprint") public jakarta.ws.rs.core.Response autoStartSprints()
      Triggers one run of SprintAutoStartService. Method will move sprints to active state (see Sprint.State.ACTIVE) if sprint is automatically managed (see Sprint.isAutoStartStop()), future (see Sprint.State.FUTURE) and sprint's started date (see Sprint.getStartDate()) has already passed.
    • autoStopSprints

      @POST @Path("autoStopSprint") public jakarta.ws.rs.core.Response autoStopSprints()
      Triggers one run of SprintAutoStopService. Method will move sprints to closed state (see Sprint.State.CLOSED) if sprint is automatically managed (see Sprint.isAutoStartStop()), active (see Sprint.State.ACTIVE) and sprint's end date (see Sprint.getEndDate()) has already passed.