Starts the process of importing configuration and returns the result at once.
Bulk Import Configuration
url
{JiraBaseURL}/rest/gitplugin/1.0/configuration.json
method
POST
Parameters
Parameter | Description |
---|---|
file | Input the path to the tab-separated values (.TSV) file. See table below for details on each TSV file parameter. |
confirmed-delete[ ] | Optional.
Accepts multiple repository IDs confirmed for deletion. Input one or more repositories to delete, separated by commas. Repositories won’t be deleted if it’s not in this list. |
HTTP headers | The request should contain the additional HTTP header:
|
Request example
curl -vv -X POST -H "X-Atlassian-Token: no-check" -b "atlassian.xsrf.token=<token>;JSESSIONID=<session>;ROUTEID=.1" -F [email protected] http://<jira_url>/rest/gitplugin/1.0/configuration.json
Response
JSON
Returns the ID of the importing thread.
Download sample file
Right click and save the file below then extract to an easily accessible folder:
configuration_post.py
Example:
http://jira.example.org/rest/gitplugin/1.0/configuration.json
Response example:
{
"success":false,
"threadId":142
}
Usage:
Importing configuration from conf.tsv file:
user@home:~$ python configuration_post.py conf.tsv
{"success":false,"reposToDelete":[{"id":14,"description":"test-repo"},{"id":15,"description":"test-repo"}]}
Importing configuration from conf.tsv file with confirm delete:
user@home:~$ python configuration_post.py conf.tsv 14,15
{"success":false,"threadId":1058}
Field parameters
Refer to the parameters below when editing the TSV file:
Column/Field | Description |
---|---|
id | Integer. Required.
Assign an ID number to a repository. This is required if you wish to update or edit existing repositories by setting this value to their equivalent IDs. If this field is left blank, the repository will be created as new. When importing to a new server, the |
realRoot | String. Optional on existing servers.
This is the local path to the repository on the server where your Jira service is running. This will point the Git Integration for Jira app to a clone of the repository hosted locally with Jira. This field corresponds to the Repository root input box in the Advanced setup/Repository settings. The If this field is specified, |
absoluteRoot | Boolean. Optional.
This field corresponds to the Cloned root location input field in the Advanced setup/Repository settings. If set to true, the repository is automatically managed by Git Integration for Jira app (stored in If set to false, the repository is manually configured by the Jira administrator. If this field is specified, realRoot must also be defined. |
origin | String. Required.
This is the URL to the hosted git service used on the project. For example, you might host your repository on GitHub, Beanstalk or your own server. BigBrassBand recommends to use the For HTTPS git repositories, obtain the URL from your git host then set your login credentials in the The repository origin may not be hosted on the same server as Jira. |
displayName | String. Optional. Some git hosts may require this to be filled in.
Define a meaningful name for this repository configuration. If this field is left blank, the default value is obtained from the origin. |
enableFetches | Boolean. Optional.
Set to true to enable fetches on git repositories hosted on remote servers. Set to false to enable fetches on git repositories hosted on the same server as Jira. See Enable Fetches in section, Adding a repository via Advanced setup. The default boolean value for this field is true. |
revisionIndexing | Boolean. Optional.
The default boolean value for this field is true. This option turns on the memory cache which is used when list of commits are displayed. Set to true if revision indexing will index and link to any mentioned issue keys in the revision history or not (false). |
mainBranch | String. Optional.
Set specific branch as the main branch for this repository. The default value is “master”. See Main Branch in section, Connecting a repository via Advanced setup. |
username, password | String. Optional.
Leave blank if 2FA is enabled for the git host. |
pat | String. Optional.
Required, if 2FA is enabled for the git host. This field accepts personal access token from supported git hosts. |
gitViewerEnabled | Boolean. Optional.
Enables or disables the Repository Browser feature for this repository. The default setting for this option is enabled. Users must have the View Development Tools project permission in order to use this feature. Consult your Jira System Administrator on permissions. For more information, see section, Repository Browser. |
projectMapping | Long [ ]. Array. Optional.
These are numeric projects IDs associated with the repository.
If projects are not associated to the repository, you must leave this field blank and set the gitViewerEnable field to false. |
smartCommitsEnabled | Boolean. Optional.
This setting is enabled by default. Enables/disables smart commits processing for this repository or tracked folder. The default value for this field is true. |
sendCommitEmails | Boolean. Optional.
Send commit notification emails for this repository. If left blank, the default value for this field is true. |
maxMinsToCommitEmail | Integer. Optional.
Set the desired value in minutes, as to when commit notifications will be sent. Commit notifications will be e-mailed if the age of the commit is less than or equal to this value. Default value is 1440 minutes. |
webLinkType | String. Optional.
Set web link type equivalent to the connected git host. Set web linking formats by referring to Git Integration for Jira: Web linking. |
changesetFormat | String. Optional.
This is the URL used to display revision. Use the following variable: |
fileAddedFormat, fileModifiedFormat, fileDeletedFormat | String. Optional.
This is the URL to display content of added, modified or deleted files. Use the following variables:
|
mergeRequestFormat | String. Optional.
This is the URL to display content of pull/merge requests on the git server. Use the following variables:
|
branchLinkFormat | String. Optional.
This is the URL to display a branch on the git server. Use the following variables:
|
disabled | Boolean. Optional.
Add this repository into the Git Integration app configuration and set its status to updated (enabled) or disabled. If left blank, the default value for this field is false. |
hosted | Internal field. Read-only.
This field will show whether the repository is hosted on Jira or not. |
tagsFilter | String. Optional.
Displays all tags for the specific issue, if left blank. Otherwise, set tags matching pattern to display tags on issue pages that match the specified regular expression pattern. For more information, see example in Show tags. Set |
integrationType | Flag. Internal field.
This field will show whether the repository is a tracked folder, a connected git service or a simple repository. |
trackedFolderId | Integer. Internal field.
This field will display the ID of the “parent” repository. It can be changed in order to convert the repository to a sub-repository. Use with caution |
delete | String. Optional.
Enter “delete” on this column/field as a confirmation to the Git Integration app to automatically remove the selected repository from the plugin configuration. If left blank, no changes will occur. |
sshKeyId | Integer. Optional. This is the ID of an associated SSH key. |
requireUserPat | Boolean. Optional.
Setting this parameter to true will require users to specify their own PAT for branch and pull/merge request management. |
sourcesDiffViewEnabled | Boolean. Optional.
When enabled, this setting allows Jira users with the View Development Tools and correct Jira/Git Integration for Jira app permissions to view the commit and file diffs inside Jira. |
sslVerify | Boolean. Optional.
Default is true. The SSL Verify option is set to Enabled by default. If set to false, the Git Integration for Jira app will ignore verification of SSL certificates when connecting to a git server. This setting can also be accessed via Manage git repositories ➜ Actions ➜ Edit repository settings. |
apiPath | String. Optional.
The integration will use this relative REST API path starting with “/” to retrieve the list of tracked repositories. For more information, see Working with Custom API path. |
apiFilter | String. Optional.
JMESPath filter expression will be used to filter API results. See article Working with JMESPath filters or contact support for help writing expressions. |
tfsCollection | String. Optional. TFS or Azure DevOps Server integrations only.
A TFS collection is a group of TFS team projects. Specify an existing TFS Collection for use with Jira integration. |
awsRegion | String. Optional. AWS integrations only.
Specify a region for AWS CodeCommit integration. For region values, see AWS Regions and Endpoints. Supported regions:
|
trustFolderStat | Boolean. Optional.
When the The default value for Jira Data Center is false. If your repository is stored on a network share, it is highly recommended to set the When adding new repositories, we recommend to leave the setting of the |
refSpecNotes | Boolean. Optional.
This is a reference to Git notes are not shown…
|
refSpecChanges | Boolean. Optional.
This is a reference to |
refSpecCustom | String. Optional.
This is a user-defined list of references used for fetching. It is a comma-separated list with the format: |
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. |
Take note that the .tsv file is verified by the Git Integration for Jira app with the following rules:
-
The header row is required.
-
The order of fields specified in the header row – is the order of the fields in the following rows.
-
If a field is omitted from the header row, the Git Integration app will use the default value for a new repository. The Git Integration app will keep the current value of a repository if it already exists in the configured repositories.
-
If a repository is not listed in the .tsv file, no changes will be made if the same repository exists in the Git Integration app configuration.
Bulk Change REST APIs
-
Bulk Export (Git Integration for Jira Server/Data Center)
-
Bulk Import (this page)
-
Get Bulk Import Information (Git Integration for Jira Server/Data Center)