-
Suggestion
-
Resolution: Unresolved
-
0
-
1
-
Summary
Provide a public API to get the Development information (mainly the repository, branches, commits, pull requests, builds and deployments) related to an issue.
Background
There exists a private API that returns development information. However, the endpoints discussed below are intended for internal use only. Therefore, they are not part of the official Jira Software REST APIs, they are not supported and they can change without any notice. Also, they only work when using basic authentication with an Atlassian account email address and API token to authorize the REST API calls.
Once this has been said:
- You can use the internal endpoint /rest/dev-status/latest/issue/summary?issueId=<ISSUE_ID> (replace <ISSUE_ID> with the actual ID of the Jira issue you want to GET the information from) to get the information displayed in the development panel of an issue.
- You can use the information returned by above call to correctly populate the parameters for the endpoint: /rest/dev-status/latest/issue/detail?issueId=10195&applicationType=<APPLICATION-TYPE>&dataType=<DATA_TYPE>
EXAMPLES:
1) On my side calling https://NAME.atlassian.net/rest/dev-status/latest/issue/summary?issueId=10195 returns:
{ "errors": [], "configErrors": [], "summary": { "pullrequest": { "overall": { "count": 0, [..REMOVED..] "dataType": "pullrequest", "open": true }, "byInstanceType": {} }, "build": { "overall": { [..REMOVED..] "dataType": "build" }, "byInstanceType": {} }, "review": { "overall": { [..REMOVED..] "dataType": "review", "completed": false }, "byInstanceType": {} }, "deployment-environment": { "overall": { [..REMOVED..] "dataType": "deployment-environment" }, "byInstanceType": {} }, "repository": { "overall": { "count": 2, "lastUpdated": "2019-10-31T17:53:18.000+0100", "dataType": "repository" }, "byInstanceType": { "GitHub": { "count": 2, "name": "GitHub" } } }, "branch": { "overall": { "count": 1, "lastUpdated": null, "dataType": "branch" }, "byInstanceType": { "GitHub": { "count": 1, "name": "GitHub" } } } } }
2) Then, calling https://NAME.atlassian.net/rest/dev-status/latest/issue/detail?issueId=10195&applicationType=GitHub&dataType=branch returns:
{ "errors": [], "detail": [ { "branches": [ { "name": "[REMOVED]-branch-SFF-27", "url": "https://github.com/[REMOVED]/1st_repository/tree/[REMOVED]-branch-SFF-27", "createPullRequestUrl": "https://github.com/[REMOVED]/1st_repository/pull/new/[REMOVED]-branch-SFF-27", "repository": { "name": "[REMOVED]/1st_repository", "url": "https://github.com/[REMOVED]/1st_repository", "branches": [] }, "lastCommit": { "id": "85663xxxxxxxxxxxxx", "displayId": "85663f", "authorTimestamp": "2019-10-31T16:53:18.000+0000", "url": "https://github.com/[REMOVED]/1st_repository/commit/85663fxxxxxxxxxxxxxxx", "author": { "name": "[REMOVED]" }, "fileCount": 0, "merge": false, "message": "Create SFF-27 again", "files": [] } } ], "pullRequests": [], "repositories": [], "_instance": { "name": "GitHub", "baseUrl": "https://github.com", "type": "GitHub", "id": "com.github.integration.production", "typeName": "GitHub", "singleInstance": true } } ] }
OTHER EXAMPLES:
- Returns branches and pull requests
https://<instance-name>.atlassian.net/rest/dev-status/latest/issue/detail?issueId=134963&applicationType=bitbucket&dataType=branch
- Returns repository and commits
https://<instance-name>.atlassian.net/rest/dev-status/latest/issue/detail?issueId=134963&applicationType=bitbucket&dataType=repository
- is cloned from
-
JSWCLOUD-16901 /rest/api/3/issue/ REST API endpoint provides only a part of a Development info associated with an issue
- Gathering Interest