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 (projectKey
: TST)
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)