• Audit
  • Policies
  • Branch-utils
  • Git
  • Sync
  • Required-builds
  • Build-status
  • Comment-likes
  • Jira
  • Mirroring
  • Branch-permissions
  • Access-tokens
  • Insights
  • Ssh
  • Api
Server
Bitbucket Data Center / / Modules

Build-status

Postman Collection
OpenAPI
GET

Get build-status latest commits {commitId}Deprecated

Gets build statuses associated with a commit.

Deprecated in 7.14, please use the repository based builds resource instead.

Request

Path parameters

commitId

string

Required

Query parameters

orderBy

string

start

number

limit

number

Responses

A Page of build statuses associated with the commit
(limited to the most recent 100 build statuses associated with the commit)

application/json

object
GET/build-status/latest/commits/{commitId}
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/build-status/latest/commits/{commitId}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 { "values": [ { "testResults": { "failed": 1, "successful": 134, "skipped": 5 }, "createdDate": 1587533099278, "updatedDate": 1587533699278, "name": "Database Matrix Tests", "key": "TEST-REP3", "parent": "TEST-REP", "state": "CANCELLED", "ref": "refs/heads/master", "description": "A description of the build goes here", "duration": 2154, "url": "https://bamboo.example.com/browse/TEST-REP3", "buildNumber": "3" } ], "size": 1, "isLastPage": true, "nextPageStart": 2154, "start": 2154, "limit": 25 }
POST

Post build-status latest commits {commitId}Deprecated

Associates a build status with a commit.The state, the key and the url fields are mandatory. The name anddescription fields are optional.All fields (mandatory or optional) are limited to 255 characters, except for the url,which is limited to 450 characters.Supported values for the state are SUCCESSFUL, FAILEDand INPROGRESS.The authenticated user must have LICENSED permission or higher to call this resource.

Deprecated in 7.14, please use the repository based builds resource instead.

Request

Path parameters

commitId

string

Required

Request bodyapplication/json

build status to associate with the commit

testResults

object

createdDate

integer

updatedDate

integer

name

string

key

string

parent

string

state

string

ref

string

description

string

duration

integer

Responses

An empty response if the build status was successfully stored

POST/build-status/latest/commits/{commitId}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 curl --request POST \ --url 'http://{baseurl}/rest/build-status/latest/commits/{commitId}' \ --header 'Content-Type: application/json' \ --data '{ "testResults": { "failed": 1, "successful": 134, "skipped": 5 }, "createdDate": 1587533099278, "updatedDate": 1587533699278, "name": "Database Matrix Tests", "key": "TEST-REP3", "parent": "TEST-REP", "state": "CANCELLED", "ref": "refs/heads/master", "description": "A description of the build goes here", "duration": 2154, "url": "https://bamboo.example.com/browse/TEST-REP3", "buildNumber": "3" }'
GET

Get build-status latest commits stats {commitId}

Gets statistics regarding the builds associated with a commit

Request

Path parameters

commitId

string

Required

Query parameters

includeUnique

boolean

Responses

The number of successful/failed/in-progress builds for the commit

application/json

RestBuildStats
GET/build-status/latest/commits/stats/{commitId}
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/build-status/latest/commits/stats/{commitId}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 { "failed": 2154, "successful": 2154, "cancelled": 2154, "inProgress": 2154, "unknown": 2154 }
POST

Post build-status latest commits stats

Produces a list of the build statistics for multiple commits. Commits without any builds associated with them will not be returned.
For example if the commit e00cf62997a027bbf785614a93e2e55bb331d268 does not have any build statuses associated with it, it will not be present in the response.

Request

Request bodyapplication/json

full SHA1 of each commit

array<string>

Responses

The number of successful/failed/in-progress builds for each commit (with the caveat that the commits without any builds associated with them will not be present in the response)

application/json

RestMultipleBuildStats

POST/build-status/latest/commits/stats
1 2 3 4 5 6 7 curl --request POST \ --url 'http://{baseurl}/rest/build-status/latest/commits/stats' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '[ "db0dd118fa6ccdf1d593fef00df839dd27702df7" ]'

Rate this page: