@Path(value="result") @Consumes(value={"application/xml","application/json"}) @Produces(value={"application/xml","application/json"}) @Singleton public class ResultResource extends Object
Constructor and Description |
---|
ResultResource(ResultService resultService,
FeatureManager featureManager) |
Modifier and Type | Method and Description |
---|---|
void |
addBuildComment(String projectKey,
String buildKey,
String buildNumber,
RestComment comment,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext,
javax.ws.rs.core.UriInfo uriInfo)
Adds new comment to build result specified by projectKey-buildKey-buildNumber.
|
void |
addBuildLabel(String projectKey,
String buildKey,
String buildNumber,
RestBuildLabel label,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext,
javax.ws.rs.core.UriInfo uriInfo)
Adds new label to build result specified by projectKey-buildKey-buildNumber.
|
RestResults |
getBranchHistory(String projectKey,
String buildKey,
String branchName,
String expandParam,
boolean favouriteParam,
String labelParam,
String issueKeyParam,
boolean allStatesParam,
boolean continuableParam,
boolean buildStateParam,
int startIndexParam,
int maxResultsParam,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide list of build results for specified plan.
|
Result |
getBuild(String projectKey,
String buildKey,
String buildNumber,
String expandParam,
boolean favouriteParam,
int startIndexParam,
int maxResultsParam,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide build result specified by projectKey-buildKey-buildNumber.
|
Result |
getBuildAlias(String projectKey,
String buildKey,
String buildNumber,
String expandParam,
boolean favouriteParam,
int startIndexParam,
int maxResultsParam,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide build result specified by projectKey-buildKey-buildNumber.
|
RestComments |
getBuildComments(String projectKey,
String buildKey,
String buildNumber,
javax.ws.rs.core.UriInfo uriInfo)
Provide list of comments for build result specified by projectKey-buildKey-buildNumber.
|
RestResults |
getBuildHistory(String projectKey,
String buildKey,
String expandParam,
boolean favouriteParam,
String labelParam,
String issueKeyParam,
boolean allStatesParam,
boolean continuableParam,
boolean buildStateParam,
int startIndexParam,
int maxResultsParam,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide list of build results for specified plan.
|
RestBuildLabels |
getBuildLabels(String projectKey,
String buildKey,
String buildNumber,
javax.ws.rs.core.UriInfo uriInfo)
Provide list of labels for build result specified by projectKey-buildKey-buildNumber.
|
RestResults |
getBuildResultsForChangeset(String changesetId,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide list of build results related to changeset id passed as parameter.
|
RestResults |
getBuildResultsForCheckoutChangeset(String changesetId,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide list of build results related to changeset id passed as parameter.
|
RestResults |
getLatestBuildResults(String expandParam,
boolean favouriteParam,
String labelParam,
String issueKeyParam,
boolean allStatesParam,
boolean continuableParam,
boolean buildStateParam,
int startIndexParam,
int maxResultsParam,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide list of latest build results for top level plans visible for users.
|
RestResults |
getLatestBuildResultsForProject(String projectKey,
String expandParam,
boolean favouriteParam,
String labelParam,
String issueKeyParam,
boolean allStatesParam,
boolean continuableParam,
boolean buildStateParam,
int startIndexParam,
int maxResultsParam,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide list of latest build results for top level plans for specified project.
|
RestResultStatus |
getResultStatus(String projectKey,
String buildKey,
String buildNumber,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide runtime information for currently executing build result.
|
void |
removeBuildLabel(String projectKey,
String buildKey,
String buildNumber,
String labelName,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext,
javax.ws.rs.core.UriInfo uriInfo)
Removes label from build result specified by projectKey-buildKey-buildNumber.
|
public ResultResource(ResultService resultService, FeatureManager featureManager)
@GET public RestResults getLatestBuildResults(@QueryParam(value="expand") String expandParam, @QueryParam(value="favourite") boolean favouriteParam, @QueryParam(value="label") String labelParam, @QueryParam(value="issueKey") String issueKeyParam, @QueryParam(value="includeAllStates") boolean allStatesParam, @QueryParam(value="continuable") boolean continuableParam, @QueryParam(value="buildstate") boolean buildStateParam, @QueryParam(value="start-index") int startIndexParam, @QueryParam(value="max-results") int maxResultsParam, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
expandParam
- expands build result details on request. Possible values are: artifacts, comments, labels, jiraIssues, stages. stages expand is available only for top level plans. It allows to drill down to job results using stages.stage.results.result. All expand parameters should contain results.result prefix.favouriteParam
- filters build results list to show only results for favourite plans. Works only for authenticated userlabelParam
- filter by comma separated list of labelsissueKeyParam
- filter by comma separated list of Jira issue key related to resultallStatesParam
- return all build results including Unknown statescontinuableParam
- filter only results that may be continued (stopped on Manual Stage)buildStateParam
- filter results by state, valid values are Unknown, Successful, FailedstartIndexParam
- start index for results list (zero based)maxResultsParam
- maximum size for returned listuriInfo
- authenticationContext
- @GET @Path(value="{projectKey}") public RestResults getLatestBuildResultsForProject(@PathParam(value="projectKey") String projectKey, @QueryParam(value="expand") String expandParam, @QueryParam(value="favourite") boolean favouriteParam, @QueryParam(value="label") String labelParam, @QueryParam(value="issueKey") String issueKeyParam, @QueryParam(value="includeAllStates") boolean allStatesParam, @QueryParam(value="continuable") boolean continuableParam, @QueryParam(value="buildstate") boolean buildStateParam, @QueryParam(value="start-index") int startIndexParam, @QueryParam(value="max-results") int maxResultsParam, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
projectKey
- project key to filter plan result listexpandParam
- expands build result details on request. Possible values are: artifacts, comments, labels, jiraIssues, stages. stages expand is available only for top level plans. It allows to drill down to job results using stages.stage.results.result. All expand parameters should contain results.result prefix.favouriteParam
- filters build results list to show only results for favourite plans. Works only for authenticated userlabelParam
- filter by comma separated list of labelsissueKeyParam
- filter by comma separated list of Jira issue key related to resultallStatesParam
- return all build results including Unknown statescontinuableParam
- filter only results that may be continued (stopped on Manual Stage)buildStateParam
- filter results by state, valid values are Unknown, Successful, FailedstartIndexParam
- start index for results list (zero based)maxResultsParam
- maximum size for returned listuriInfo
- authenticationContext
- RestResults
@GET @Path(value="byChangeset/{csid}") public RestResults getBuildResultsForChangeset(@PathParam(value="csid") String changesetId, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
changesetId
- changeset id related to build resulturiInfo
- authenticationContext
- RestResults
related to specified changeset id@GET @Path(value="byCheckoutChangeset/{csid}") public RestResults getBuildResultsForCheckoutChangeset(@PathParam(value="csid") String changesetId, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
changesetId
- checkout changeset id related to build resulturiInfo
- authenticationContext
- RestResults
checked out with specified changeset id@GET @Path(value="{projectKey}-{buildKey}") public RestResults getBuildHistory(@PathParam(value="projectKey") String projectKey, @PathParam(value="buildKey") String buildKey, @QueryParam(value="expand") String expandParam, @QueryParam(value="favourite") boolean favouriteParam, @QueryParam(value="label") String labelParam, @QueryParam(value="issueKey") String issueKeyParam, @QueryParam(value="includeAllStates") boolean allStatesParam, @QueryParam(value="continuable") boolean continuableParam, @QueryParam(value="buildstate") boolean buildStateParam, @QueryParam(value="start-index") int startIndexParam, @QueryParam(value="max-results") int maxResultsParam, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)expandParam
- expands build result details on request. Possible values are: artifacts, comments, labels, jiraIssues, stages. stages expand is available only for top level plans. It allows to drill down to job results using stages.stage.results.result. All expand parameters should contain results.result prefix.favouriteParam
- filters build results list to show only results for favourite plans. Works only for authenticated userlabelParam
- filter by comma separated list of labelsissueKeyParam
- filter by comma separated list of Jira issue key related to resultallStatesParam
- return all build results including Unknown statescontinuableParam
- filter only results that may be continued (stopped on Manual Stage)buildStateParam
- filter results by state, valid values are Unknown, Successful, FailedstartIndexParam
- start index for results list (zero based)maxResultsParam
- maximum size for returned listuriInfo
- authenticationContext
- RestResults
@GET @Path(value="{projectKey}-{buildKey}/branch/{branchName}") public RestResults getBranchHistory(@PathParam(value="projectKey") String projectKey, @PathParam(value="buildKey") String buildKey, @PathParam(value="branchName") String branchName, @QueryParam(value="expand") String expandParam, @QueryParam(value="favourite") boolean favouriteParam, @QueryParam(value="label") String labelParam, @QueryParam(value="issueKey") String issueKeyParam, @QueryParam(value="includeAllStates") boolean allStatesParam, @QueryParam(value="continuable") boolean continuableParam, @QueryParam(value="buildstate") boolean buildStateParam, @QueryParam(value="start-index") int startIndexParam, @QueryParam(value="max-results") int maxResultsParam, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)expandParam
- expands build result details on request. Possible values are: artifacts, comments, labels, jiraIssues, stages. stages expand is available only for top level plans. It allows to drill down to job results using stages.stage.results.result. All expand parameters should contain results.result prefix.favouriteParam
- filters build results list to show only results for favourite plans. Works only for authenticated userlabelParam
- filter by comma separated list of labelsissueKeyParam
- filter by comma separated list of Jira issue key related to resultallStatesParam
- return all build results including Unknown statescontinuableParam
- filter only results that may be continued (stopped on Manual Stage)buildStateParam
- filter results by state, valid values are Unknown, Successful, FailedstartIndexParam
- start index for results list (zero based)maxResultsParam
- maximum size for returned listuriInfo
- authenticationContext
- RestResults
@GET @Path(value="{projectKey}-{buildKey}-{buildNumber : ([0-9]+)|(latest)}") public Result getBuild(@PathParam(value="projectKey") String projectKey, @PathParam(value="buildKey") String buildKey, @PathParam(value="buildNumber") String buildNumber, @QueryParam(value="expand") String expandParam, @QueryParam(value="favourite") boolean favouriteParam, @QueryParam(value="start-index") int startIndexParam, @QueryParam(value="max-results") int maxResultsParam, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- either the number of the specific build result or 'latest' for the highest build numberexpandParam
- expands build result details on request. Possible values are: changes, metadata, artifacts, comments, labels, jiraIssues, stages, logEntries. stages expand is available only for top level plans. It allows to drill down to job results using stages.stage.results.result. logEntries and testResults are available only for job resultsfavouriteParam
- filters build results list to show only results for favourite plans. Works only for authenticated userstartIndexParam
- start index for results list (zero based)maxResultsParam
- maximum size for returned listuriInfo
- uriInfoauthenticationContext
- authenticationContextResultDetails
@GET @Path(value="{projectKey}-{buildKey}/{buildNumber : ([0-9]+)|(latest)}") public Result getBuildAlias(@PathParam(value="projectKey") String projectKey, @PathParam(value="buildKey") String buildKey, @PathParam(value="buildNumber") String buildNumber, @QueryParam(value="expand") String expandParam, @QueryParam(value="favourite") boolean favouriteParam, @QueryParam(value="start-index") int startIndexParam, @QueryParam(value="max-results") int maxResultsParam, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- either the number of the specific build result or 'latest' for the highest build numberexpandParam
- expands build result details on request. Possible values are: changes, metadata, artifacts, comments, labels, jiraIssues, stages, logEntries. stages expand is available only for top level plans. It allows to drill down to job results using stages.stage.results.result. logEntries and testResults are available only for job resultsfavouriteParam
- filters build results list to show only results for favourite plans. Works only for authenticated userstartIndexParam
- start index for results list (zero based)maxResultsParam
- maximum size for returned listuriInfo
- uriInfoauthenticationContext
- authenticationContextResultDetails
@GET @Path(value="{projectKey}-{buildKey}-{buildNumber}/comment") public RestComments getBuildComments(@PathParam(value="projectKey") String projectKey, @PathParam(value="buildKey") String buildKey, @PathParam(value="buildNumber") String buildNumber, @Context javax.ws.rs.core.UriInfo uriInfo)
projectKey
- projectKeybuildKey
- planKey (might be simply planKey or composite planKey-jobKey)buildNumber
- either the number of the specific build result or 'latest' for the highest build numberuriInfo
- RestComments
@POST @Path(value="{projectKey}-{buildKey}-{buildNumber}/comment") public void addBuildComment(@PathParam(value="projectKey") String projectKey, @PathParam(value="buildKey") String buildKey, @PathParam(value="buildNumber") String buildNumber, RestComment comment, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, @Context javax.ws.rs.core.UriInfo uriInfo)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- build numbercomment
- new comment contentauthenticationContext
- uriInfo
- @GET @Path(value="{projectKey}-{buildKey}-{buildNumber}/label") public RestBuildLabels getBuildLabels(@PathParam(value="projectKey") String projectKey, @PathParam(value="buildKey") String buildKey, @PathParam(value="buildNumber") String buildNumber, @Context javax.ws.rs.core.UriInfo uriInfo)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- either the number of the specific build result or 'latest' for the highest build numberuriInfo
- RestBuildLabels
@POST @Path(value="{projectKey}-{buildKey}-{buildNumber}/label") public void addBuildLabel(@PathParam(value="projectKey") String projectKey, @PathParam(value="buildKey") String buildKey, @PathParam(value="buildNumber") String buildNumber, RestBuildLabel label, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, @Context javax.ws.rs.core.UriInfo uriInfo)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- either the number of the specific build result or 'latest' for the highest build numberlabel
- label content to add to build resultauthenticationContext
- uriInfo
- @DELETE @Path(value="{projectKey}-{buildKey}-{buildNumber}/label/{labelName}") public void removeBuildLabel(@PathParam(value="projectKey") String projectKey, @PathParam(value="buildKey") String buildKey, @PathParam(value="buildNumber") String buildNumber, @PathParam(value="labelName") String labelName, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, @Context javax.ws.rs.core.UriInfo uriInfo) throws Exception
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- either the number of the specific build result or 'latest' for the highest build numberlabelName
- label name to remove from build resultauthenticationContext
- uriInfo
- Exception
@GET @Path(value="/status/{projectKey}-{buildKey}-{buildNumber : ([0-9]+)}") public RestResultStatus getResultStatus(@PathParam(value="projectKey") String projectKey, @PathParam(value="buildKey") String buildKey, @PathParam(value="buildNumber") String buildNumber, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- buildNumber (numeric value only, 'latest' keyword is not supported for this method)uriInfo
- authenticationContext
- RestResultStatus
Copyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.