Package com.xebialabs.xlrelease.api.v1

## Interface TriggersApi

- All Superinterfaces:
    `ApiService`

      @Path("/api/v1/triggers")
      @Consumes("application/json")
      @Produces("application/json")
      public interface TriggersApi
      extends ApiService

  Operations on triggers.

- - ### 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
    --- | --- | ---
    `Trigger` | `addTrigger​(Trigger trigger)` | Create new trigger.
    `BulkActionResultView` | `disableAllTriggers()` |
    `void` | `disableTrigger​(java.lang.String triggerId)` | Disables a trigger.
    `BulkActionResultView` | `disableTriggers​(java.util.List<java.lang.String> triggerIds)` | Disables triggers with given identifiers.
    `BulkActionResultView` | `enableAllTriggers()` |
    `void` | `enableTrigger​(java.lang.String triggerId)` | Enables a trigger.
    `BulkActionResultView` | `enableTriggers​(java.util.List<java.lang.String> triggerIds)` | Enables triggers with given identifiers.
    `Trigger` | `getTrigger​(java.lang.String triggerId)` | Returns the trigger with the given ID.
    `java.util.List<Descriptor>` | `getTypes()` | Returns the list of trigger types.
    `void` | `removeTrigger​(java.lang.String triggerId)` | Deletes a trigger.
    `void` | `runTrigger​(java.lang.String triggerId)` | Executes trigger with given identifier.
    `java.util.List<ReleaseTriggerOverview>` | `searchTriggers​(TriggerFilters triggerFilters, int page, int resultsPerPage)` | Gets List of Triggers with default sort.
    `org.springframework.data.domain.Page<ReleaseTriggerOverview>` | `searchTriggers​(TriggerFilters triggerFilters, int page, int resultsPerPage, javax.ws.rs.core.UriInfo uriInfo)` | Searches release triggers by filters.
    `java.util.List<ReleaseTriggerOverview>` | `searchTriggers​(TriggerFilters triggerFilters, int page, int resultsPerPage, org.springframework.data.domain.Sort sort)` | Gets List of Triggers with sort parameters.
    `default java.lang.String` | `serviceName()` |
    `Trigger` | `updateTrigger​(java.lang.String triggerId, Trigger trigger)` | Updates the properties of a trigger.

- - ### Method Detail

    - #### serviceName

          default java.lang.String serviceName()

      Specified by:
        `serviceName` in interface `ApiService`

    - #### searchTriggers

          @GET
          org.springframework.data.domain.Page<ReleaseTriggerOverview> searchTriggers​(@BeanParam
                                                                                      TriggerFilters triggerFilters,
                                                                                      @DefaultValue("0") @QueryParam("page")
                                                                                      int page,
                                                                                      @DefaultValue("100") @QueryParam("resultsPerPage")
                                                                                      int resultsPerPage,
                                                                                      @Context
                                                                                      javax.ws.rs.core.UriInfo uriInfo)

      Searches release triggers by filters.
      Parameters:
        `triggerFilters` - query parameters derived from TriggerFilters property names used as a 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.
        `uriInfo` - sort options encoded as URL query parameters (https://docs.spring.io/spring-data/rest/docs/current/reference/html/#paging-and-sorting.sorting)
      Returns:
        the list of matching release triggers

    - #### searchTriggers

          java.util.List<ReleaseTriggerOverview> searchTriggers​(TriggerFilters triggerFilters,
                                                                int page,
                                                                int resultsPerPage,
                                                                org.springframework.data.domain.Sort sort)

      Gets List of Triggers with sort parameters.
      Parameters:
        `triggerFilters` - 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.
        `sort` - the sorting criteria (https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/domain/Sort.html)
      Returns:
        found `List<ReleaseTriggerOverview>` object

    - #### searchTriggers

          java.util.List<ReleaseTriggerOverview> searchTriggers​(TriggerFilters triggerFilters,
                                                                int page,
                                                                int resultsPerPage)

      Gets List of Triggers with default sort.
      Parameters:
        `triggerFilters` - 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:
        found `List<ReleaseTriggerOverview>` object

    - #### enableTrigger

          @PUT
          @Path("/{triggerId:.*/Trigger[^/]*}/enable")
          void enableTrigger​(@PathParam("triggerId")
                             java.lang.String triggerId)

      Enables a trigger.
      Parameters:
        `triggerId` - the identifier of the trigger.

    - #### enableTriggers

          @POST
          @Path("enable")
          BulkActionResultView enableTriggers​(java.util.List<java.lang.String> triggerIds)

      Enables triggers with given identifiers.
      Parameters:
        `triggerIds` - list of trigger identifiers.
      Returns:
        list of successfully enabled trigger identifiers.

    - #### enableAllTriggers

          @POST
          @Path("enable/all")
          BulkActionResultView enableAllTriggers()

    - #### disableTrigger

          @PUT
          @Path("/{triggerId:.*/Trigger[^/]*}/disable")
          void disableTrigger​(@PathParam("triggerId")
                              java.lang.String triggerId)

      Disables a trigger.
      Parameters:
        `triggerId` - the identifier of the trigger.

    - #### disableTriggers

          @POST
          @Path("disable")
          BulkActionResultView disableTriggers​(java.util.List<java.lang.String> triggerIds)

      Disables triggers with given identifiers.
      Parameters:
        `triggerIds` - list of trigger identifiers.
      Returns:
        list of successfully disabled trigger identifiers.

    - #### disableAllTriggers

          @POST
          @Path("disable/all")
          BulkActionResultView disableAllTriggers()

    - #### removeTrigger

          @DELETE
          @Path("{triggerId:.*/Trigger[^/]*}")
          void removeTrigger​(@PathParam("triggerId")
                             java.lang.String triggerId)

      Deletes a trigger.
      Parameters:
        `triggerId` - the identifier of the trigger.

    - #### runTrigger

          @POST
          @Path("{triggerId:.*/Trigger[^/]*}/run")
          void runTrigger​(@PathParam("triggerId")
                          java.lang.String triggerId)

      Executes trigger with given identifier.
      Parameters:
        `triggerId` - the identifier of the trigger.

    - #### getTypes

          @GET
          @Path("types")
          java.util.List<Descriptor> getTypes()

      Returns the list of trigger types.
      Returns:
        the list of trigger types.

    - #### addTrigger

          @POST
          Trigger addTrigger​(Trigger trigger)

      Create new trigger.
      Parameters:
        `trigger` - the trigger to create.
      Returns:
        created trigger.

    - #### getTrigger

          @GET
          @Path("{triggerId:.*Trigger[^/-]*}")
          Trigger getTrigger​(@PathParam("triggerId")
                             java.lang.String triggerId)

      Returns the trigger with the given ID.
      Parameters:
        `triggerId` - the identifier of the trigger.
      Returns:
        the trigger.

    - #### updateTrigger

          @PUT
          @Path("{triggerId:.*Trigger[^/-]*}")
          Trigger updateTrigger​(@PathParam("triggerId")
                                java.lang.String triggerId,
                                Trigger trigger)

      Updates the properties of a trigger.
      Parameters:
        `triggerId` - the identifier of the trigger.
        `trigger` - new contents of the trigger.
      Returns:
        the updated trigger.