Package com.xebialabs.xlrelease.api.v1

## Interface DeliveryApi

- All Superinterfaces:
    `ApiService`

      @Path("/api/v1/deliveries")
      @Produces("application/json")
      @Consumes("application/json")
      public interface DeliveryApi
      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

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `completeStage​(java.lang.String stageId)` | Completes a stage in a delivery.
    `void` | `completeTrackedItem​(java.lang.String stageId, java.lang.String itemId)` | Completes a tracked item in stage.
    `void` | `completeTrackedItem​(java.lang.String stageId, java.lang.String itemId, java.lang.String releaseId)` | Completes a tracked item in stage.
    `void` | `completeTransition​(java.lang.String transitionId, CompleteTransition completeTransition)` | Executes a transition on a delivery manually.
    `TrackedItem` | `createTrackedItem​(java.lang.String deliveryId, TrackedItem item)` | Adds a tracked item to a delivery.
    `void` | `deleteDelivery​(java.lang.String deliveryId)` | Deletes a delivery.
    `void` | `deleteTrackedItem​(java.lang.String itemId)` | Deletes a tracked item.
    `void` | `descopeTrackedItem​(java.lang.String itemId)` | Descopes a tracked item.
    `Delivery` | `getDelivery​(java.lang.String deliveryId)` | Returns a delivery by ID.
    `DeliveryTimeline` | `getDeliveryTimeline​(java.lang.String deliveryId)` |
    `java.util.List<DeliveryFlowReleaseInfo>` | `getReleases​(java.lang.String deliveryId)` | Returns releases associated with a given delivery.
    `java.util.List<Stage>` | `getStages​(java.lang.String deliveryId)` | Returns the stages in a given delivery.
    `java.util.List<TrackedItem>` | `getTrackedItems​(java.lang.String deliveryId)` | Returns the tracked items associated with given delivery.
    `java.util.List<TrackedItem>` | `markTrackedItemsInStage​(java.lang.String deliveryId, java.lang.String stageIdOrTitle, java.util.List<java.lang.String> itemIdOrTitles, TrackedItemStatus status, boolean precedingStages, java.lang.String releaseId)` |
    `SubscriptionResult` | `registerSubscriber​(java.lang.String deliveryId, Subscriber subscriber)` |
    `void` | `registerTrackedItems​(java.lang.String deliveryId, java.util.List<java.lang.String> itemIdOrTitles, java.lang.String fromReleaseId)` |
    `void` | `reopenStage​(java.lang.String stageId)` | Reopens a closed stage in a delivery.
    `void` | `rescopeTrackedItem​(java.lang.String itemId)` | Rescopes a tracked item.
    `void` | `resetTrackedItem​(java.lang.String stageId, java.lang.String itemId)` |
    `java.util.List<Delivery>` | `searchDeliveries​(DeliveryFilters deliveryFilters)` | Search deliveries by filters with default pagination and ordering by title.
    `java.util.List<Delivery>` | `searchDeliveries​(DeliveryFilters deliveryFilters, DeliveryOrderMode orderBy)` | Search deliveries by filters with default pagination.
    `java.util.List<Delivery>` | `searchDeliveries​(DeliveryFilters deliveryFilters, java.lang.Long page, java.lang.Long resultsPerPage, DeliveryOrderMode orderBy)` | Search deliveries by filters.
    `default java.lang.String` | `serviceName()` |
    `void` | `skipTrackedItem​(java.lang.String stageId, java.lang.String itemId)` | Skips a tracked item in stage.
    `Delivery` | `updateDelivery​(Delivery delivery)` | Updates a delivery.
    `Delivery` | `updateDelivery​(java.lang.String deliveryId, Delivery delivery)` | Updates a delivery.
    `Stage` | `updateStage​(Stage stage)` | Updates a stage in a delivery.
    `Stage` | `updateStage​(java.lang.String stageId, Stage stage)` | Updates a stage in a delivery.
    `TrackedItem` | `updateTrackedItem​(TrackedItem item)` | Updates a tracked item.
    `TrackedItem` | `updateTrackedItem​(java.lang.String itemId, TrackedItem item)` | Updates a tracked item.
    `Transition` | `updateTransition​(Transition transition)` | Updates a transition on a delivery.
    `Transition` | `updateTransition​(java.lang.String transitionId, Transition transition)` | Updates a transition on a delivery.

- - ### Method Detail

    - #### serviceName

          default java.lang.String serviceName()

      Specified by:
        `serviceName` in interface `ApiService`

    - #### getDelivery

          @GET
          @Path("/{deliveryId:.*Delivery[^/]*}")
          Delivery getDelivery​(@PathParam("deliveryId")
                               java.lang.String deliveryId)

      Returns a delivery by ID.
      Parameters:
        `deliveryId` - the delivery identifier.
      Returns:
        the delivery which has the given identifier.

    - #### updateDelivery

          @PUT
          @Path("/{deliveryId:.*Delivery[^/]*}")
          Delivery updateDelivery​(@PathParam("deliveryId")
                                  java.lang.String deliveryId,
                                  Delivery delivery)

      Updates a delivery.
      Parameters:
        `deliveryId` - the delivery identifier.
        `delivery` - new contents of the delivery.
      Returns:
        the updated delivery.

    - #### updateDelivery

          Delivery updateDelivery​(Delivery delivery)

      Updates a delivery.
      Parameters:
        `delivery` - new contents of the delivery.
      Returns:
        the updated delivery.

    - #### deleteDelivery

          @DELETE
          @Path("/{deliveryId:.*Delivery[^/]*}")
          void deleteDelivery​(@PathParam("deliveryId")
                              java.lang.String deliveryId)

      Deletes a delivery.
      Parameters:
        `deliveryId` - the delivery identifier.

    - #### searchDeliveries

          @POST
          @Path("search")
          java.util.List<Delivery> searchDeliveries​(DeliveryFilters deliveryFilters,
                                                    @DefaultValue("0") @QueryParam("page")
                                                    java.lang.Long page,
                                                    @DefaultValue("100") @QueryParam("resultsPerPage")
                                                    java.lang.Long resultsPerPage,
                                                    @DefaultValue("START_DATE") @QueryParam("orderBy")
                                                    DeliveryOrderMode orderBy)

      Search deliveries by filters.
      Parameters:
        `deliveryFilters` - 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.
        `orderBy` - sort options by which to sort the deliveries. Leave null for ordering by title.
      Returns:
        the list of matching deliveries.

    - #### searchDeliveries

          java.util.List<Delivery> searchDeliveries​(DeliveryFilters deliveryFilters,
                                                    DeliveryOrderMode orderBy)

      Search deliveries by filters with default pagination.
      Parameters:
        `deliveryFilters` - the search criteria.
        `orderBy` - sort options by which to sort the deliveries. Leave null for ordering by title.
      Returns:
        the list of matching deliveries.

    - #### searchDeliveries

          java.util.List<Delivery> searchDeliveries​(DeliveryFilters deliveryFilters)

      Search deliveries by filters with default pagination and ordering by title.
      Parameters:
        `deliveryFilters` - the search criteria.
      Returns:
        the list of matching deliveries.

    - #### getDeliveryTimeline

          @GET
          @Path("/{deliveryId:.*Delivery[^/]*}/timeline")
          DeliveryTimeline getDeliveryTimeline​(@PathParam("deliveryId")
                                               java.lang.String deliveryId)

    - #### getReleases

          @GET
          @Path("/{deliveryId:.*Delivery[^/]*}/releases")
          java.util.List<DeliveryFlowReleaseInfo> getReleases​(@PathParam("deliveryId")
                                                              java.lang.String deliveryId)

      Returns releases associated with a given delivery.
      Parameters:
        `deliveryId` - the delivery identifier.
      Returns:
        the release info associated with the delivery.

    - #### registerSubscriber

          SubscriptionResult registerSubscriber​(java.lang.String deliveryId,
                                                Subscriber subscriber)

    - #### createTrackedItem

          @POST
          @Path("/{deliveryId:.*Delivery[^/]*}/tracked-items")
          TrackedItem createTrackedItem​(@PathParam("deliveryId")
                                        java.lang.String deliveryId,
                                        TrackedItem item)

      Adds a tracked item to a delivery.
      Parameters:
        `deliveryId` - the delivery identifier.
        `item` - the item to be added to the delivery.
      Returns:
        the created item.

    - #### getTrackedItems

          @GET
          @Path("/{deliveryId:.*Delivery[^/]*}/tracked-items")
          java.util.List<TrackedItem> getTrackedItems​(@PathParam("deliveryId")
                                                      java.lang.String deliveryId)

      Returns the tracked items associated with given delivery.
      Parameters:
        `deliveryId` - the delivery identifier.
      Returns:
        tracked items associated with the delivery.

    - #### updateTrackedItem

          @PUT
          @Path("/{itemId:.*TrackedItem[^/]*}")
          TrackedItem updateTrackedItem​(@PathParam("itemId")
                                        java.lang.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")
                                 java.lang.String itemId)

      Deletes a tracked item.
      Parameters:
        `itemId` - the full item identifier.

    - #### descopeTrackedItem

          @PUT
          @Path("/{itemId:.*TrackedItem[^/]*}/descope")
          void descopeTrackedItem​(@PathParam("itemId")
                                  java.lang.String itemId)

      Descopes a tracked item.
      Parameters:
        `itemId` - the full item identifier.

    - #### rescopeTrackedItem

          @PUT
          @Path("/{itemId:.*TrackedItem[^/]*}/rescope")
          void rescopeTrackedItem​(@PathParam("itemId")
                                  java.lang.String itemId)

      Rescopes a tracked item.
      Parameters:
        `itemId` - the full item identifier.

    - #### completeTrackedItem

          @PUT
          @Path("/{stageId:.*Stage[^/]*}/{itemId:.*TrackedItem[^/]*}/complete")
          void completeTrackedItem​(@PathParam("stageId")
                                   java.lang.String stageId,
                                   @PathParam("itemId")
                                   java.lang.String itemId)

      Completes a tracked item in stage.
      Parameters:
        `stageId` - the full stage identifier.
        `itemId` - the item identifier.

    - #### completeTrackedItem

          @PUT
          @Path("/{stageId:.*Stage[^/]*}/{itemId:.*TrackedItem[^/]*}/{releaseId:.*Release[^/]*}/complete")
          void completeTrackedItem​(@PathParam("stageId")
                                   java.lang.String stageId,
                                   @PathParam("itemId")
                                   java.lang.String itemId,
                                   @PathParam("releaseId")
                                   java.lang.String releaseId)

      Completes a tracked item in stage.
      Parameters:
        `stageId` - the full stage identifier.
        `itemId` - the item identifier.
        `releaseId` - the release identifier that completed item.

    - #### skipTrackedItem

          @PUT
          @Path("/{stageId:.*Stage[^/]*}/{itemId:.*TrackedItem[^/]*}/skip")
          void skipTrackedItem​(@PathParam("stageId")
                               java.lang.String stageId,
                               @PathParam("itemId")
                               java.lang.String itemId)

      Skips a tracked item in stage.
      Parameters:
        `stageId` - the full stage identifier.
        `itemId` - the item identifier.

    - #### resetTrackedItem

          @PUT
          @Path("/{stageId:.*Stage[^/]*}/{itemId:.*TrackedItem[^/]*}/reset")
          void resetTrackedItem​(@PathParam("stageId")
                                java.lang.String stageId,
                                @PathParam("itemId")
                                java.lang.String itemId)

    - #### registerTrackedItems

          void registerTrackedItems​(java.lang.String deliveryId,
                                    java.util.List<java.lang.String> itemIdOrTitles,
                                    java.lang.String fromReleaseId)

    - #### markTrackedItemsInStage

          java.util.List<TrackedItem> markTrackedItemsInStage​(java.lang.String deliveryId,
                                                              java.lang.String stageIdOrTitle,
                                                              java.util.List<java.lang.String> itemIdOrTitles,
                                                              TrackedItemStatus status,
                                                              boolean precedingStages,
                                                              java.lang.String releaseId)

    - #### getStages

          @GET
          @Path("/{deliveryId:.*Delivery[^/]*}/stages")
          java.util.List<Stage> getStages​(@PathParam("deliveryId")
                                          java.lang.String deliveryId)

      Returns the stages in a given delivery.
      Parameters:
        `deliveryId` - the delivery identifier.
      Returns:
        stages in the delivery.

    - #### completeStage

          @POST
          @Path("/{stageId:.*Stage[^/]*}/complete")
          void completeStage​(@PathParam("stageId")
                             java.lang.String stageId)

      Completes a stage in a delivery.
      Parameters:
        `stageId` - the full stage identifier.

    - #### reopenStage

          @POST
          @Path("/{stageId:.*Stage[^/]*}/reopen")
          void reopenStage​(@PathParam("stageId")
                           java.lang.String stageId)

      Reopens a closed stage in a delivery.
      Parameters:
        `stageId` - the full stage identifier.

    - #### updateStage

          Stage updateStage​(Stage stage)

      Updates a stage in a delivery.
      Parameters:
        `stage` - new contents of the stage.
      Returns:
        the updated stage.

    - #### updateStage

          @PUT
          @Path("/{stageId:.*Stage[^/]*}")
          Stage updateStage​(@PathParam("stageId")
                            java.lang.String stageId,
                            Stage stage)

      Updates a stage in a delivery.
      Parameters:
        `stageId` - the full stage identifier.
        `stage` - new contents of the stage.
      Returns:
        the updated stage.

    - #### updateTransition

          @PUT
          @Path("/{transitionId:.*Transition[^/]*}")
          Transition updateTransition​(@PathParam("transitionId")
                                      java.lang.String transitionId,
                                      Transition transition)

      Updates a transition on a delivery.
      Parameters:
        `transitionId` - the full transition identifier.
        `transition` - new contents of the transition.
      Returns:
        the updated transition

    - #### updateTransition

          Transition updateTransition​(Transition transition)

      Updates a transition on a delivery.
      Parameters:
        `transition` - new contents of the transition.
      Returns:
        the updated transition

    - #### completeTransition

          @POST
          @Path("/{transitionId:.*Transition[^/]*}/complete")
          void completeTransition​(@PathParam("transitionId")
                                  java.lang.String transitionId,
                                  CompleteTransition completeTransition)

      Executes a transition on a delivery manually.
      Parameters:
        `transitionId` - the full transition identifier.
        `completeTransition` - the transition completion parameters.