Server
Bitbucket Data Center / / Modules
Operations
GET/build-status/latest/commits/{commitId}POST/build-status/latest/commits/{commitId}POST/mirroring/latest/upstreamServers/{upstreamId}/addon/disabledPOST/mirroring/latest/upstreamServers/{upstreamId}/addon/enabledPOST/mirroring/latest/upstreamServers/{upstreamId}/repos/{upstreamRepoId}/synchronizationPOST/mirroring/latest/upstreamServers/{upstreamId}/synchronizationGET/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/likesPOST/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/likesDEL/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/likesGET/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/likesPOST/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/likesDEL/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/likesPOST/api/latest/admin/groups/add-userPOST/api/latest/admin/groups/remove-userPOST/api/latest/admin/users/add-groupGET/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches/defaultPUT/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches/defaultPOST/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approveDEL/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approveDEL/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participantsGET/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/tasksGET/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/tasks/countPOST/api/latest/tasksGET/api/latest/tasks/{taskId}PUT/api/latest/tasks/{taskId}DEL/api/latest/tasks/{taskId}
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 { "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 }
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

name

string

key

string

parent

string

state

string

ref

string

createdDate

integer

duration

integer

buildNumber

string

description

string

url

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

On disable of mirror addonDeprecated

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.

Request

Path parameters

upstreamId

string

Required

Responses

An empty response indicating that callback has been processed

POST/mirroring/latest/upstreamServers/{upstreamId}/addon/disabled
1 2 curl --request POST \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/addon/disabled'
POST

On enabled of mirror addonDeprecated

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.

Request

Path parameters

upstreamId

string

Required

Responses

An empty response indicating that callback has been processed

POST/mirroring/latest/upstreamServers/{upstreamId}/addon/enabled
1 2 curl --request POST \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/addon/enabled'
POST

Get upstream settingsDeprecated

This method is no longer supported

Request

Path parameters

upstreamRepoId

string

Required
upstreamId

string

Required

Query parameters

level

string

Responses

this operation is no longer supported

application/json

any

POST/mirroring/latest/upstreamServers/{upstreamId}/repos/{upstreamRepoId}/synchronization
1 2 curl --request POST \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/repos/{upstreamRepoId}/synchronization'
POST

Change upstream settingsDeprecated

This method is no longer supported

Request

Path parameters

upstreamId

string

Required

Query parameters

level

string

Responses

this operation is no longer supported

application/json

any

POST/mirroring/latest/upstreamServers/{upstreamId}/synchronization
1 2 curl --request POST \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/synchronization'
GET

Get comment likesDeprecated

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.

Request

Path parameters

projectKey

string

Required
commentId

integer

Required
commitId

string

Required
repositorySlug

string

Required

Query parameters

start

number

limit

number

Responses

Page of users who liked the specified comment

application/json

object
GET/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/likes
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'
200Response
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 }
POST

Like a commit commentDeprecated

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

thumbsup
reaction is treated as a like.

Request

Path parameters

projectKey

string

Required
commentId

integer

Required
commitId

string

Required
repositorySlug

string

Required

Responses

No content response indicating that the request succeeded

POST/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/likes
1 2 curl --request POST \ --url 'http://{baseurl}/rest/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/likes'
DEL

Unlike a commit commentDeprecated

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

thumbsup
reaction is treated as a like.

Request

Path parameters

projectKey

string

Required
commentId

integer

Required
commitId

string

Required
repositorySlug

string

Required

Responses

No content response indicating that the request succeeded

DEL/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/likes
1 2 curl --request DELETE \ --url 'http://{baseurl}/rest/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/likes'
GET

Get pull request comment likesDeprecated

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.

Request

Path parameters

projectKey

string

Required
commentId

string

Required
pullRequestId

string

Required
repositorySlug

string

Required

Query parameters

start

number

limit

number

Responses

Page of users who liked the specified comment

application/json

object
GET/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/likes
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'
200Response
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 }
POST

Like a pull request commentDeprecated

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

thumbsup
reaction is treated as a like.

Request

Path parameters

projectKey

string

Required
commentId

string

Required
pullRequestId

string

Required
repositorySlug

string

Required

Responses

No content response indicating that the request succeeded

POST/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/likes
1 2 curl --request POST \ --url 'http://{baseurl}/rest/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/likes'
DEL

Unlike a pull request commentDeprecated

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

thumbsup
reaction is treated as a like.

Request

Path parameters

projectKey

string

Required
commentId

string

Required
pullRequestId

string

Required
repositorySlug

string

Required

Responses

No content response indicating that the request succeeded

DEL/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/likes
1 2 curl --request DELETE \ --url 'http://{baseurl}/rest/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/likes'
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

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' \ --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

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' \ --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 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.

Request

Request bodyapplication/json

context

string

itemName

string

Responses

The user was added to the group

application/json

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' \ --header 'Content-Type: application/json' \ --data '{ "context": "group_a", "itemName": "user_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

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'
200Response
1 2 3 4 5 6 7 { "default": true, "displayId": "<string>", "latestCommit": "8d51122def5632836d1cb1026e879069e10a1e13", "latestChangeset": "8d51122def5632836d1cb1026e879069e10a1e13", "id": "refs/heads/master" }
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

type

RefType

id

string

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

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'
201Response
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 }
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

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'
201Response
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 }
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'
GET

Get pull request tasksDeprecated

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

Request

Path parameters

projectKey

string

Required
pullRequestId

string

Required
repositorySlug

string

Required

Responses

This endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.

application/json

object
GET/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/tasks
1 2 curl --request GET \ --url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/tasks'
404Response
1 2 3 4 5 6 7 8 9 { "errors": [ { "message": "<string>", "context": "<string>", "exceptionName": "<string>" } ] }
GET

Get pull request task countDeprecated

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.

Request

Path parameters

projectKey

string

Required
pullRequestId

string

Required
repositorySlug

string

Required

Responses

This endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.

application/json

object
GET/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/tasks/count
1 2 curl --request GET \ --url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/tasks/count'
404Response
1 2 3 4 5 6 7 8 9 { "errors": [ { "message": "<string>", "context": "<string>", "exceptionName": "<string>" } ] }
POST

Create taskDeprecated

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'.

Request

This request has no parameters.

Responses

This endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.

application/json

object
POST/api/latest/tasks
1 2 curl --request POST \ --url 'http://{baseurl}/rest/api/latest/tasks'
404Response
1 2 3 4 5 6 7 8 9 { "errors": [ { "message": "<string>", "context": "<string>", "exceptionName": "<string>" } ] }
GET

Get taskDeprecated

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.

Request

Path parameters

taskId

string

Required

Responses

This endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.

application/json

object
GET/api/latest/tasks/{taskId}
1 2 curl --request GET \ --url 'http://{baseurl}/rest/api/latest/tasks/{taskId}'
404Response
1 2 3 4 5 6 7 8 9 { "errors": [ { "message": "<string>", "context": "<string>", "exceptionName": "<string>" } ] }
PUT

Update taskDeprecated

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.

Request

Path parameters

taskId

string

Required

Responses

This endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.

application/json

object
PUT/api/latest/tasks/{taskId}
1 2 curl --request PUT \ --url 'http://{baseurl}/rest/api/latest/tasks/{taskId}'
404Response
1 2 3 4 5 6 7 8 9 { "errors": [ { "message": "<string>", "context": "<string>", "exceptionName": "<string>" } ] }
DEL

Delete taskDeprecated

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.

Request

Path parameters

taskId

string

Required

Responses

This endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.

application/json

object
DEL/api/latest/tasks/{taskId}
1 2 curl --request DELETE \ --url 'http://{baseurl}/rest/api/latest/tasks/{taskId}'
404Response
1 2 3 4 5 6 7 8 9 { "errors": [ { "message": "<string>", "context": "<string>", "exceptionName": "<string>" } ] }

Rate this page: