Package com.xebialabs.xlrelease.api.v1

# Interface DeliveryPatternApi

All Superinterfaces:
  `ApiService`

@Path("/api/v1/delivery-patterns") @Produces("application/json") @Consumes("application/json") public interface DeliveryPatternApi extends ApiService
Operations on release deliveries.

- ## Field Summary

  ### Fields inherited from interface com.xebialabs.xlrelease.api.ApiService

  `DEFAULT_RESULTS_PER_PAGE, DEFAULT_RESULTS_PER_PAGE_STRING, DEPTH, ORDER_BY, PAGE, PAGE_IS_OFFSET, RESULTS_PER_PAGE, ROLE_IDS_DATA`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `checkTitleUnique(ValidatePattern validation)`
  `Delivery`
  `createDeliveryFromPattern(String patternId, CreateDelivery createDelivery)`
  Creates a delivery from a delivery pattern.
  `Delivery`
  `createPattern(Delivery pattern)`
  Creates a new delivery pattern.
  `Stage`
  `createStage(String patternId, CreateDeliveryStage form)`
  `Stage`
  `createStage(String patternId, Stage stage)`
  Adds a stage to a pattern.
  `Stage`
  `createStage(String patternId, Stage stage, Integer position)`
  `TrackedItem`
  `createTrackedItem(String patternId, TrackedItem item)`
  Adds a tracked item to a delivery pattern.
  `Transition`
  `createTransition(String stageId, Transition transition)`
  Adds a transition to a stage in a delivery pattern.
  `void`
  `deletePattern(String patternId)`
  Deletes a delivery pattern.
  `void`
  `deleteStage(String stageId)`
  Deletes a stage in a delivery pattern.
  `void`
  `deleteTrackedItem(String itemId)`
  Deletes a tracked item.
  `void`
  `deleteTransition(String transitionId)`
  Deletes a transition in a delivery pattern.
  `Delivery`
  `duplicatePattern(String patternId, DuplicateDeliveryPattern duplicateDeliveryPattern)`
  `Delivery`
  `getPattern(String patternId)`
  Returns a delivery pattern by ID.
  `Delivery`
  `getPatternByIdOrTitle(String patternIdOrTitle)`
  Returns a delivery pattern by ID or title.
  `List<Stage>`
  `getStages(String patternId)`
  Returns the stages in a given delivery pattern.
  `List<TrackedItem>`
  `getTrackedItems(String patternId)`
  Returns the tracked items associated with given delivery pattern.
  `List<Delivery>`
  `searchPatterns(DeliveryPatternFilters filters)`
  Search delivery patterns by filters with default pagination.
  `List<Delivery>`
  `searchPatterns(DeliveryPatternFilters filters, Long page, Long resultsPerPage)`
  Search delivery patterns by filters.
  `default String`
  `serviceName()`
  `Delivery`
  `updatePattern(Delivery pattern)`
  Updates a delivery pattern.
  `Delivery`
  `updatePattern(String patternId, Delivery pattern)`
  Updates a delivery pattern.
  `Stage`
  `updateStage(Stage stage)`
  Updates a stage in a delivery pattern.
  `Stage`
  `updateStage(String stageId, Stage stage)`
  Updates a stage in a delivery pattern.
  `Stage`
  `updateStageFromBatch(String stageId, Stage stage)`
  Updates a stage in a delivery pattern from as-code.
  `TrackedItem`
  `updateTrackedItem(TrackedItem item)`
  Updates a tracked item.
  `TrackedItem`
  `updateTrackedItem(String itemId, TrackedItem item)`
  Updates a tracked item.
  `Transition`
  `updateTransition(Transition transition)`
  Updates a transition in a delivery pattern.
  `Transition`
  `updateTransition(String transitionId, Transition transition)`
  Updates a transition in a delivery pattern.

- ## Method Details

  - ### serviceName

    default String serviceName()
    Specified by:
      `serviceName` in interface `ApiService`

  - ### createPattern

    @POST Delivery createPattern(Delivery pattern)
    Creates a new delivery pattern.
    Parameters:
      `pattern` - the delivery pattern to be created.
    Returns:
      the created delivery pattern.

  - ### getPattern

    @GET @Path("/{patternId:.*Delivery[^/]*}") Delivery getPattern(@PathParam("patternId") String patternId)
    Returns a delivery pattern by ID.
    Parameters:
      `patternId` - the pattern identifier.
    Returns:
      the pattern which has the given identifier.

  - ### getPatternByIdOrTitle

    @GET @Path("/{patternIdOrTitle}") Delivery getPatternByIdOrTitle(@PathParam("patternIdOrTitle") String patternIdOrTitle)
    Returns a delivery pattern by ID or title.
    Parameters:
      `patternIdOrTitle` - the pattern ID or title.
    Returns:
      the pattern which has the given ID or the given title.

  - ### checkTitleUnique

    @POST @Path("/checkTitle") boolean checkTitleUnique(ValidatePattern validation)

  - ### updatePattern

    @PUT @Path("/{patternId:.*Delivery[^/]*}") Delivery updatePattern(@PathParam("patternId") String patternId, Delivery pattern)
    Updates a delivery pattern.
    Parameters:
      `patternId` - the pattern identifier.
      `pattern` - new contents of the pattern.
    Returns:
      the updated pattern.

  - ### updatePattern

    Delivery updatePattern(Delivery pattern)
    Updates a delivery pattern.
    Parameters:
      `pattern` - new contents of the pattern.
    Returns:
      the updated pattern.

  - ### deletePattern

    @DELETE @Path("/{patternId:.*Delivery[^/]*}") void deletePattern(@PathParam("patternId") String patternId)
    Deletes a delivery pattern.
    Parameters:
      `patternId` - the pattern identifier.

  - ### duplicatePattern

    @POST @Path("/{patternId:.*Delivery[^/]*}/duplicate") Delivery duplicatePattern(@PathParam("patternId") String patternId, DuplicateDeliveryPattern duplicateDeliveryPattern)

  - ### createDeliveryFromPattern

    @POST @Path("/{patternId:.*Delivery[^/]*}/create") Delivery createDeliveryFromPattern(@PathParam("patternId") String patternId, CreateDelivery createDelivery)
    Creates a delivery from a delivery pattern.
    Parameters:
      `patternId` - the identifier of the delivery pattern the delivery is based on.
      `createDelivery` - the parameters for the new delivery.
    Returns:
      the newly created delivery.

  - ### searchPatterns

    @POST @Path("search") List<Delivery> searchPatterns(DeliveryPatternFilters filters, @DefaultValue("0") @QueryParam("page") Long page, @DefaultValue("100") @QueryParam("resultsPerPage") Long resultsPerPage)
    Search delivery patterns by filters.
    Parameters:
      `filters` - the search criteria.
      `page` - the page of results to return. Default value is 0.
      `resultsPerPage` - the number of results per page. Default and maximum value is 100.
    Returns:
      the list of matching delivery patterns.

  - ### searchPatterns

    List<Delivery> searchPatterns(DeliveryPatternFilters filters)
    Search delivery patterns by filters with default pagination.
    Parameters:
      `filters` - the search criteria.
    Returns:
      the list of matching delivery patterns.

  - ### createStage

    @POST @Path("/{patternId:.*Delivery[^/]*}/stages") Stage createStage(@PathParam("patternId") String patternId, Stage stage)
    Adds a stage to a pattern.
    Parameters:
      `patternId` - the pattern identifier.
      `stage` - the stage to be added to the delivery pattern.
    Returns:
      the created stage.

  - ### createStage

    @POST @Path("/{patternId:.*Delivery[^/]*}/stages/{position:\\d+}") Stage createStage(@PathParam("patternId") String patternId, Stage stage, @PathParam("position") Integer position)

  - ### createStage

    @POST @Path("/{patternId:.*Delivery[^/]*}/createStage") Stage createStage(@PathParam("patternId") String patternId, CreateDeliveryStage form)

  - ### getStages

    @GET @Path("/{patternId:.*Delivery[^/]*}/stages") List<Stage> getStages(@PathParam("patternId") String patternId)
    Returns the stages in a given delivery pattern.
    Parameters:
      `patternId` - the pattern identifier.
    Returns:
      stages in the delivery pattern.

  - ### updateStage

    Stage updateStage(Stage stage)
    Updates a stage in a delivery pattern.
    Parameters:
      `stage` - new contents of the stage.
    Returns:
      the updated stage.

  - ### updateStage

    @PUT @Path("/{stageId:.*Stage[^/]*}") Stage updateStage(@PathParam("stageId") String stageId, Stage stage)
    Updates a stage in a delivery pattern.
    Parameters:
      `stageId` - the full stage identifier.
      `stage` - new contents of the stage.
    Returns:
      the updated stage.

  - ### updateStageFromBatch

    @PUT @Path("/{stageId:.*Stage[^/]*}/batched") Stage updateStageFromBatch(@PathParam("stageId") String stageId, Stage stage)
    Updates a stage in a delivery pattern from as-code.
    Parameters:
      `stageId` - the full stage identifier.
      `stage` - new contents of the stage.
    Returns:
      the updated stage.

  - ### deleteStage

    @DELETE @Path("/{stageId:.*Stage[^/]*}") void deleteStage(@PathParam("stageId") String stageId)
    Deletes a stage in a delivery pattern.
    Parameters:
      `stageId` - the full stage identifier.

  - ### createTransition

    @POST @Path("/{stageId:.*Stage[^/]*}/transitions") Transition createTransition(@PathParam("stageId") String stageId, Transition transition)
    Adds a transition to a stage in a delivery pattern.
    Parameters:
      `stageId` - the full stage identifier.
      `transition` - the transition to be added to a stage.
    Returns:
      the created transition.

  - ### updateTransition

    @PUT @Path("/{transitionId:.*Transition[^/]*}") Transition updateTransition(@PathParam("transitionId") String transitionId, Transition transition)
    Updates a transition in a delivery pattern.
    Parameters:
      `transitionId` - the full transition identifier.
      `transition` - new contents of the transition.
    Returns:
      the updated transition.

  - ### updateTransition

    Transition updateTransition(Transition transition)
    Updates a transition in a delivery pattern.
    Parameters:
      `transition` - new contents of the transition.
    Returns:
      the updated transition.

  - ### deleteTransition

    @DELETE @Path("/{transitionId:.*Transition[^/]*}") void deleteTransition(@PathParam("transitionId") String transitionId)
    Deletes a transition in a delivery pattern.
    Parameters:
      `transitionId` - the full transition identifier.

  - ### createTrackedItem

    @POST @Path("/{patternId:.*Delivery[^/]*}/tracked-items") TrackedItem createTrackedItem(@PathParam("patternId") String patternId, TrackedItem item)
    Adds a tracked item to a delivery pattern.
    Parameters:
      `patternId` - the pattern identifier.
      `item` - the item to be added to the delivery pattern.
    Returns:
      the created item.

  - ### getTrackedItems

    @GET @Path("/{patternId:.*Delivery[^/]*}/tracked-items") List<TrackedItem> getTrackedItems(@PathParam("patternId") String patternId)
    Returns the tracked items associated with given delivery pattern.
    Parameters:
      `patternId` - the pattern identifier.
    Returns:
      tracked items associated with the delivery pattern.

  - ### updateTrackedItem

    @PUT @Path("/{itemId:.*TrackedItem[^/]*}") TrackedItem updateTrackedItem(@PathParam("itemId") String itemId, TrackedItem item)
    Updates a tracked item.
    Parameters:
      `itemId` - the full item identifier.
      `item` - new contents of the item.
    Returns:
      the updated item.

  - ### updateTrackedItem

    TrackedItem updateTrackedItem(TrackedItem item)
    Updates a tracked item.
    Parameters:
      `item` - new contents of the item.
    Returns:
      the updated item.

  - ### deleteTrackedItem

    @DELETE @Path("/{itemId:.*TrackedItem[^/]*}") void deleteTrackedItem(@PathParam("itemId") String itemId)
    Deletes a tracked item.
    Parameters:
      `itemId` - the full item identifier.