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": [
{
"name": "Database Matrix Tests",
"key": "TEST-REP3",
"parent": "TEST-REP",
"state": "CANCELLED",
"ref": "refs/heads/master",
"createdDate": 1587533099278,
"duration": 2154,
"buildNumber": "3",
"description": "A description of the build goes here",
"url": "https://bamboo.example.com/browse/TEST-REP3",
"testResults": {
"skipped": 5,
"failed": 1,
"successful": 134
},
"updatedDate": 1587533699278
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
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
string
string
string
string
integer
integer
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
curl --request POST \
--url 'http://{baseurl}/rest/build-status/latest/commits/{commitId}' \
--header 'Content-Type: application/json' \
--data '{
"name": "Database Matrix Tests",
"key": "TEST-REP3",
"parent": "TEST-REP",
"state": "CANCELLED",
"ref": "refs/heads/master",
"createdDate": 1587533099278,
"duration": 2154,
"buildNumber": "3",
"description": "A description of the build goes here",
"url": "https://bamboo.example.com/browse/TEST-REP3",
"testResults": {
"skipped": 5,
"failed": 1,
"successful": 134
},
"updatedDate": 1587533699278
}'
This REST endpoint is retained for backwards compatibility only. It is a no-op. Starting from 4.6.0, mirrors no longer specify a disabled lifecycle callback in their addon descriptor. Prior to 4.6.0, this was the callback method that was called when the mirroring atlassian-connect add-on has been disabled in the upstream server identified by upstreamId
.
string
RequiredAn empty response indicating that callback has been processed
1
2
curl --request POST \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/addon/disabled'
This REST endpoint is retained for backwards compatibility only. It is a no-op. Starting from 4.6.0, mirrors no longer specify an enabled lifecycle callback in their addon descriptor. Prior
to 4.6.0, this was the callback method that was called when the mirroring atlassian-connect add-on has been
enabled in the upstream server identified by upstreamId
.
string
RequiredAn empty response indicating that callback has been processed
1
2
curl --request POST \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/addon/enabled'
This method is no longer supported
string
Requiredstring
Requiredstring
this operation is no longer supported
any
1
2
curl --request POST \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/repos/{upstreamRepoId}/synchronization'
This method is no longer supported
string
Requiredstring
this operation is no longer supported
any
1
2
curl --request POST \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/synchronization'
Get a page of users who liked a commit comment in the specified repository, identified by commitId
and commentId
.
The authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.
Deprecated in 8.0 to be removed in 9.0.
string
Requiredinteger
Requiredstring
Requiredstring
Requirednumber
number
Page of users who liked the specified comment
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/likes' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"values": [
{
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
Like a commit comment in the specified repository, identified by commitId
and commentId
.
The authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.
Deprecated in 8.0 to be removed in 9.0. Likes have been replaced with reactions. For backwards compatibility, the
thumbsupreaction is treated as a like.
string
Requiredinteger
Requiredstring
Requiredstring
RequiredNo content response indicating that the request succeeded
1
2
curl --request POST \
--url 'http://{baseurl}/rest/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/likes'
Unlike a commit comment in the specified repository, identified by commitId
and commentId
.
The authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.
Deprecated in 8.0 to be removed in 9.0. Likes have been replaced with reactions. For backwards compatibility, the
thumbsupreaction is treated as a like.
string
Requiredinteger
Requiredstring
Requiredstring
RequiredNo content response indicating that the request succeeded
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/likes'
Get a page of users who liked a pull request comment in the specified repository, identified by pullRequestId
and commentId
.
The authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.
Deprecated in 8.0 to be removed in 9.0.
string
Requiredstring
Requiredstring
Requiredstring
Requirednumber
number
Page of users who liked the specified comment
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/likes' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"values": [
{
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
Like a pull request comment in the specified repository, identified by pullRequestId
and commentId
. The like will be recorded against the requesting user.
The authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.
Deprecated in 8.0 to be removed in 9.0. Likes have been replaced with reactions. For backwards compatibility, the
thumbsupreaction is treated as a like.
string
Requiredstring
Requiredstring
Requiredstring
RequiredNo content response indicating that the request succeeded
1
2
curl --request POST \
--url 'http://{baseurl}/rest/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/likes'
Unlike a pull request comment in the specified repository, identified by pullRequestId
and commentId
.
The authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.
Deprecated in 8.0 to be removed in 9.0. Likes have been replaced with reactions. For backwards compatibility, the
thumbsupreaction is treated as a like.
string
Requiredstring
Requiredstring
Requiredstring
RequiredNo content response indicating that the request succeeded
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/likes'
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' \
--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' \
--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 Stash.
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' \
--header 'Content-Type: application/json' \
--data '{
"context": "group_a",
"itemName": "user_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'
1
2
3
4
5
6
7
{
"default": true,
"displayId": "<string>",
"latestCommit": "8d51122def5632836d1cb1026e879069e10a1e13",
"latestChangeset": "8d51122def5632836d1cb1026e879069e10a1e13",
"id": "refs/heads/master"
}
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
RefType
string
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'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
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'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
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'
Retrieve the tasks associated with a pull request.
Removed in 8.0. Tasks are now managed using Comments with BLOCKER severity. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments instead
Deprecated since 7.2, changed to 404 in 8.0, remove in 9.0. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments instead
string
Requiredstring
Requiredstring
RequiredThis endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.
1
2
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/tasks'
1
2
3
4
5
6
7
8
9
{
"errors": [
{
"message": "<string>",
"context": "<string>",
"exceptionName": "<string>"
}
]
}
Retrieve the total number of OPEN and RESOLVED tasks associated with a pull request.
Deprecated since 7.2. Tasks are now managed using Comments with BLOCKER severity. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments?count=true instead.
string
Requiredstring
Requiredstring
RequiredThis endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.
1
2
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/tasks/count'
1
2
3
4
5
6
7
8
9
{
"errors": [
{
"message": "<string>",
"context": "<string>",
"exceptionName": "<string>"
}
]
}
Create a new task.
Removed in 8.0. Tasks are now managed using Comments with severity BLOCKER. Call POST /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments
instead,passing the attribute 'severity' set to 'BLOCKER'.
This request has no parameters.
This endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.
1
2
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/tasks'
1
2
3
4
5
6
7
8
9
{
"errors": [
{
"message": "<string>",
"context": "<string>",
"exceptionName": "<string>"
}
]
}
Retrieve an existing task.
Removed in 8.0. Tasks are now managed using Comments with BLOCKER severity. Call GET /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}
instead. @deprecated since 7.2, changed to 404 in 8.0, remove in 9.0. Call GET /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId} instead.
string
RequiredThis endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.
1
2
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/tasks/{taskId}'
1
2
3
4
5
6
7
8
9
{
"errors": [
{
"message": "<string>",
"context": "<string>",
"exceptionName": "<string>"
}
]
}
Update an existing task.
Removed in 8.0. Tasks are now managed using Comments with BLOCKER severity. Call PUT /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}
instead. To resolve a task, pass the attribute 'state' set to 'RESOLVED'. @deprecated since 7.2, changed to 404 in 8.0, remove in 9.0. Call PUT /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}
instead.
As of Stash 3.3, only the state and text of a task can be updated.
Updating the state of a task is allowed for any user having READ access to the repository. However only the task's creator, the context's author or an admin of the context's repository can update the task's text. (For a pull request task, those are the task's creator, the pull request's author or an admin on the repository containing the pull request). Additionally the task's text cannot be updated if it has been resolved.
string
RequiredThis endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.
1
2
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/tasks/{taskId}'
1
2
3
4
5
6
7
8
9
{
"errors": [
{
"message": "<string>",
"context": "<string>",
"exceptionName": "<string>"
}
]
}
Delete a task.
Removed in 8.0. Tasks are now managed using Comments with BLOCKER severity. Call DELETE /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}
instead. @deprecated since 7.2, changed to 404 in 8.0, remove in 9.0. Call DELETE /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId} instead.
Note that only the task's creator, the context's author or an admin of the context's repository can delete a task. (For a pull request task, those are the task's creator, the pull request's author or an admin on the repository containing the pull request). Additionally a task cannot be deleted if it has already been resolved.
string
RequiredThis endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/tasks/{taskId}'
1
2
3
4
5
6
7
8
9
{
"errors": [
{
"message": "<string>",
"context": "<string>",
"exceptionName": "<string>"
}
]
}
Rate this page: