Gets build statuses associated with a commit.
Deprecated in 7.14, please use the repository based builds resource instead.
string
Requiredstring
number
number
A Page of build statuses associated with the commit
(limited to the most recent 100 build statuses associated with the commit)
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/build-status/latest/commits/{commitId}' \
--header 'Accept: application/json'
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
}
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
, FAILED
and 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.
string
Requiredbuild status to associate with the commit
object
integer
integer
string
string
string
string
string
string
integer
An empty response if the build status was successfully stored
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"
}'
Gets statistics regarding the builds associated with a commit
string
Requiredboolean
The number of successful/failed/in-progress builds for the commit
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/build-status/latest/commits/stats/{commitId}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
{
"failed": 2154,
"successful": 2154,
"cancelled": 2154,
"inProgress": 2154,
"unknown": 2154
}
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.
full SHA1 of each commit
array<string>
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)
RestMultipleBuildStats
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: