Interface ReleaseApi

  • All Superinterfaces:
    ApiService

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

      • serviceName

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

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

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

        @POST
        @Path("count")
        ReleaseCountResults countReleases​(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")
        java.util.List<Release> searchReleases​(ReleasesFilters releasesFilters,
                                               @DefaultValue("0") @QueryParam("page")
                                               java.lang.Long page,
                                               @DefaultValue("100") @QueryParam("resultsPerPage")
                                               java.lang.Long resultsPerPage,
                                               @DefaultValue("false") @QueryParam("pageIsOffset")
                                               java.lang.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

        java.util.List<Release> searchReleases​(ReleasesFilters releasesFilters,
                                               java.lang.Long page,
                                               java.lang.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

        java.util.List<Release> searchReleases​(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")
        ReleaseFullSearchResult fullSearchReleases​(@QueryParam("page")
                                                   java.lang.Long page,
                                                   @QueryParam("archivePage")
                                                   java.lang.Long archivePage,
                                                   @QueryParam("resultsPerPage")
                                                   java.lang.Long resultsPerPage,
                                                   @QueryParam("archiveResultsPerPage")
                                                   java.lang.Long archiveResultsPerPage,
                                                   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("/")
        java.util.List<Release> getReleases​(@DefaultValue("0") @QueryParam("page")
                                            java.lang.Long page,
                                            @DefaultValue("100") @QueryParam("resultsPerPage")
                                            java.lang.Long resultsPerPage,
                                            @DefaultValue("1") @QueryParam("depth")
                                            java.lang.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
        java.util.List<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[^/]*}")
        Release getRelease​(@PathParam("releaseId")
                           java.lang.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

        Release getRelease​(java.lang.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[^/]*}")
        Release getArchivedRelease​(@PathParam("releaseId")
                                   java.lang.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

        Release getArchivedRelease​(java.lang.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")
        java.util.List<Task> getActiveTasks​(@PathParam("releaseId")
                                            java.lang.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")
                      java.lang.String releaseId)
        Starts a planned release.
        Parameters:
        releaseId - the release identifier.
        Returns:
        the started release.
      • updateRelease

        @PUT
        @Path("/{releaseId:.*Release[^/]*}")
        Release updateRelease​(@PathParam("releaseId")
                              java.lang.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

        Release updateRelease​(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")
                    java.lang.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")
        Release abort​(@PathParam("releaseId")
                      java.lang.String releaseId,
                      AbortRelease abortRelease)
        Aborts a release.
        Parameters:
        releaseId - the identifier of the release
        abortRelease - the parameters to abort the release
        Returns:
        the aborted release
      • abort

        Release abort​(java.lang.String releaseId,
                      java.lang.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")
        java.util.List<Release> searchReleasesByTitle​(@QueryParam("releaseTitle")
                                                      java.lang.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")
        java.util.List<Variable> getVariables​(@PathParam("releaseId")
                                              java.lang.String releaseId)
        Get release variables.
        Parameters:
        releaseId - the identifier of the release.
        Returns:
        a list of variables.
      • getVariableValues

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

        @GET
        @Path("/{variableId:.*/Variable[^/]*}")
        Variable getVariable​(@PathParam("variableId")
                             java.lang.String variableId)
        Returns the variable for the given identifier.
        Parameters:
        variableId - the variable identifier.
        Returns:
        the variable.
      • getVariablePossibleValues

        @GET
        @Path("/{variableId:.*/Variable[^/]*}/possibleValues")
        java.util.Collection<java.lang.Object> getVariablePossibleValues​(@PathParam("variableId")
                                                                         java.lang.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")
        java.lang.Boolean isVariableUsed​(@PathParam("variableId")
                                         java.lang.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")
                             java.lang.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")
                            java.lang.String variableId)
        Delete variable from release.
        Parameters:
        variableId - the variable ID.
      • createVariable

        @POST
        @Path("/{releaseId:.*?}/variables")
        Variable createVariable​(@PathParam("releaseId")
                                java.lang.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")
        java.util.List<Variable> updateVariables​(@PathParam("releaseId")
                                                 java.lang.String releaseId,
                                                 java.util.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

        @PUT
        @Path("/{variableId:.*/Variable[^/]*}")
        Variable updateVariable​(@PathParam("variableId")
                                java.lang.String variableId,
                                Variable variable)
      • updateVariable

        Variable updateVariable​(Variable variable)
        Updates the properties of a variable.
        Parameters:
        variable - new contents of the variable.
        Returns:
        the updated variable.
      • getPermissions

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

        @GET
        @Path("/{releaseId:.*Release[^/]*}/teams")
        java.util.List<TeamView> getTeams​(@PathParam("releaseId")
                                          java.lang.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")
        java.util.List<TeamView> setTeams​(@PathParam("releaseId")
                                          java.lang.String releaseId,
                                          java.util.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")
                       java.lang.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")
                              java.lang.String releaseId,
                              @QueryParam("fromPhaseId")
                              java.lang.String phaseId,
                              @QueryParam("fromTaskId")
                              java.lang.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 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

        Release restartPhase​(Release release)
        Restart release from the current phase.
        Parameters:
        release - the release.
        Returns:
        the release.
      • restartPhase

        Release restartPhase​(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

        Release restartPhase​(Release release,
                             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

        Release restartPhase​(Release release,
                             Phase phase,
                             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

        Release restartPhase​(Release release,
                             Phase phase,
                             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

        Release restartPhase​(Release release,
                             Phase phase,
                             Task task,
                             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

        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 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