Skip to end of metadata
Go to start of metadata

Available:

Bamboo 2.3 introduced the REST APIs.

Changed:

In Bamboo 3.0 the results resource replaced the build resource. Expand parameters also changed from builds.build to results.result.

 

The Bamboo REST APIs allow you to address the Bamboo data entities as 'resources'. This means that they are identified by URIs and operated on by HTTP requests, such as GET. Whenever you GET one of these resources, you receive a representation encoded using XML or JSON.

Icon

API reference for your Bamboo version is the recommended source of information on Bamboo REST APIs.

The REST API usage guide describes common factors in the APIs, including the full structure of the URIs, API versions, etc. Below are details of the resources made available by the APIs.

On this page:

General Information

You can always view the root level resources for a particular version of a Bamboo REST API by navigating to the root URI.
e.g.

The response of a REST call will always contains information about size of whole collection (size attribute) as well as the start-index and max-result.

The number of resources in returned lists is limited to 25, even if you specify max-result to be greater than 25.

Project Service

Icon

API reference for your Bamboo version is the recommended source of information on Bamboo REST APIs.

URI

/project

Description

Lists all the projects set up on the Bamboo server.

URI Parameters

  • ?expand=projects or no parameter — List projects with projects list expanded and links to projects available.
  • ?expand=projects.project — List projects with projects list expanded and project details visible.
  • ?expand=projects.project.plans — List of projects and plans belonging to the project with plans expanded and links to plans available.
  • ?expand=projects.project.plans.plan — List of projects and plans belonging to the project with plans expanded and plan details visible.
  • ?expand=projects.project.plans.plan.actions — List of projects and plans belonging to the project with plans expanded, and plan details and actions visible.
  • ?favourite&expand=projects.project.plans — List of projects and favourite plans belonging to the project with plans expanded and links to plans available. Plans which are not favourites will not be returned.
  • ?favourite&expand=projects.project.plans.plan — List of projects and favourite plans belonging to the project with plans expanded and plan details visible. Plans which are not favourites will not be returned.
  • ?favourite&expand=projects.project.plans.plan.actions — List of projects and favourite plans belonging to the project with plans expanded, and plan details and actions visible. Plans which are not favourites will not be returned.
  • ?cloverEnabled&expand=projects.project.plans — List of projects and Clover-enabled plans 1 belonging to the project with plans expanded and links to plans available. Plans which are not favourites will not be returned.
  • ?cloverEnabled&expand=projects.project.plans.plan — List of projects and Clover-enabled plans 1 belonging to the project with plans expanded and plan details visible. Plans which are not favourites will not be returned.
  • ?cloverEnabled&expand=projects.project.plans.plan.actions — List of projects and Clover-enabled plans 1 belonging to the project with plans expanded, and plan details and actions visible. Plans which are not favourites will not be returned.
     
    1 A plan is Clover-enabled if Clover output will be produced by the build (See specifying the builder for a plan).

HTTP Methods

  • GET — Returns a list of projects.

Example of response XML:

Elements in the response:

Element

Attributes

projects/project

  • name — Name of the project
  • key — Project key

projects/project/link

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the project

Example of response JSON:

Plan Service

Icon

API reference for your Bamboo version is the recommended source of information on Bamboo REST APIs.

URI

/plan

Description

Lists all the plans set up on the Bamboo server.

URI Parameters

  • ?expand=plans or no parameter — List all plans for all projects with list expanded (but no plan details).
  • ?expand=plans.plan — List all plans for all projects with list expanded and plan details visible.
  • ?expand=plans.plan.actions — List all plans for all projects with list expanded and plan details and plan actions visible.
  • ?favourite&expand=plans.plan — List all favourite plans for all projects with list expanded and plan details visible. Plans which are not favourites will not be returned.
  • ?favourite&expand=plans.plan.actions — List all favourite plans for all projects with list expanded and plan details and plan actions visible. Plans which are not favourites will not be returned.
  • ?cloverEnabled&expand=plans.plan — List all Clover-enabled plans 1 plans for all projects with list expanded and plan details visible. Plans which are not favourites will not be returned.
  • ?cloverEnabled&expand=plans.plan.actions — List all Clover-enabled plans 1 plans for all projects with list expanded and plan details and plan actions visible. Plans which are not favourites will not be returned.
     
    1 A plan is Clover-enabled if Clover output will be produced by the build (See specifying the builder for a plan).

HTTP Methods

  • GET — Returns a list of plans.

Example of response XML:

Elements in the response:

Element

Attributes

plans/plan

  • name — Name of the plan
  • key — Plan key

plans/plan/link

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the plan

Example of response JSON:

Build Service — All Builds

Changed:

In Bamboo 3.0 the results resource replaced the build resource. Expand parameters also changed from builds.build to results.result.

Icon

API reference for your Bamboo version is the recommended source of information on Bamboo REST APIs.

URI

/result

Description

Lists the latest builds for all plans on the Bamboo server.

URI Parameters

  • ?expand=results or no parameter — Lists the latest build for each of the plans on the Bamboo server, in descending order (by completion time).
  • ?expand=results.result — Lists the latest build for each of the plans on the Bamboo server with build details expanded, in descending order (by completion time) (Warning: This can be a very resource-intensive operation. You may wish to consider limiting the number of builds returned).
  • ?expand=results[0:N].result — Lists the last Nbuilds for the plans on the Bamboo server with build result details expanded, in descending order (by completion time).

    Modifying the build array parameters

    Icon

    You can modify the build array parameters (i.e. [0:N]) to return different sets of results.
    * Use [0] to return the latest build result.
    * Use negative indexes to return the last entries in build list, e.g. [-5:-1] returns last five builds in list
    * Use open ended arrays to return all results from start or end of builds list, e.g. [1:] returns all builds from first to the list limit, [:5] returns first 6 entries in build list.

  • ?favourite — List the latest builds for all favourite plans on the Bamboo server.
  • ?label=labelname — List the latest builds which have a build result labelled with a particular label(s). labelname can be the name of a single label (e.g. deploy_failed) or a comma-separated list of label names (e.g. {deploy_failed,deploy_successful)
  • ?issueKey=issuekey — List the latest builds which have a build result related to one or many JIRA issues. issuekey can be the key of a single JIRA issue (e.g. BAM-1111) or a comma-separated list of label names (e.g. {BAM-1111,BAM-1112,BAM-1113)
  • ?cloverEnabled — List the latest builds all Clover-enabled plans 1 plans on the Bamboo server.
    1 A plan is Clover-enabled if Clover output will be produced by the build (See specifying the builder for a plan).
  • ?expand=results.result.artifacts — Lists the artifacts produced by each of the latest builds for all plans on the Bamboo server.
  • ?expand=results.result.labels — Lists the labels associated with each of the latest builds for all plans on the Bamboo server.
  • ?expand=results.result.comments — Lists the comments associated with each of the latest builds for all plans on the Bamboo server.
  • ?expand=results.result.jiraIssues — Lists the JIRA issues associated with each of the latest builds for all plans on the Bamboo server.

Example of response XML:

Elements in the response:

Element

Attributes

results/result

  • number — Build result number
  • state — State of the build (e.g. Successful, Failed)
  • key — Key of the build result

results/result/link

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the build result

result/buildStartedTime

Description: Start time of build

result/buildCompletedTime

Description: Finish time of build

result/buildDurationInSeconds

Description: Build duration in seconds

result/buildDurationDescription

Description: Description of build duration (conversion of seconds to more usable units of time)

result/buildRelativeTime

Description: Time when build was run (relative to current time)

result/queueStartedTime

Description: Time when build was queued

result/queueTimeInSeconds

Description: How long build was queued

result/vcsUpdateStartedTime

Description: Time when VCS update occurred

result/vcsUpdateInSeconds

Description: How long VCS took to complete

result/buildTestSummary

Description: Summary of test results

result/successfulTestCount

Description: Number of successful tests in build

result/failedTestCount

Description: Number of failed tests in build

result/buildReason

Description: Reason for build

results/result/artifacts/artifact/name

Description: Name of the build artifact

results/result/artifacts/artifact/link

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the build artifact

results/result/labels/label/name

Description: Name of the label

results/result/comments/comment

  • author — Author of the comment

results/result/comments/comment/content

  • author — Author of the comment

results/result/comments/comment/creationDate

Description: Date that comment was created

results/result/comments/comment/modificationDate

Description: Date that comment was last updated

results/result/jiraIssues/issue

  • key — Key of the JIRA issue

results/result/jiraIssues/issue/url

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the JIRA issue

Example of response JSON:

Build Service — Specific Project

Icon

API reference for your Bamboo version is the recommended source of information on Bamboo REST APIs.

URI

/result/PROJECTKEY
(where PROJECTKEY is the key of the desired project, e.g. MYPROJ1)

Description

Lists the latest builds for all plans for a specific project on the Bamboo server.

URI Parameters

  • ?expand=results or no parameter — Lists the latest builds for each of the plans of a project on the Bamboo server, in descending order (by completion time).
  • ?expand=results.result — Lists the latest builds for each of the plans of a project with build details expanded, in descending order (by completion time) (Warning: This can be a very resource-intensive operation. You may wish to consider limiting the number of build results returned).
  • ?expand=results[0:N].result — Lists the last Nbuilds for the plans of the project with build result details expanded, in descending order (by completion time).

    Modifying the build array parameters

    Icon

    You can modify the build array parameters (i.e. [0:N]) to return different sets of results.
    * Use [0] to return the latest build result.
    * Use negative indexes to return the last entries in build list, e.g. [-5:-1] returns last five builds in list
    * Use open ended arrays to return all results from start or end of builds list, e.g. [1:] returns all builds from first to the list limit, [:5] returns first 6 entries in build list.

  • ?favourite — List the latest builds for all favourite plans for a specific project on the Bamboo server.
  • ?label=labelname — List the latest builds for a specific project, which have a build result labelled with a particular label(s). labelname can be the name of a single label (e.g. deploy_failed) or a comma-separated list of label names (e.g. {deploy_failed,deploy_successful)
  • ?issueKey=issuekey — List the latest builds for a specific project, which have a build result related to one or many JIRA issues. issuekey can be the key of a single JIRA issue (e.g. BAM-1111) or a comma-separated list of label names (e.g. {BAM-1111,BAM-1112,BAM-1113)
  • ?cloverEnabled — List the latest builds for a specific project, all Clover-enabled plans 1 plans on the Bamboo server.
    1 A plan is Clover-enabled if Clover output will be produced by the build (See specifying the builder for a plan).
  • ?expand=results.result.artifacts — Lists the artifacts produced by each of the latest builds for all plans for a specific project.
  • ?expand=results.result.labels — Lists the labels associated with each of the latest builds for all plans for a specific project.
  • ?expand=results.result.comments — Lists the comments associated with each of the latest builds for all plans for a specific project.
  • ?expand=results.result.jiraIssues — Lists the JIRA issues associated with each of the latest builds for all plans for a specific project.

Example of response XML:

Elements in the response:

Element

Attributes

results/result

  • number — Build number
  • state — State of the build (e.g. Successful, Failed)
  • key — Key of the build result

results/result/link

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the build result

result/buildStartedTime

Description: Start time of build

result/buildCompletedTime

Description: Finish time of build

result/buildDurationInSeconds

Description: Build duration in seconds

result/buildDurationDescription

Description: Description of build duration (conversion of seconds to more usable units of time)

result/buildRelativeTime

Description: Time when build was run (relative to current time)

result/queueStartedTime

Description: Time when build was queued

result/queueTimeInSeconds

Description: How long build was queued

result/vcsUpdateStartedTime

Description: Time when VCS update occurred

result/vcsUpdateInSeconds

Description: How long VCS took to complete

result/buildTestSummary

Description: Summary of test results

result/successfulTestCount

Description: Number of successful tests in build

result/failedTestCount

Description: Number of failed tests in build

result/buildReason

Description: Reason for build

results/build/artifacts/artifact/name

Description: Name of the build artifact

results/build/artifacts/artifact/link

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the build artifact

results/result/labels/label/name

Description: Name of the label

results/result/comments/comment

  • author — Author of the comment

results/result/comments/comment/content

  • author — Author of the comment

results/result/comments/comment/creationDate

Description: Date that comment was created

results/result/comments/comment/modificationDate

Description: Date that comment was last updated

results/result/jiraIssues/issue

  • key — Key of the JIRA issue

results/result/jiraIssues/issue/url

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the JIRA issue

Example of response JSON:

Build Service — Specific Plan

Icon

API reference for your Bamboo version is the recommended source of information on Bamboo REST APIs.

URI

result/PROJECTKEY-PLANKEY
(where PROJECTKEY-PLANKEY is the key of the desired build plan of a project, e.g. MYPROJ1-MYPLAN1)

Description

Provides information about builds executed for a build plan from latest to the first build

URI Parameters

  • ?expand=results or no parameter — List all build results for the build plan (build details not visible).
  • ?expand=results.result — List all build results for the build plan with build details expanded, in descending order. (Warning: This is a very resource-intensive operation. You should consider limiting the number of builds returned).
  • ?expand=results[0:N].result — List the last Nbuild results for the build plan with build details expanded, in descending order.

    Modifying the build array parameters

    Icon

    You can modify the build array parameters (i.e. [0:N]) to return different sets of results.
    * Use [0] to return the latest build result.
    * Use negative indexes to return the last entries in build list, e.g. [-5:-1] returns last five builds in list
    * Use open ended arrays to return all results from start or end of builds list, e.g. [1:] returns all builds from first to the list limit, [:5] returns first 6 entries in build list.

  • ?expand=results.result.artifacts — List all build results for the build plan with build details expanded and artifacts displayed, in descending order. (Warning: This is a very resource-intensive operation. You should consider limiting the number of builds returned).
  • ?expand=plan — Displays the build plan information (expanded), including a summary of build results information.
  • ?expand=plan.actions — Displays the build plan information (expanded), including a summary of build results information and available actions.
  • ?expand=results.result.artifacts — Lists the artifacts produced by each of the latest builds for the specified plan.
  • ?expand=results.result.labels — Lists the labels associated with each of the latest builds for the specified plan.
  • ?expand=results.result.comments — Lists the comments associated with each of the latest builds for the specified plan.
  • ?expand=results.result.jiraIssues — Lists the JIRA issues associated with each of the latest builds for the specified plan.

HTTP Methods

  • GET — Returns a list of plans.

Example of response XML:

Elements in the response:

Element

Attributes

results/result

  • number — Build number
  • state — State of the build (e.g. Successful, Failed)
  • key — Key of the build result

results/result/link

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the build result

result/buildStartedTime

Description: Start time of build

result/buildCompletedTime

Description: Finish time of build

result/buildDurationInSeconds

Description: Build duration in seconds

result/buildDurationDescription

Description: Description of build duration (conversion of seconds to more usable units of time)

result/buildRelativeTime

Description: Time when build was run (relative to current time)

result/queueStartedTime

Description: Time when build was queued

result/queueTimeInSeconds

Description: How long build was queued

result/vcsUpdateStartedTime

Description: Time when VCS update occurred

result/vcsUpdateInSeconds

Description: How long VCS took to complete

result/buildTestSummary

Description: Summary of test results

result/successfulTestCount

Description: Number of successful tests in build

result/failedTestCount

Description: Number of failed tests in build

result/buildReason

Description: Reason for build

results/result/artifacts/artifact/name

Description: Name of the build artifact

results/result/artifacts/artifact/link

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the build artifact

results/result/labels/label/name

Description: Name of the label

results/result/comments/comment

  • author — Author of the comment

results/result/comments/comment/content

  • author — Author of the comment

results/result/comments/comment/creationDate

Description: Date that comment was created

results/result/comments/comment/modificationDate

Description: Date that comment was last updated

results/result/jiraIssues/issue

  • key — Key of the JIRA issue

results/result/jiraIssues/issue/url

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the JIRA issue

Example of response JSON:

Build Service — Specific Build Result

Icon

API reference for your Bamboo version is the recommended source of information on Bamboo REST APIs.

URI

/result/PROJECTKEY-PLANKEY/BUILDNUMBER
(where PROJECTKEY-PLANKEY is the key of the desired build plan of a project, e.g. MYPROJ1-MYPLAN1, and BUILDNUMBER is the number of the build, e.g. 1, latest, etc)

result/PROJECTKEY-PLANKEY-JOBKEY/BUILDNUMBER
(where PROJECTKEY-PLANKEY-JOBKEY is the key of the desired build job, e.g. MYPROJ1-MYPLAN1-JOB1, and BUILDNUMBER is the number of the build, e.g. 1, latest, etc) 

Description

Provides information about a single build executed for a build plan (build result information only)

URI Parameters

  • no parameter — Displays the latest build result for the plan.
  • ?expand=artifacts — Displays the latest build result for the plan and an expanded list of artifacts.
  • ?expand=changes — Displays the latest build result for the plan and list of changes for build.
  • ?expand=results.result.artifacts — Lists the artifacts for the specified build result.
  • ?expand=results.result.labels — Lists the labels for the specified build result.
  • ?expand=results.result.comments — Lists the comments for the specified build result.
  • ?expand=results.result.jiraIssues — Lists the JIRA issues for the specified build result.
  • ?expand=changes — Lists the changesets for the specified build result.
  • ?expand=changes.change — Lists the changesets (changeset details expanded) for the specified build result.
  • ?expand=changes.change.files — Lists the changesets (changeset details and file details expanded) for the specified build result.
  • ?expand=testResults — Lists the test results for the specified build result. Note: you need JOB result to expand testResults.
  • ?expand=testResults.failed — Lists the failed test results for the specified build result. Note: you need JOB result to expand testResults.
  • ?expand=testResults.failed.testResult — Lists the failed test results (test result details expanded) for the specified build result. Note: you need JOB result to expand testResults.
  • ?expand=testResults.failed.testResult.errors — Lists the failed tests (test result details and errors expanded) for the specified build result. Note: you need JOB result to expand testResults.
  • ?expand=metadata — Lists the metadata for the specified build result.

HTTP Methods

  • GET — Returns the latest build result.


Example of response XML:

Elements in the response:

Element

Attributes

result

  • number — number of the build result
  • state — state of the build result
  • key — key for the build result
  • expand — elements to expand in response

link

  • rel — relationship between link and element (defaults to "self")
  • href — URL for the build result

result/buildStartedTime

Description: Start time of build

result/buildCompletedTime

Description: Finish time of build

result/buildDurationInSeconds

Description: Build duration in seconds

result/buildDurationDescription

Description: Description of build duration (conversion of seconds to more usable units of time)

result/buildRelativeTime

Description: Time when build was run (relative to current time)

result/queueStartedTime

Description: Time when build was queued

result/queueTimeInSeconds

Description: How long build was queued

result/vcsUpdateStartedTime

Description: Time when VCS update occurred

result/vcsUpdateInSeconds

Description: How long VCS took to complete

result/buildTestSummary

Description: Summary of test results

result/successfulTestCount

Description: Number of successful tests in build

result/failedTestCount

Description: Number of failed tests in build

result/buildReason

Description: Reason for build

results/result/artifacts/artifact/name

Description: Name of the build artifact

results/result/artifacts/artifact/link

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the build artifact

results/result/labels/label/name

Description: Name of the label

results/result/comments/comment

  • author — Author of the comment

results/result/comments/comment/content

  • author — Author of the comment

results/result/comments/comment/creationDate

Description: Date that comment was created

results/result/comments/comment/modificationDate

Description: Date that comment was last updated

results/result/jiraIssues/issue

  • key — Key of the JIRA issue

results/result/jiraIssues/issue/url

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the JIRA issue

results/result/changes/change

  • changesetid — Id of the changeset
  • author — Author of the changeset

results/result/changes/change/comment

Description: Comment associated with the changeset

results/result/changes/change/date

Description: Date of the changeset

results/result/changes/change/files/file/name

Description: Name of the file associated with the changeset

results/result/changes/change/files/file/revision

Description: Revision of the file associated with the changeset

results/result/testResults/successful

  • size — Number of successful tests

results/result/testResults/failed

  • size — Number of failed tests

results/result/testResults/failed/testResult

  • status — status of test, i.e. "failed"
  • methodName — Method associated with failed test
  • className — Class associated with failed test

results/result/testResults/failed/testResult/duration

Description: Duration of test

results/result/testResults/failed/testResult/durationInSeconds

Description: Duration of test in seconds

results/result/testResults/failed/testResult/errors

  • size — Number of errors in test

results/result/testResults/failed/testResult/errors/error/message

Description: Error message for error in failed test.

Example of response JSON:

Chart Service

Icon

API reference for your Bamboo version is the recommended source of information on Bamboo REST APIs.

URI

/chart

Description

Returns detailed information on a specific chart, or returns the list of reports set up on the Bamboo server.

URI Parameters

  • reportKey — report class as returned by /chart/reports resource in key tag
  • buildKeys — comma-separated list of build keys (PROJECTKEY-PLANKEY) as returned by /chart/reports resource
  • groupByPeriod — period to group results by in the report chart. Valid values = AUTO, DAY, WEEK, MONTH
  • dateFilter (optional) — date period to filter results by in the report chart. Valid values = LAST_7_DAYS, LAST_30_DAYS, LAST_90_DAYS, ALL, RANGE (requires a valid dateFrom and dateTo as described below)
  • dateFrom (optional) — start date for report chart as dd/MM/yyyy, (e.g. 15/6/2009), mandatory if dateFilter=RANGE
  • dateTo (optional) — end date for report chart as dd/MM/yyyy, (e.g. 15/6/2009), mandatory if dateFilter=RANGE
  • width (optional) — width of the chart in pixels
  • height (optional) — height of the chart in pixels

HTTP Methods

  • GET — Returns a list of reports.

Example of response XML (list all available reports):

Elements in the response:

Element

Attributes

location

Description: URL for the chart image

imageMapName

Description: Name of the imagemap

area

  • shape — shape of area element, defaults to "poly"
  • coords — co-ordinates of the area
  • title — caption of the area
  • alt — text displayed if area does not render
  • nohref — defaults to "nohref"

width

Description: width of the chart image in pixels

height

Description: height of the chart image in pixels

Report Service

Icon

API reference for your Bamboo version is the recommended source of information on Bamboo REST APIs.

URI

/chart/reports

Description

Returns the list of reports set up on the Bamboo server.

URI Parameters

  • no parameter — List all available reports
  • ?expand=reports — List all available reports with report details expanded.

HTTP Methods

  • GET — Returns a list of reports.

Example of response XML (list all available reports):

Elements in the response:

Element

Attributes

report

  • key — key of the Bamboo report
  • name — name of the Bamboo report

Example of response JSON (list all available reports):

Build Queue Service

Icon

API reference for your Bamboo version is the recommended source of information on Bamboo REST APIs.

URI

/queue

Description

Lists all the builds waiting in the build queue, adds or removes a build from the build queue.

URI Parameters

  • no parameter — Displays the number of builds waiting in the build queue.
  • ?expand=queuedBuilds — Lists all the builds waiting in the build queue.
  • ?expand=queuedBuilds.queuedBuild.changes — Lists all the builds waiting in the build queue with associated changes expanded.

HTTP Methods

  • GET — Returns a list of projects.
  • POST — Adds a build to the build queue (e.g. /queue/MYPROJ1-MYPLAN1). No POST data required. Response will be empty.
  • DELETE — Removes a build from the build queue (e.g. /queue/MYPROJ1-MYPLAN1-BUILDNUMBER). Response will be empty.

Example command to trigger a build or delete it from the queue:

Example of response XML (retrieving builds in the build queue):

Elements in the response:

Element

Attributes

queue/queuedBuilds

  • size — Number of builds in the build queue

queue/queuedBuilds/queuedBuild

  • buildResultKey — Key for the build result
  • buildNumber — Build number
  • planKey — Key for the build plan

queue/queuedBuilds/queuedBuild/triggerReason

Description: Build trigger reason

queue/queuedBuilds/queuedBuild/changes

  • size — Number of changes associated with build

queue/queuedBuilds/queuedBuild/changes/change

  • changesetId — Id of the changeset
  • author — Author of the changeset

Example of response JSON:

Comments Service

Icon

API reference for your Bamboo version is the recommended source of information on Bamboo REST APIs.

URI

/result/PROJECTKEY-PLANKEY-BUILDNUMBER/comment

Description

Retrieves the comments for a build result, adds a comment to a build result.

URI Parameters

  • no parameter — Retrieves the comments for a build result.
  • ?expand=comments.comment — Retrieves the comments for a build result with expanded comment details.

HTTP Methods

  • GET — Retrieves the comments for a build result.
  • POST — Adds a comment to the build result. Response will be empty.

Example of response XML (retrieving comments for a build result):

Elements in the response:

Element

Attributes

comments/link

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the comment

comments/comments

  • size — Number of comments for the build result

comments/comments/comment

  • author — Author of the comment

comments/comments/comment/content

Description: Content of the comment

comments/comments/comment/creationDate

Description: Creation date of the comment

comments/comments/comment/modificationDate

Description: Last modified date of the comment

Example of response JSON:

Example of request XML (posting a comment to a build result):

Elements in the request:

Element

Attributes

comment

  • author — The author of the comment

comment/content

Description: Content of the comment to be added to the build result

Labels Service

Icon

API reference for your Bamboo version is the recommended source of information on Bamboo REST APIs.

URI

/build/PROJECTKEY-PLANKEY-BUILDNUMBER/label

Description

Retrieves the labels for a build result, adds or removes a label to a build result.

URI Parameters

  • no parameter — Retrieves the labels for a build result.

HTTP Methods

  • GET — Retrieves the labels for a build result.
  • POST — Adds a label to the build result. Response will be empty.
  • DELETE — Removes a label from the build result, build/PROJECTKEY-PLANKEY-BUILDNUMBER/label/labelname e.g. Response will be empty.

Example of response XML (retrieving labels for a build result):

Elements in the response:

Element

Attributes

labels/link

  • rel — Relationship between link and element (defaults to "self")
  • href — URL for the label

labels/labels

  • size — Number of labels for the build result

labels/labels/label

  • name — Name of the label

Example of response JSON:

Example of request XML (adding a label to a build result):

Elements in the request:

Element

Attributes

label

  • name — The name of the label

Server Information Service

Icon

API reference for your Bamboo version is the recommended source of information on Bamboo REST APIs.

URI

/info

Description

Retrieves information about a Bamboo server.

URI Parameters

  • no parameter — Retrieves information about a Bamboo server.

HTTP Methods

  • GET — Retrieves information about a Bamboo server.

Example of response XML:

Elements in the response:

Element

Attributes

info/version

Description: Bamboo version of server

info/buildDate

Description: Server build date

info/version

Description: Server build number

Example of response JSON:

10 Comments

  1. The number of resources in returned lists is limited to 25, even if you specify max-result to be greater than 25*

    What? Who came up with this (small) limit! And no way to request more at once? Spent hours trying to figure out why results were missing (sad) .

    FYI

    - here is how to get the next 25 entries: ?start-index=25

    - here is how to get more than 25 entries: ?max-results=100

    1. Confirm- there is error in documentation - ma-results allow to list more that 25 results at once.

    2. Confirm- there is error in documentation - ma-results allow to list more that 25 results at once.

  2. Can you please document with each release what the specific API number is? Specifically there was breakage between 2.6 and 2.7/3.0 that doesn't appear to be documented. API = 1 doesn't seem to get previous behavior. Either specific api version is broken in 3.0 or the api number is not obvious.

  3. This documentation needs to be updated for the post 2.6 changes for jobs and stages.

    1. Is there a way to list stages and jobs for a build?
    2. Is there a way to list artifacts for entire build (current documentation does not work)?
    3. There is a way to list artifacts for a job by adding the job qualifier using the formerly documented method (expand=artifacts)?
    4. The above only works for non-shared artifacts. How do you get shared artifacts?
    1. Is there a way to list stages and jobs for a build?

      for a list of results: http://localhost:8085/bamboo/rest/api/latest/result/PROJECTKEY-PLANKEY?expand=results.result.stages.stage.results.result

      for a singe result: http://localhost:8085/bamboo/rest/api/latest/result/PROJECTKEY-PLANKEY-BUILDNUMBER?expand=stages.stage.results.result

      and you can expand deeper: http://localhost:8085/bamboo/rest/api/latest/result/PROJECTKEY-PLANKEY-BUILDNUMBER?expand=stages.stage.results.result.artifacts for example to see artifacts produced by all jobs in plan

      Is there a way to list artifacts for entire build (current documentation does not work)?

      shared artifacts for plan: http://localhost:8085/bamboo/rest/api/latest/result/PROJECTKEY-PLANKEY-BUILDNUMBER?expand=artifacts

      all artifacts (not only shared) - you have to look at job level: http://localhost:8085/bamboo/rest/api/latest/result/PROJECTKEY-PLANKEY-BUILDNUMBER?expand=stages.stage.results.result.artifacts

      There is a way to list artifacts for a job by adding the job qualifier using the formerly documented method (expand=artifacts)?

      all job artifacts, not only shared, http://localhost:8085/bamboo/rest/api/latest/result/PROJECTKEY-PLANKEY-JOBKEY-BUILDNUMBER?expand=artifacts

      The above only works for non-shared artifacts. How do you get shared artifacts?

      See http://jira.atlassian.com/browse/BAM-8603

  4. Anonymous

    There is an error in the comments service documentation:

    The result resource has replaced build. It should read:

    1. Fixed. Thanks for your comment.

      Kind Regards,
      Andrew

  5. Anonymous

    What is the format for posting parameters to a newly queued build?

  6. Anonymous

    Is there a REST api to trigger a build as well?