Interface ReleaseApi

All Superinterfaces:
ApiService

@Path("/api/v1/releases") @Consumes("application/json") @Produces("application/json") public interface ReleaseApi extends ApiService
Operations on releases.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final long
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.xebialabs.xlrelease.domain.Release
    abort(String releaseId, com.xebialabs.xlrelease.api.v1.forms.AbortRelease abortRelease)
    Aborts a release.
    com.xebialabs.xlrelease.domain.Release
    abort(String releaseId, String abortComment)
    Aborts a release.
    com.xebialabs.xlrelease.search.ReleaseCountResults
    countReleases(com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters)
    Count releases matching filter criteria.
    com.xebialabs.xlrelease.domain.variables.Variable
    createVariable(String releaseId, com.xebialabs.xlrelease.api.v1.forms.Variable variable)
    Create new variable.
    void
    delete(String releaseId)
    Deletes a release.
    void
    deleteVariable(String variableId)
    Delete variable from release.
    jakarta.ws.rs.core.Response
    downloadAttachment(String attachmentId)
    Returns the attachment file with the given ID.
    com.xebialabs.xlrelease.search.ReleaseFullSearchResult
    fullSearchReleases(Long page, Long archivePage, Long resultsPerPage, Long archiveResultsPerPage, com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters)
    Searches releases.
    List<com.xebialabs.xlrelease.domain.Task>
    Returns the active tasks in a release.
    com.xebialabs.xlrelease.domain.Release
    Returns the archived release for the given ID.
    com.xebialabs.xlrelease.domain.Release
    getArchivedRelease(String releaseId, boolean withRoleIds)
    Returns the archived release for the given ID.
    byte[]
    getAttachment(String attachmentId)
    Returns the attachment file with the given ID.
    Returns possible permissions.
    com.xebialabs.xlrelease.domain.Release
    getRelease(String releaseId)
    Returns the release with the given ID.
    com.xebialabs.xlrelease.domain.Release
    getRelease(String releaseId, boolean withRoleIds)
    Returns the release with the given ID.
    List<com.xebialabs.xlrelease.domain.Release>
    Deprecated.
    List<com.xebialabs.xlrelease.domain.Release>
    getReleases(Long page, Long resultsPerPage, Integer depth)
    Returns the list of planned or active releases that are visible to the current user.
    List<com.xebialabs.xlrelease.api.v1.views.TeamView>
    getTeams(String releaseId)
    Returns effective teams of the release.
    com.xebialabs.xlrelease.domain.variables.Variable
    getVariable(String variableId)
    Returns the variable for the given identifier.
    Returns possible values for the variable with the given identifier.
    List<com.xebialabs.xlrelease.domain.variables.Variable>
    getVariables(String releaseId)
    Get release variables.
    Get release variable values.
    isVariableUsed(String variableId)
    Returns true if variable with the given identifier is used in the release.
    void
    replaceVariable(String variableId, com.xebialabs.xlrelease.api.v1.forms.VariableOrValue variableOrValue)
    Replace variable occurrences with the given replacement.
    com.xebialabs.xlrelease.domain.Release
    restartPhase(com.xebialabs.xlrelease.domain.Release release)
    Restart release from the current phase.
    com.xebialabs.xlrelease.domain.Release
    restartPhase(com.xebialabs.xlrelease.domain.Release release, boolean resumeRelease)
    Restart release from the current phase and optionally resume the release.
    com.xebialabs.xlrelease.domain.Release
    restartPhase(com.xebialabs.xlrelease.domain.Release release, com.xebialabs.xlrelease.domain.Phase phase)
    Restart the release from the given phase.
    com.xebialabs.xlrelease.domain.Release
    restartPhase(com.xebialabs.xlrelease.domain.Release release, com.xebialabs.xlrelease.domain.Phase phase, com.xebialabs.xlrelease.domain.Task task)
    Restart the release from the given phase and task.
    com.xebialabs.xlrelease.domain.Release
    restartPhase(com.xebialabs.xlrelease.domain.Release release, com.xebialabs.xlrelease.domain.Phase phase, com.xebialabs.xlrelease.domain.Task task, com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion)
    Restart the release from the given phase and task.
    com.xebialabs.xlrelease.domain.Release
    restartPhase(com.xebialabs.xlrelease.domain.Release release, com.xebialabs.xlrelease.domain.Phase phase, com.xebialabs.xlrelease.domain.Task task, com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion, boolean resumeRelease)
    Restart the release from the given phase and task and optionally resume the release.
    com.xebialabs.xlrelease.domain.Release
    restartPhase(com.xebialabs.xlrelease.domain.Release release, com.xebialabs.xlrelease.domain.Phase phase, com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion)
    Restart the release from the given phase.
    com.xebialabs.xlrelease.domain.Release
    restartPhases(String releaseId, String phaseId, String taskId, com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion, boolean resumeRelease)
    Restarts the release from a given phase and task.
    com.xebialabs.xlrelease.domain.Release
    resume(String releaseId)
    Resumes a release that has been paused as part of a restart phases operation.
    List<com.xebialabs.xlrelease.domain.Release>
    searchReleases(com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters)
    Searches releases by filters with default pagination.
    List<com.xebialabs.xlrelease.domain.Release>
    searchReleases(com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters, Long page, Long resultsPerPage)
    Searches releases by filters.
    List<com.xebialabs.xlrelease.domain.Release>
    searchReleases(com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters, Long page, Long resultsPerPage, Boolean pageIsOffset)
    Searches releases by filters.
    List<com.xebialabs.xlrelease.domain.Release>
    Search releases by given title (exact match).
    default String
     
    List<com.xebialabs.xlrelease.api.v1.views.TeamView>
    setTeams(String releaseId, List<com.xebialabs.xlrelease.api.v1.views.TeamView> teams)
    Sets teams of the release.
    com.xebialabs.xlrelease.domain.Release
    start(String releaseId)
    Starts a planned release.
    com.xebialabs.xlrelease.domain.Release
    updateRelease(com.xebialabs.xlrelease.domain.Release release)
    Updates the properties of a release.
    com.xebialabs.xlrelease.domain.Release
    updateRelease(String releaseId, com.xebialabs.xlrelease.domain.Release release)
    Updates the properties of a release.
    com.xebialabs.xlrelease.domain.variables.Variable
    updateVariable(com.xebialabs.xlrelease.domain.variables.Variable variable)
    Updates the properties of a variable.
    com.xebialabs.xlrelease.domain.variables.Variable
    updateVariable(String variableId, com.xebialabs.xlrelease.domain.variables.Variable variable)
     
    List<com.xebialabs.xlrelease.domain.variables.Variable>
    updateVariables(String releaseId, List<com.xebialabs.xlrelease.domain.variables.Variable> variables)
    Update the list of variables in a release.
  • Field Details

  • Method Details

    • serviceName

      default String serviceName()
      Specified by:
      serviceName in interface ApiService
    • downloadAttachment

      @GET @Path("attachments/{attachmentId:.*/Attachment[^/]*}") @Produces("application/octet-stream") jakarta.ws.rs.core.Response downloadAttachment(@PathParam("attachmentId") String attachmentId)
      Returns the attachment file with the given ID.
      Parameters:
      attachmentId - the identifier of the attachment
      Returns:
      the attachment file.
    • getAttachment

      byte[] getAttachment(String attachmentId) throws IOException
      Returns the attachment file with the given ID.
      Parameters:
      attachmentId - the identifier of the attachment
      Returns:
      the attachment file.
      Throws:
      IOException
    • countReleases

      @POST @Path("count") com.xebialabs.xlrelease.search.ReleaseCountResults countReleases(com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters)
      Count releases matching filter criteria.
      Parameters:
      releasesFilters - the search criteria
      Returns:
      a map containing the number of releases (total) and the number by status
    • searchReleases

      @POST @Path("search") List<com.xebialabs.xlrelease.domain.Release> searchReleases(com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters, @DefaultValue("0") @QueryParam("page") Long page, @DefaultValue("100") @QueryParam("resultsPerPage") Long resultsPerPage, @DefaultValue("false") @QueryParam("pageIsOffset") Boolean pageIsOffset)
      Searches releases by filters.
      Parameters:
      releasesFilters - 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.
      pageIsOffset - the flag indicating if page is used as offset. Default is false.
      Returns:
      the list of matching releases
    • searchReleases

      List<com.xebialabs.xlrelease.domain.Release> searchReleases(com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters, Long page, Long resultsPerPage)
      Searches releases by filters.
      Parameters:
      releasesFilters - the search criteria
      page - the page of results to return.
      resultsPerPage - the number of results per page.
      Returns:
      the list of matching releases
    • searchReleases

      List<com.xebialabs.xlrelease.domain.Release> searchReleases(com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters)
      Searches releases by filters with default pagination.
      Parameters:
      releasesFilters - the search criteria
      Returns:
      the list of first 100 matching releases
    • fullSearchReleases

      @POST @Path("fullSearch") com.xebialabs.xlrelease.search.ReleaseFullSearchResult fullSearchReleases(@QueryParam("page") Long page, @QueryParam("archivePage") Long archivePage, @QueryParam("resultsPerPage") Long resultsPerPage, @QueryParam("archiveResultsPerPage") Long archiveResultsPerPage, com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters)
      Searches releases.
      Parameters:
      page - next page to query, active database
      archivePage - next page to query, archive database
      resultsPerPage - releases per page, active database
      archiveResultsPerPage - releases per page, archive database
      releasesFilters - the search criteria
      Returns:
      the list of matching releases
    • getReleases

      @GET @Path("/") List<com.xebialabs.xlrelease.domain.Release> getReleases(@DefaultValue("0") @QueryParam("page") Long page, @DefaultValue("100") @QueryParam("resultsPerPage") Long resultsPerPage, @DefaultValue("1") @QueryParam("depth") Integer depth)
      Returns the list of planned or active releases that are visible to the current user.

      Active releases are ordered by the start date (ascending) and title (ascending).

      Parameters:
      page - the page of results to return. Default value is 0.
      resultsPerPage - the number of results per page. Default and maximum value is 100.
      depth - the depth to search for. Default value is 1.
      Returns:
      a list of releases.
    • getReleases

      @Deprecated List<com.xebialabs.xlrelease.domain.Release> getReleases()
      Deprecated.
      Returns the list of the first 100 planned or active releases that are visible to the current user with depth 1.
    • getRelease

      @GET @Path("/{releaseId:((?!archived).)*Release[^/]*}") com.xebialabs.xlrelease.domain.Release getRelease(@PathParam("releaseId") String releaseId, @DefaultValue("false") @QueryParam("roleIds") boolean withRoleIds)
      Returns the release with the given ID.
      Parameters:
      releaseId - the identifier of the release.
      withRoleIds - if true exposes roleIds in response.
      Returns:
      the release.
    • getRelease

      com.xebialabs.xlrelease.domain.Release getRelease(String releaseId)
      Returns the release with the given ID.
      Parameters:
      releaseId - the identifier of the release.
      Returns:
      the release.
    • getArchivedRelease

      @GET @Path("/archived/{releaseId:.*Release[^/]*}") com.xebialabs.xlrelease.domain.Release getArchivedRelease(@PathParam("releaseId") String releaseId, @DefaultValue("false") @QueryParam("roleIds") boolean withRoleIds)
      Returns the archived release for the given ID.
      Parameters:
      releaseId - the identifier of the release.
      withRoleIds - if true exposes roleIds in response.
      Returns:
      the release.
    • getArchivedRelease

      com.xebialabs.xlrelease.domain.Release getArchivedRelease(String releaseId)
      Returns the archived release for the given ID.
      Parameters:
      releaseId - the identifier of the release.
      Returns:
      the release.
    • getActiveTasks

      @GET @Path("/{releaseId:.*Release[^/]*}/active-tasks") List<com.xebialabs.xlrelease.domain.Task> getActiveTasks(@PathParam("releaseId") String releaseId)
      Returns the active tasks in a release.
      Parameters:
      releaseId - the identifier of the release
      Returns:
      a list of active tasks.
    • start

      @POST @Path("/{releaseId:.*Release[^/]*}/start") com.xebialabs.xlrelease.domain.Release start(@PathParam("releaseId") String releaseId)
      Starts a planned release.
      Parameters:
      releaseId - the release identifier.
      Returns:
      the started release.
    • updateRelease

      @PUT @Path("/{releaseId:.*Release[^/]*}") com.xebialabs.xlrelease.domain.Release updateRelease(@PathParam("releaseId") String releaseId, com.xebialabs.xlrelease.domain.Release release)
      Updates the properties of a release.
      Parameters:
      releaseId - the identifier of the release.
      release - new contents of the release.
      Returns:
      the updated release.
    • updateRelease

      com.xebialabs.xlrelease.domain.Release updateRelease(com.xebialabs.xlrelease.domain.Release release)
      Updates the properties of a release.
      Parameters:
      release - new contents of the release.
      Returns:
      the updated release.
    • delete

      @DELETE @Path("/{releaseId:.*Release[^/]*}") void delete(@PathParam("releaseId") String releaseId)
      Deletes a release. The release MUST be in a final state (complete or aborted).
      Parameters:
      releaseId - the identifier of the release
    • abort

      @POST @Path("/{releaseId:.*Release[^/]*}/abort") com.xebialabs.xlrelease.domain.Release abort(@PathParam("releaseId") String releaseId, com.xebialabs.xlrelease.api.v1.forms.AbortRelease abortRelease)
      Aborts a release.
      Parameters:
      releaseId - the identifier of the release
      abortRelease - the parameters to abort the release
      Returns:
      the aborted release
    • abort

      com.xebialabs.xlrelease.domain.Release abort(String releaseId, String abortComment)
      Aborts a release.
      Parameters:
      releaseId - the identifier of the release
      abortComment - the comment of the abort
      Returns:
      the aborted release
    • searchReleasesByTitle

      @GET @Path("/byTitle") List<com.xebialabs.xlrelease.domain.Release> searchReleasesByTitle(@QueryParam("releaseTitle") String releaseTitle)
      Search releases by given title (exact match).
      Parameters:
      releaseTitle - The title of the release.
      Returns:
      a list of releases.
    • getVariables

      @GET @Path("/{releaseId:.*Release[^/]*}/variables") List<com.xebialabs.xlrelease.domain.variables.Variable> getVariables(@PathParam("releaseId") String releaseId)
      Get release variables.
      Parameters:
      releaseId - the identifier of the release.
      Returns:
      a list of variables.
    • getVariableValues

      @GET @Path("/{releaseId:.*Release[^/]*}/variableValues") Map<String,String> getVariableValues(@PathParam("releaseId") String releaseId)
      Get release variable values.
      Parameters:
      releaseId - the identifier of the release.
      Returns:
      a list of variable values.
    • getVariable

      @GET @Path("/{variableId:.*/Variable[^/]*}") com.xebialabs.xlrelease.domain.variables.Variable getVariable(@PathParam("variableId") String variableId)
      Returns the variable for the given identifier.
      Parameters:
      variableId - the variable identifier.
      Returns:
      the variable.
    • getVariablePossibleValues

      @GET @Path("/{variableId:.*/Variable[^/]*}/possibleValues") Collection<Object> getVariablePossibleValues(@PathParam("variableId") String variableId)
      Returns possible values for the variable with the given identifier.
      Parameters:
      variableId - the variable identifier.
      Returns:
      possible values for the variable.
    • isVariableUsed

      @GET @Path("/{variableId:.*/Variable[^/]*}/used") Boolean isVariableUsed(@PathParam("variableId") String variableId)
      Returns true if variable with the given identifier is used in the release.
      Parameters:
      variableId - the variable ID.
      Returns:
      true if variable with the given identifier is used in the release.
    • replaceVariable

      @POST @Path("/{variableId:.*/Variable[^/]*}/replace") void replaceVariable(@PathParam("variableId") String variableId, com.xebialabs.xlrelease.api.v1.forms.VariableOrValue variableOrValue)
      Replace variable occurrences with the given replacement.
      Parameters:
      variableId - the variable ID.
      variableOrValue - an object with a variable or value replacing the initial variable.
    • deleteVariable

      @DELETE @Path("/{variableId:.*/Variable[^/]*}") void deleteVariable(@PathParam("variableId") String variableId)
      Delete variable from release.
      Parameters:
      variableId - the variable ID.
    • createVariable

      @POST @Path("/{releaseId:.*?}/variables") com.xebialabs.xlrelease.domain.variables.Variable createVariable(@PathParam("releaseId") String releaseId, com.xebialabs.xlrelease.api.v1.forms.Variable variable)
      Create new variable.
      Parameters:
      releaseId - the identifier of the release.
      variable - the variable to create.
      Returns:
      created variable.
    • updateVariables

      @PUT @Path("/{releaseId:.*?}/variables") List<com.xebialabs.xlrelease.domain.variables.Variable> updateVariables(@PathParam("releaseId") String releaseId, List<com.xebialabs.xlrelease.domain.variables.Variable> variables)
      Update the list of variables in a release.
      Parameters:
      releaseId - the identifier of the release.
      variables - the variable list to update.
      Returns:
      updated variables.
    • updateVariable

      @PUT @Path("/{variableId:.*/Variable[^/]*}") com.xebialabs.xlrelease.domain.variables.Variable updateVariable(@PathParam("variableId") String variableId, com.xebialabs.xlrelease.domain.variables.Variable variable)
    • updateVariable

      com.xebialabs.xlrelease.domain.variables.Variable updateVariable(com.xebialabs.xlrelease.domain.variables.Variable variable)
      Updates the properties of a variable.
      Parameters:
      variable - new contents of the variable.
      Returns:
      the updated variable.
    • getPermissions

      @GET @Path("/permissions") List<String> getPermissions()
      Returns possible permissions.
      Returns:
      list of permissions for releases
    • getTeams

      @GET @Path("/{releaseId:.*Release[^/]*}/teams") List<com.xebialabs.xlrelease.api.v1.views.TeamView> getTeams(@PathParam("releaseId") String releaseId)
      Returns effective teams of the release.
      Parameters:
      releaseId - the identifier of the release
      Returns:
      a list of effective teams
    • setTeams

      @POST @Path("/{releaseId:.*Release[^/]*}/teams") List<com.xebialabs.xlrelease.api.v1.views.TeamView> setTeams(@PathParam("releaseId") String releaseId, List<com.xebialabs.xlrelease.api.v1.views.TeamView> teams)
      Sets teams of the release.
      Parameters:
      releaseId - the identifier of the release
      Returns:
      a list of updated teams
    • resume

      @POST @Path("/{releaseId:.*Release[^/]*}/resume") com.xebialabs.xlrelease.domain.Release resume(@PathParam("releaseId") String releaseId)
      Resumes a release that has been paused as part of a restart phases operation.
      Parameters:
      releaseId - the identifier of the release
      Returns:
      the release
    • restartPhases

      @POST @Path("/{releaseId:.*Release[^/]*}/restart") com.xebialabs.xlrelease.domain.Release restartPhases(@PathParam("releaseId") String releaseId, @QueryParam("fromPhaseId") String phaseId, @QueryParam("fromTaskId") String taskId, @QueryParam("phaseVersion") com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion, @QueryParam("resume") boolean resumeRelease)
      Restarts the release from a given phase and task.
      Parameters:
      releaseId - the identifier of the release
      phaseId - the identifier of the phase to restart from
      taskId - the identifier of the task to restart from
      phaseVersion - provide which 'version' of the phase should be copied
      resumeRelease - if true resumes the paused release immediately
      Returns:
      the release
    • restartPhase

      com.xebialabs.xlrelease.domain.Release restartPhase(com.xebialabs.xlrelease.domain.Release release)
      Restart release from the current phase.
      Parameters:
      release - the release.
      Returns:
      the release.
    • restartPhase

      com.xebialabs.xlrelease.domain.Release restartPhase(com.xebialabs.xlrelease.domain.Release release, boolean resumeRelease)
      Restart release from the current phase and optionally resume the release.
      Parameters:
      release - the release.
      resumeRelease - if true resumes the paused release immediately
      Returns:
      the release.
    • restartPhase

      com.xebialabs.xlrelease.domain.Release restartPhase(com.xebialabs.xlrelease.domain.Release release, com.xebialabs.xlrelease.domain.Phase phase)
      Restart the release from the given phase. Creates copies of all phases between the given phase and the current phase.

      Will copy all phases between given Phase and the active phase of the release. If you want to only copy the latest phases, use method below to influence this behavior.

      Parameters:
      release - the release
      phase - the phase to restart from
      Returns:
      the release
    • restartPhase

      com.xebialabs.xlrelease.domain.Release restartPhase(com.xebialabs.xlrelease.domain.Release release, com.xebialabs.xlrelease.domain.Phase phase, com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion)
      Restart the release from the given phase. Depending on 'phaseVersion' it will have a different copy strategy.
      Parameters:
      release - the release
      phase - the phase to restart from
      phaseVersion - the given phase version
      Returns:
      the release
    • restartPhase

      com.xebialabs.xlrelease.domain.Release restartPhase(com.xebialabs.xlrelease.domain.Release release, com.xebialabs.xlrelease.domain.Phase phase, com.xebialabs.xlrelease.domain.Task task)
      Restart the release from the given phase and task.

      Will copy all phases between given Phase and the active phase of the release. If you want to only copy the latest phases, use method below to influence this behavior.

      Parameters:
      release - the release
      phase - the phase to restart from
      task - the task to restart from
      Returns:
      the release
    • restartPhase

      com.xebialabs.xlrelease.domain.Release restartPhase(com.xebialabs.xlrelease.domain.Release release, com.xebialabs.xlrelease.domain.Phase phase, com.xebialabs.xlrelease.domain.Task task, com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion)
      Restart the release from the given phase and task.
      Parameters:
      release - the release
      phase - the phase to restart from
      task - the task to restart from
      phaseVersion - the given phase version
      Returns:
      the release
    • restartPhase

      com.xebialabs.xlrelease.domain.Release restartPhase(com.xebialabs.xlrelease.domain.Release release, com.xebialabs.xlrelease.domain.Phase phase, com.xebialabs.xlrelease.domain.Task task, com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion, boolean resumeRelease)
      Restart the release from the given phase and task and optionally resume the release.
      Parameters:
      release - the release
      phase - the phase to restart from
      task - the task to restart from
      phaseVersion - the given phase version
      resumeRelease - if true resumes the paused release immediately
      Returns:
      the release