GET

Get build statuses for commitDeprecated

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 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" } ] }
POST

Create build status for commitDeprecated

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

buildNumber

string

createdDate

integer

description

string

duration

integer

key

string

name

string

parent

string

projectKey

string

ref

string

repositorySlug

string

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 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" }'
POST

Add user to groupDeprecated

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.

Request

Request bodyapplication/json

context

string

itemName

string

Responses

The user was added to the group.

application/json;charset=UTF-8

any

POST/api/latest/admin/groups/add-user
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" }'
POST

Remove user from groupDeprecated

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.

Request

Request bodyapplication/json

context

string

itemName

string

Responses

The user was removed from the group.

application/json;charset=UTF-8

any

POST/api/latest/admin/groups/remove-user
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" }'
POST

Add user to groupDeprecated

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.

Request

Request bodyapplication/json

context

string

itemName

string

Responses

The user was added to the group

application/json;charset=UTF-8

any

POST/api/latest/admin/users/add-group
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" }'
GET

Get default branchDeprecated

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.

Request

Path parameters

projectKey

string

Required
repositorySlug

string

Required

Responses

The configured default branch for the repository.

application/json;charset=UTF-8

RestBranch
GET/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches/default
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'
PUT

Update default branchDeprecated

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.

Request

Path parameters

projectKey

string

Required
repositorySlug

string

Required

Request bodyapplication/json

The branch to set as default

id

string

type

RefType

Responses

The operation was successful.

PUT/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches/default
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" }'
POST

Approve pull requestDeprecated

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

Request

Path parameters

projectKey

string

Required
pullRequestId

string

Required
repositorySlug

string

Required

Responses

Details of the new participant.

application/json;charset=UTF-8

RestPullRequestParticipant
POST/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approve
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'
DEL

Unapprove pull requestDeprecated

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

Request

Path parameters

projectKey

string

Required
pullRequestId

string

Required
repositorySlug

string

Required

Responses

Details of the updated participant.

application/json;charset=UTF-8

RestPullRequestParticipant
DEL/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approve
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'
DEL

Unassign pull request participantDeprecated

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.

Request

Path parameters

projectKey

string

Required
pullRequestId

string

Required
repositorySlug

string

Required

Query parameters

username

string

Responses

The update completed.

DEL/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants
1 2 curl --request DELETE \ --url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants'

Rate this page: