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
28
29
{
"isLastPage": true,
"limit": 25,
"nextPageStart": 2154,
"size": 1,
"start": 2154,
"values": [
{
"buildNumber": "3",
"createdDate": 1587533099278,
"description": "A description of the build goes here",
"duration": 2154,
"key": "TEST-REP3",
"name": "Database Matrix Tests",
"parent": "TEST-REP",
"projectKey": "PRJ",
"ref": "refs/heads/master",
"repositorySlug": "my-repo",
"state": "CANCELLED",
"testResults": {
"failed": 1,
"skipped": 5,
"successful": 134
},
"updatedDate": 1587533699278,
"url": "https://bamboo.example.com/browse/TEST-REP3"
}
]
}
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
string
integer
string
integer
string
string
string
string
string
string
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
22
23
curl --request POST \
--url 'http://{baseurl}/rest/build-status/latest/commits/{commitId}' \
--header 'Content-Type: application/json' \
--data '{
"buildNumber": "3",
"createdDate": 1587533099278,
"description": "A description of the build goes here",
"duration": 2154,
"key": "TEST-REP3",
"name": "Database Matrix Tests",
"parent": "TEST-REP",
"projectKey": "PRJ",
"ref": "refs/heads/master",
"repositorySlug": "my-repo",
"state": "CANCELLED",
"testResults": {
"failed": 1,
"skipped": 5,
"successful": 134
},
"updatedDate": 1587533699278,
"url": "https://bamboo.example.com/browse/TEST-REP3"
}'
Deprecated since 2.10. Use /rest/users/add-groups instead.
Add a user to a group.
In the request entity, the context attribute is the group and the itemName is the user.
The authenticated user must have the ADMIN permission to call this resource.
string
string
The user was added to the group.
any
1
2
3
4
5
6
7
8
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/admin/groups/add-user' \
--header 'Accept: application/json;charset=UTF-8' \
--header 'Content-Type: application/json' \
--data '{
"context": "group_a",
"itemName": "user_a"
}'
Deprecated since 2.10. Use /rest/users/remove-groups instead.
Remove a user from a group.
The authenticated user must have the ADMIN permission to call this resource.
In the request entity, the context attribute is the group and the itemName is the user.
string
string
The user was removed from the group.
any
1
2
3
4
5
6
7
8
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/admin/groups/remove-user' \
--header 'Accept: application/json;charset=UTF-8' \
--header 'Content-Type: application/json' \
--data '{
"context": "group_a",
"itemName": "user_a"
}'
Deprecated since 2.10. Use /rest/users/add-groups instead.
Add a user to a group. This is very similar to groups/add-user
, but with the context and itemName attributes of the supplied request entity reversed. On the face of it this may appear redundant, but it facilitates a specific UI component in the application.
In the request entity, the context attribute is the user and the itemName is the group.
The authenticated user must have the ADMIN permission to call this resource.
string
string
The user was added to the group
any
1
2
3
4
5
6
7
8
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/admin/users/add-group' \
--header 'Accept: application/json;charset=UTF-8' \
--header 'Content-Type: application/json' \
--data '{
"context": "user_a",
"itemName": "group_a"
}'
Retrieves the repository's default branch, if it has been created. If the repository is empty, 204 No Content will be returned. For non-empty repositories, if the configured default branch has not yet been created a 404 Not Found will be returned.
This URL is deprecated. Callers should use GET /projects/{key}/repos/{slug}/default-branch
instead, which allows retrieving the configured default branch even if the ref has not been created yet.
The authenticated user must have REPO_READ permission for the specified repository to call this resource.
string
Requiredstring
RequiredThe configured default branch for the repository.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches/default' \
--header 'Accept: application/json;charset=UTF-8'
Update the default branch of a repository.
This URL is deprecated. Callers should use PUT /projects/{key}/repos/{slug}/default-branch
instead.
The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.
string
Requiredstring
RequiredThe branch to set as default
string
RefType
The operation was successful.
1
2
3
4
5
6
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches/default' \
--header 'Content-Type: application/json' \
--data '{
"id": "refs/heads/master"
}'
Approve a pull request as the current user. Implicitly adds the user as a participant if they are not already.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
Deprecated since 4.2. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead
string
Requiredstring
Requiredstring
RequiredDetails of the new participant.
1
2
3
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approve' \
--header 'Accept: application/json;charset=UTF-8'
Remove approval from a pull request as the current user. This does not remove the user as a participant.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
Deprecated since 4.2. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead
string
Requiredstring
Requiredstring
RequiredDetails of the updated participant.
1
2
3
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approve' \
--header 'Accept: application/json;charset=UTF-8'
Unassigns a participant from the REVIEWER role they may have been given in a pull request.
If the participant has no explicit role this method has no effect.
Afterwards, the user will still remain a participant in the pull request but their role will be reduced to PARTICIPANT. This is because once made a participant of a pull request, a user will forever remain a participant. Only their role may be altered.
The authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.
Deprecated since 4.2. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead.
string
Requiredstring
Requiredstring
Requiredstring
The update completed.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants'
Rate this page: