• Authentication
  • Builds and Deployments
  • Capabilities
  • Dashboard
  • Deprecated
  • Jira Integration
  • Markup
  • Mirroring (Mirror)
  • Mirroring (Upstream)
  • Permission Management
  • Project
  • Pull Requests
  • Repository
  • Security
  • System Maintenance
  • System Signing
  • Other operations
Server
Bitbucket Data Center / Reference / REST API

Jira Integration

Postman Collection
OpenAPI
POST

Create Jira Issue

Create a Jira issue and associate it with a comment on a pull request.

This resource can only be used with comments on a pull request. Attempting to call this resource with a different type of comment (for example, a comment on a commit) will result in an error.

The authenticated user must have REPO_READ permission for the repository containing the comment to call this resource.

The JSON structure for the create issue format is specified by Jira's REST v2 API.

Request

Path parameters

commentId

string

Required

Query parameters

applicationId

string

Request bodyapplication/json

A String representation of the JSON format Jira create issue request see: Jira REST API

string

Responses

The created Jira issue key and the associated comment ID

application/json

RestCommentJiraIssue
POST/jira/latest/comments/{commentId}/issues
1 2 3 4 5 curl --request POST \ --url 'http://{baseurl}/rest/jira/latest/comments/{commentId}/issues' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '"<string>"'
200Response
1 2 3 4 { "commentId": 1, "issueKey": "TEST-123" }
GET

Get changesets for issue key

Retrieve a page of changesets associated with the given issue key.

Request

Path parameters

issueKey

string

Required

Query parameters

maxChanges

string

start

number

limit

number

Responses

A page of detailed changesets

application/json

object
GET/jira/latest/issues/{issueKey}/commits
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/jira/latest/issues/{issueKey}/commits' \ --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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 { "values": [ { "fromCommit": { "id": "abcdef0123abcdef4567abcdef8987abcdef6543", "displayId": "abcdef0" }, "toCommit": { "message": "More work on feature 1", "committerTimestamp": 1449075830, "committer": { "name": "Charlie", "emailAddress": "charlie@example.com" }, "authorTimestamp": 1359075920, "parents": [ { "id": "abcdef0123abcdef4567abcdef8987abcdef6543", "displayId": "abcdef0" } ], "author": { "name": "Charlie", "emailAddress": "charlie@example.com" }, "id": "abcdef0123abcdef4567abcdef8987abcdef6543", "displayId": "abcdef0" }, "repository": { "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "statusMessage": "Available", "defaultBranch": "main", "relatedLinks": {}, "partition": 2154, "description": "My repo description", "hierarchyId": "e3c939f9ef4a7fae272e", "project": { "name": "My Cool Project", "key": "PRJ", "public": true, "id": 2154, "type": "NORMAL", "description": "The description for my cool project", "namespace": "<string>", "scope": "PROJECT", "avatar": "<string>" }, "scope": "REPOSITORY", "origin": { "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "statusMessage": "Available", "defaultBranch": "main", "relatedLinks": {}, "partition": 2154, "description": "My repo description", "hierarchyId": "e3c939f9ef4a7fae272e", "project": { "name": "My Cool Project", "key": "PRJ", "public": true, "id": 2154, "type": "NORMAL", "description": "The description for my cool project", "namespace": "<string>", "scope": "PROJECT", "avatar": "<string>" }, "scope": "REPOSITORY", "slug": "my-repo", "forkable": true, "archived": true, "scmId": "git" }, "slug": "my-repo", "forkable": true, "archived": true, "scmId": "git" }, "changes": { "values": {}, "size": 2154, "limit": 2154, "nextPageStart": 2154, "isLastPage": true, "start": 2154 } } ], "size": 1, "limit": 25, "nextPageStart": 2154, "isLastPage": true, "start": 2154 }
GET

Retrieves the enchanced primary entitylink

The authenticated user must have PROJECT_READ permission for the project having the primary enhanced entitylink.

projectKey

string

Required

The primary enhanced entitylink.

application/json

RestEnhancedEntityLink
GET/jira/latest/projects/{projectKey}/primary-enhanced-entitylink
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/jira/latest/projects/{projectKey}/primary-enhanced-entitylink' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 { "displayUrl": "example.com/jira", "projectName": "My Project", "applicationLinkId": "a1b54cs4wsd45", "projectKey": "MPROJ", "projectId": 10000 }
GET

Get issues for a pull request

Retrieves Jira issue keys that are associated with the commits in the specified pull request. The number of commits checked for issues is limited to a default of 100.

Request

Path parameters

projectKey

string

Required
pullRequestId

string

Required
repositorySlug

string

Required

Responses

A list of Jira issues keys for the pull request

application/json;charset=UTF-8

array<RestJiraIssue>

GET/jira/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/issues
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/jira/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/issues' \ --header 'Accept: application/json;charset=UTF-8'

Rate this page: