Package com.xebialabs.xlrelease.api.v1
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
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final long
static final String
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 TypeMethodDescriptionabort
(String releaseId, AbortRelease abortRelease) Aborts a release.Aborts a release.countReleases
(ReleasesFilters releasesFilters) Count releases matching filter criteria.createVariable
(String releaseId, Variable variable) Create new variable.void
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.fullSearchReleases
(Long page, Long archivePage, Long resultsPerPage, Long archiveResultsPerPage, ReleasesFilters releasesFilters) Searches releases.getActiveTasks
(String releaseId) Returns the active tasks in a release.getArchivedRelease
(String releaseId) Returns the archived release for the given ID.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.getRelease
(String releaseId) Returns the release with the given ID.getRelease
(String releaseId, boolean withRoleIds) Returns the release with the given ID.Deprecated.Since 24.1.0.getReleases
(Long page, Long resultsPerPage) Returns the list of planned or active releases that are visible to the current user.getReleases
(Long page, Long resultsPerPage, Integer depth) Deprecated.Since 24.1.0.Returns effective teams of the release.getVariable
(String variableId) Returns the variable for the given identifier.getVariablePossibleValues
(String variableId) Returns possible values for the variable with the given identifier.getVariables
(String releaseId) Get release variables.getVariableValues
(String releaseId) Get release variable values.isVariableUsed
(String variableId) Returns true if variable with the given identifier is used in the release.void
replaceVariable
(String variableId, VariableOrValue variableOrValue) Replace variable occurrences with the given replacement.restartPhase
(Release release) Restart release from the current phase.restartPhase
(Release release, boolean resumeRelease) Restart release from the current phase and optionally resume the release.restartPhase
(Release release, Phase phase) Restart the release from the given phase.restartPhase
(Release release, Phase phase, Task task) Restart the release from the given phase and task.restartPhase
(Release release, Phase phase, Task task, PhaseVersion phaseVersion) Restart the release from the given phase and task.restartPhase
(Release release, Phase phase, Task task, PhaseVersion phaseVersion, boolean resumeRelease) Restart the release from the given phase and task and optionally resume the release.restartPhase
(Release release, Phase phase, PhaseVersion phaseVersion) Restart the release from the given phase.restartPhases
(String releaseId, String phaseId, String taskId, PhaseVersion phaseVersion, boolean resumeRelease) Restarts the release from a given phase and task.Resumes a release that has been paused as part of a restart phases operation.searchReleases
(ReleasesFilters releasesFilters) Searches releases by filters with default pagination.searchReleases
(ReleasesFilters releasesFilters, Long page, Long resultsPerPage) Searches releases by filters.searchReleases
(ReleasesFilters releasesFilters, Long page, Long resultsPerPage, Boolean pageIsOffset) Searches releases by filters.searchReleasesByTitle
(String releaseTitle) Search releases by given title (exact match).searchReleasesOverview
(ReleasesFilters releasesFilters, Long page, Long resultsPerPage) Searches releases overview by filters.default String
Sets teams of the release.Starts a planned release.updateRelease
(Release release) Updates the properties of a release.updateRelease
(String releaseId, Release release) Updates the properties of a release.updateVariable
(Variable variable) Updates the properties of a variable.updateVariable
(String variableId, Variable variable) updateVariables
(String releaseId, List<Variable> variables) Update the list of variables in a release.
-
Field Details
-
SERVICE_NAME
- See Also:
-
DEFAULT_PAGE
static final long DEFAULT_PAGE- See Also:
-
ARCHIVE_PAGE
- See Also:
-
ARCHIVE_RESULTS_PER_PAGE
- See Also:
-
-
Method Details
-
serviceName
- Specified by:
serviceName
in interfaceApiService
-
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
Returns the attachment file with the given ID.- Parameters:
attachmentId
- the identifier of the attachment- Returns:
- the attachment file.
- Throws:
IOException
-
countReleases
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<Release> searchReleases(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 criteriapage
- 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
Searches releases by filters.- Parameters:
releasesFilters
- the search criteriapage
- the page of results to return.resultsPerPage
- the number of results per page.- Returns:
- the list of matching releases
-
searchReleases
Searches releases by filters with default pagination.- Parameters:
releasesFilters
- the search criteria- Returns:
- the list of first 100 matching releases
-
searchReleasesOverview
@POST @Path("search/overview") List<BasicReleaseView> searchReleasesOverview(ReleasesFilters releasesFilters, @DefaultValue("0") @QueryParam("page") Long page, @DefaultValue("100") @QueryParam("resultsPerPage") Long resultsPerPage) Searches releases overview by filters.- Parameters:
releasesFilters
- the search criteriapage
- 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 releases
-
fullSearchReleases
@POST @Path("fullSearch") ReleaseFullSearchResult fullSearchReleases(@QueryParam("page") Long page, @QueryParam("archivePage") Long archivePage, @QueryParam("resultsPerPage") Long resultsPerPage, @QueryParam("archiveResultsPerPage") Long archiveResultsPerPage, ReleasesFilters releasesFilters) Searches releases.- Parameters:
page
- next page to query, active databasearchivePage
- next page to query, archive databaseresultsPerPage
- releases per page, active databasearchiveResultsPerPage
- releases per page, archive databasereleasesFilters
- the search criteria- Returns:
- the list of matching releases
-
getReleases
Deprecated.Since 24.1.0. Please usegetReleases(Long, Long)
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.resultsPerPage
- the number of results per page.depth
- the depth to search for.- Returns:
- a list of releases.
-
getReleases
@GET @Path("/") List<Release> getReleases(@DefaultValue("0") @QueryParam("page") Long page, @DefaultValue("100") @QueryParam("resultsPerPage") Long resultsPerPage) 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.- Returns:
- a list of releases.
-
getReleases
Deprecated.Since 24.1.0. Please usegetReleases(Long, Long)
Returns the list of the first 100 planned or active releases that are visible to the current user. -
getRelease
@GET @Path("/{releaseId:((?!archived).)*Release[^/]*}") 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
Returns the release with the given ID.- Parameters:
releaseId
- the identifier of the release.- Returns:
- the release.
-
getArchivedRelease
@GET @Path("/archived/{releaseId:.*Release[^/]*}") 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
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<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") Release start(@PathParam("releaseId") String releaseId) Starts a planned release.- Parameters:
releaseId
- the release identifier.- Returns:
- the started release.
-
updateRelease
@PUT @Path("/{releaseId:.*Release[^/]*}") Release updateRelease(@PathParam("releaseId") String releaseId, 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
Updates the properties of a release.- Parameters:
release
- new contents of the release.- Returns:
- the updated release.
-
delete
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") Release abort(@PathParam("releaseId") String releaseId, AbortRelease abortRelease) Aborts a release.- Parameters:
releaseId
- the identifier of the releaseabortRelease
- the parameters to abort the release- Returns:
- the aborted release
-
abort
Aborts a release.- Parameters:
releaseId
- the identifier of the releaseabortComment
- the comment of the abort- Returns:
- the aborted release
-
searchReleasesByTitle
@GET @Path("/byTitle") List<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<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 map of variable values.
-
getVariable
@GET @Path("/{variableId:.*/Variable[^/]*}") 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, 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") Variable createVariable(@PathParam("releaseId") String releaseId, 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<Variable> updateVariables(@PathParam("releaseId") String releaseId, List<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
-
updateVariable
Updates the properties of a variable.- Parameters:
variable
- new contents of the variable.- Returns:
- the updated variable.
-
getPermissions
Returns possible permissions.- Returns:
- list of permissions for releases
-
getTeams
@GET @Path("/{releaseId:.*Release[^/]*}/teams") List<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<TeamView> setTeams(@PathParam("releaseId") String releaseId, List<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") 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") Release restartPhases(@PathParam("releaseId") String releaseId, @QueryParam("fromPhaseId") String phaseId, @QueryParam("fromTaskId") String taskId, @QueryParam("phaseVersion") PhaseVersion phaseVersion, @QueryParam("resume") boolean resumeRelease) Restarts the release from a given phase and task.- Parameters:
releaseId
- the identifier of the releasephaseId
- the identifier of the phase to restart fromtaskId
- the identifier of the task to restart fromphaseVersion
- provide which 'version' of the phase should be copiedresumeRelease
- if true resumes the paused release immediately- Returns:
- the release
-
restartPhase
Restart release from the current phase.- Parameters:
release
- the release.- Returns:
- the release.
-
restartPhase
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
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 releasephase
- the phase to restart from- Returns:
- the release
-
restartPhase
Restart the release from the given phase. Depending on 'phaseVersion' it will have a different copy strategy.- Parameters:
release
- the releasephase
- the phase to restart fromphaseVersion
- the given phase version- Returns:
- the release
-
restartPhase
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 releasephase
- the phase to restart fromtask
- the task to restart from- Returns:
- the release
-
restartPhase
Restart the release from the given phase and task.- Parameters:
release
- the releasephase
- the phase to restart fromtask
- the task to restart fromphaseVersion
- the given phase version- Returns:
- the release
-
restartPhase
Release restartPhase(Release release, Phase phase, Task task, PhaseVersion phaseVersion, boolean resumeRelease) Restart the release from the given phase and task and optionally resume the release.- Parameters:
release
- the releasephase
- the phase to restart fromtask
- the task to restart fromphaseVersion
- the given phase versionresumeRelease
- if true resumes the paused release immediately- Returns:
- the release
-