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

Contact Support

Retrieve Repository List

Retrieves list of repositories mapped to a given project.

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

 

url

/rest/gitplugin/1.0/repository

method

GET

parameters

projectKey

Jira Project key (string). Optional.  Query parameter.  If omitted, all imported repositories will be returned.

Example: Form param (projectKeyTST)

response

JSON

Example:

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

{
  "success": true,
  "repositories": [
    {
      "id": 2,
      "displayName": "testrepo",
      "origin": "https://github.com/xxx",
      "mainBranch": "master",
      "root": "xxx/xxx",
      "realRoot": "2_testrepo",
      "absoluteRoot": false,
      "disabled": false,
      "enableFetches": true,
      "sendCommitEmails": true,
      "maxMinsToCommitEmail": 1440,
      "global": true,
      "hosted": false,
      "initDate": 1606383040986,
      "lastIndexedDate": 1613815871685,
      "revisionIndexing": true,
      "gitViewerEnabled": true,
      "disableSslVerification": false,
      "smartCommitsEnabled": true,
      "viewFormat": "",
      "commitsValidationRequired": true,
      "requireUserPat": false,
      "projectMappingIds": [],
      "trackedFolderId": 11,
      "integrationType": "GITHUB",
      "showAllTags": true,
      "supportsBranchCreationApi": true,
      "supportsPullRequestApi": "PULL_REQUESTS_GROUP",
      "sourcesDiffViewEnabled": true,
      "refSpecNotes": true,
      "refSpecChanges": false,
      "trustFolderStat": true
    },
    {
      "id": 1,
      "displayName": "gitrepo",
      "origin": "https://xxx@xxx.gitlab.org/xxx",
      "mainBranch": "master",
      "root": "/xxx/xxx/xxx",
      "realRoot": "1_gitrepo",
      "absoluteRoot": false,
      "disabled": false,
      "enableFetches": true,
      "sendCommitEmails": true,
      "maxMinsToCommitEmail": 1440,
      "global": true,
      "hosted": false,
      "initDate": 1606383040986,
      "lastIndexedDate": 1613815870861,
      "revisionIndexing": true,
      "gitViewerEnabled": true,
      "disableSslVerification": false,
      "smartCommitsEnabled": true,
      "commitsValidationRequired": true,
      "requireUserPat": false,
      "projectMappingIds": [],
      "trackedFolderId": 11,
      "integrationType": "GITLAB",
      "showAllTags": true,
      "supportsBranchCreationApi": true,
      "supportsPullRequestApi": "MERGE_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