This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

The following REST methods allow you to retrieve various lists of the build results. The following methods require authentication and results will be restricted by the user's permissions.

A lot of these methods return build result data. You can find more information on the data returned at the bottom of the page


Get Latest Build Result For Plan

Provides the last build result for the given buildKey.

Arguments:

Parameter Name

説明

auth

Authentication token retrieved via the login method

buildKey

Key representing the build plan to obtain latest build result for

URL:

/api/rest/getLatestBuildResults.action

正常な応答

<response>
    ...
    Build result data (see below)
    ...
</response>

Get Recently Completed Build Results For Plan

Provides the overall most recently completed build results for the given build (as opposed to getLatestBuildResults, which gives the most recent build result for the build).

Arguments:

Parameter Name

説明

auth

Authentication token retrieved via the login method

buildKey

Key representing the build plan to obtain latest build results for.

URL:

/api/rest/getRecentlyCompletedBuildResultsForBuild.action

Successful Response:

<response>
    <build>
          ...
          Build result data (see below)
          ...
    </build>
    <build>
          ...
          Build result data (see below)
          ...
    </build>
</response>

Get Latest Build Results For Project

Provides the latest result for each build in the given project.

Arguments:

Parameter Name

説明

auth

Authentication token retrieved via the login method.

projectKey

Key representing the project to obtain latest build results for.

URL:

/api/rest/getLatestBuildResultsForProject.action

Successful Response:

<response>
    <build>
          ...
          Build result data (see below)
          ...
    </build>
    <build>
          ...
          Build result data (see below)
          ...
    </build>
</response>

Get Recently Completed Build Results For Project

Provides the overall most recently completed build results for the given project (as opposed to getLatestBuildResultsForProject, which gives the most recent build result for each build in the project).

Arguments:

Parameter Name

説明

auth

Authentication token retrieved via the login method.

projectKey

Key representing the project to obtain latest build results for.

URL:

/api/rest/getRecentlyCompletedBuildResultsForProject.action

Successful Response:

<response>
    <build>
          ...
          Build result data (see below)
          ...
    </build>
    <build>
          ...
          Build result data (see below)
          ...
    </build>
</response>

Get Latest Builds By User

Returns recent builds triggered by a particular author.

Arguments:

Parameter Name

説明

auth

Authentication token retrieved via the login method.

username

ユーザ名

REST:

/api/rest/getLatestBuildsByUser.action

Successful Response:

<response>
    <build>
          ...
          Build result data (see below)
          ...
    </build>
    <build>
          ...
          Build result data (see below)
          ...
    </build>
</response>

Get Latest Builds For Users Favourite Plans

Provides the latest build details for each plan in the user's list of favourite plans.

Arguments:

Parameter Name

説明

auth

Authentication token retrieved via the login method.

username

the username of the user to grab the fouvourits for

URL:

/api/rest/getLatestUserBuilds.action

Successful Response:

<response>
    <build>
        <name>Confluence Stable - LDAP User Management</name>
        <key>CONFSTABFUNC-LDAP</key>
        <state>success</state>
        <buildNumber>146</buildNumber>
        <failedTestCount>0</failedTestCount>
        <successfulTestCount>4</successfulTestCount>
        <buildTime>2008-02-12 23:21:41</buildTime>
    </build>
    <build>
        <name>Confluence Stable - Main Build</name>
        <key>CONFSTAB-MAIN</key>
        <state>failed</state>
        <buildNumber>10</buildNumber>
        <failedTestCount>3</failedTestCount>
        <successfulTestCount>10</successfulTestCount>
        <buildTime>2008-02-12 12:02:14</buildTime>
    </build>
</response>

要素

説明

Value Range

name

Build Name

User Friendly Build Name as shown in Bamboo

鍵 (キー)

Build Key

String Identifier for the plan (in the format <projectKey>-<planKey>)

state

Build State

current (currently building) / success / fail / none

buildNumber

Number for the last build result

Number > 0

failedTestCount

Number of failed tests for this build

Number >= 0

successfulTestCount

Number of successful tests in this build

Number >= 0

buildTime

The time the build was started

Readable string representation of the time


Build Result Data

Many of the methods above will return a build result with the following information.

要素

説明

Value Range

projectName

Name of the build's project

User friendly name for the project

buildName

Name of the plan

User friendly name for the plan (does not include project name)

buildKey

Plan Key

Identifier for this plan in the format <projectKey>-<planKey>

buildState

State of the Build

Successful / Failed

buildNumber

The number of the build

Number > 0

failedTestCount

The number of tests that failed

Number >= 0

successfulTestCount

The number of tests that passed

Number >= 0

buildTime

Time stamp of when the build started

Formatted Date (yyyy-MM-dd HH:mm:ss)

buildCompletedDate

Time stamp of when the build finished

Formatted Date(yyyy-MM-dd'T'HH:mm:ssZ)

buildDurationInSeconds

How long the build took

Number of seconds

buildDurationDescription

How long the build took

Pretty Print of duration

buildRelativeBuildDate

How long ago the build occurred

Pretty Print of duration since the build occurred

buildTestSummary

Summary of the test resulys

Prrety Print summary of test results

buildReason

Why the build occurred

String representation of the trigger reason

コミット

List of any commits included in this build

 

commit

An individual commit included in this build

 

commit: author

The author that made the commit

The author name as provided by the vcs system

Example Response

<projectName>Bamboo</projectName>
<buildName>HEAD</buildName>
<buildKey>BAM-TRUNK</buildKey>
<buildState>Successful</buildState>
<buildNumber>4681</buildNumber>
<failedTestCount>0</failedTestCount>
<successfulTestCount>1497</successfulTestCount>
<buildTime>2009-02-24 16:39:46</buildTime>
<buildCompletedDate>2009-02-24T16:58:42+1100</buildCompletedDate>
<buildDurationInSeconds>1136</buildDurationInSeconds>
<buildDurationDescription>18 minutes</buildDurationDescription>
<buildRelativeBuildDate>42 minutes ago</buildRelativeBuildDate>
<buildTestSummary>1497 passed</buildTestSummary>
<buildReason>Code has changed</buildReason>
<commits>
<commit author="bob"/>
</commits>

  • ラベルなし