Git Integration for Jira Self-Managed (Data Center/Server) Documentation

Contact Support
GitKraken Status  

Retrieve Repository List

Retrieves list of repositories mapped to a given project.

Any Jira user can perform the Retrieve Repository List API call.

 

url

{JiraBaseURL}/rest/gitplugin/1.0/repository

method

GET

parameters

Field Description
all Optional. Also returns all the imported repositories. The all parameter can be safely ommitted, since adding it to the url just only make the request look formal. Cannot be used with other parameters.
projectKey Jira Project key (string). Optional. 
Query parameter. If omitted, all imported repositories will be returned.

Example:
Form param (projectKeyTST)

prHideFilter String. Optional.
Displays all pull requests for the specific issue, if left blank. Otherwise, set pull requests matching pattern to hide pull requests on issue pages that match the specified regular expression pattern.

response

JSON

Example:

http://jira.yourorg.com/rest/gitplugin/1.0/repository?projectKey=TEST

{
    "success": true,
    "repositories": [   
        {
            "id": 1,
            "group": "TestOrg",
            "displayName": "test-repo",
            "origin": "https://github.com/TestOrg/test-repo.git",
            "mainBranch": "master",
            "root": "..\data\git-plugin\1_test-repo",
            "realRoot": "1_test-repo",
            "absoluteRoot": false,
            "disabled": false,
            "enableFetches": true,
            "sendCommitEmails": true,
            "maxMinsToCommitEmail": 1440,
            "global": true,
            "hosted": false,
            "initDate": 1675942388415,
            "lastIndexedDate": 1695468517355,
            "revisionIndexing": true,
            "gitViewerEnabled": true,
            "disableSslVerification": false,
            "smartCommitsEnabled": true,
            "webLinkType": "github",
            "viewFormat": "",
            "changesetFormat": "https://github.com/TestOrg/test-repo/commit/${rev}",
            "fileAddedFormat": "https://github.com/TestOrg/test-repo/commit/${rev}#diff-${sha256path}",
            "fileModifiedFormat": "https://github.com/TestOrg/test-repo/commit/${rev}#diff-${sha256path}",
            "fileDeletedFormat": "https://github.com/TestOrg/test-repo/commit/${rev}#diff-${sha256path}",
            "mergeRequestFormat": "https://github.com/TestOrg/test-repo/pull/${mergereqId}",
            "branchLinkFormat": "https://github.com/TestOrg/test-repo/tree/${branch}",
            "commitsValidationRequired": true,
            "requireUserPat": false,
            "projectMappingIds": [
            ],
            "trackedFolderId": 1,
            "integrationType": "GITHUB",
            "showAllTags": true,
            "supportsBranchCreationApi": true,
            "supportsPullRequestApi": "PULL_REQUESTS_GROUP",
            "sourcesDiffViewEnabled": true,
            "refSpecNotes": true,
            "refSpecChanges": false,
            "trustFolderStat": true
        },
        {
            "id": 2,
            "group": "TestOrg",
            "displayName": "acme",
            "origin": "https://github.com/TestOrg/acme.git",
            "mainBranch": "main",
            "root": "..\data\git-plugin\2_acme",
            "realRoot": "2_acme",
            "absoluteRoot": false,
            "disabled": false,
            "enableFetches": true,
            "sendCommitEmails": true,
            "maxMinsToCommitEmail": 1440,
            "global": true,
            "hosted": false,
            "initDate": 1675942385985,
            "lastIndexedDate": 1695468510019,
            "revisionIndexing": true,
            "gitViewerEnabled": true,
            "disableSslVerification": false,
            "smartCommitsEnabled": true,
            "webLinkType": "github",
            "viewFormat": "",
            "changesetFormat": "https://github.com/TestOrg/acme/commit/${rev}",
            "fileAddedFormat": "https://github.com/TestOrg/acme/commit/${rev}#diff-${sha256path}",
            "fileModifiedFormat": "https://github.com/TestOrg/acme/commit/${rev}#diff-${sha256path}",
            "fileDeletedFormat": "https://github.com/TestOrg/acme/commit/${rev}#diff-${sha256path}",
            "mergeRequestFormat": "https://github.com/TestOrg/acme/pull/${mergereqId}",
            "branchLinkFormat": "https://github.com/TestOrg/acme/tree/${branch}",
            "commitsValidationRequired": true,
            "requireUserPat": false,
            "projectMappingIds": [
            ],
            "trackedFolderId": 1,
            "integrationType": "GITHUB",
            "showAllTags": true,
            "supportsBranchCreationApi": true,
            "supportsPullRequestApi": "PULL_REQUESTS_GROUP",
            "sourcesDiffViewEnabled": true,
            "refSpecNotes": true,
            "refSpecChanges": false,
            "trustFolderStat": true
        },                
        {
            "id": 3,
            "group": "TestOrg",
            "displayName": "applanix-site-viewer",
            "origin": "https://github.com/TestOrg/applanix-site-viewer.git",
            "mainBranch": "master",
            "root": "..\data\git-plugin\3_applanix-site-viewer",
            "realRoot": "3_applanix-site-viewer",
            "absoluteRoot": false,
            "disabled": false,
            "enableFetches": true,
            "sendCommitEmails": true,
            "maxMinsToCommitEmail": 1440,
            "global": true,
            "hosted": false,
            "initDate": 1675942392599,
            "lastIndexedDate": 1695468520018,
            "revisionIndexing": true,
            "gitViewerEnabled": true,
            "disableSslVerification": false,
            "smartCommitsEnabled": true,
            "webLinkType": "github",
            "viewFormat": "",
            "changesetFormat": "https://github.com/TestOrg/applanix-site-viewer/commit/${rev}",
            "fileAddedFormat": "https://github.com/TestOrg/applanix-site-viewer/commit/${rev}#diff-${sha256path}",
            "fileModifiedFormat": "https://github.com/TestOrg/applanix-site-viewer/commit/${rev}#diff-${sha256path}",
            "fileDeletedFormat": "https://github.com/TestOrg/applanix-site-viewer/commit/${rev}#diff-${sha256path}",
            "mergeRequestFormat": "https://github.com/TestOrg/applanix-site-viewer/pull/${mergereqId}",
            "branchLinkFormat": "https://github.com/TestOrg/applanix-site-viewer/tree/${branch}",
            "commitsValidationRequired": true,
            "requireUserPat": false,
            "projectMappingIds": [
            ],
            "trackedFolderId": 1,
            "integrationType": "GITHUB",
            "showAllTags": true,
            "supportsBranchCreationApi": true,
            "supportsPullRequestApi": "PULL_REQUESTS_GROUP",
            "sourcesDiffViewEnabled": true,
            "refSpecNotes": true,
            "refSpecChanges": false,
            "trustFolderStat": true
        }
    ]
}

 

Repository REST APIs

Retrieve Repository List (this page)

Add New Repository

Update Existing Repository

Delete Existing Repository

Have feedback about this article? Did we miss something? Let us know!
On this page