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

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

- ## Method Details

  - ### serviceName

    default 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 jakarta.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

    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

    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") String triggerId)
    Enables a trigger.
    Parameters:
      `triggerId` - the identifier of the trigger.

  - ### enableTriggers

    @POST @Path("enable") BulkActionResultView enableTriggers(List<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") String triggerId)
    Disables a trigger.
    Parameters:
      `triggerId` - the identifier of the trigger.

  - ### disableTriggers

    @POST @Path("disable") BulkActionResultView disableTriggers(List<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") String triggerId)
    Deletes a trigger.
    Parameters:
      `triggerId` - the identifier of the trigger.

  - ### runTrigger

    @POST @Path("{triggerId:.*/Trigger[^/]*}/run") void runTrigger(@PathParam("triggerId") String triggerId)
    Executes trigger with given identifier.
    Parameters:
      `triggerId` - the identifier of the trigger.

  - ### getTypes

    @GET @Path("types") 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") 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") 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.