April 30th 1 PM ET

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

Add New Integration Type API (examples)

Only Jira admins can perform the Add New Integration Type API call.

Below are integration API examples for each integration types:

url

/rest/gitplugin/1.0/integration

method

POST

Prameters

Request body is a JSON structure.

For complete reference of the parameters, see Add New Integration API.

When adding new repositories, we recommend to leave the trustFolderStat setting to false (default). You can change this setting later on via Actions ➜ Edit repository settings in the Manage repositories page.

GITHUB

{
  "type": "GITHUB",
  "pat": "Sh#ft#t1Q6PDVm",
  "displayName": "johnsmith's GitHub via API"
}

GITHUB ENTERPRISE

{
  "type": "GITHUB_SERVER",
  "displayName": "GitHub Ent. via API -- pat",
  "origin": "https://mygithub.yourorg.com",
  "pat": "330sw9nqs1ges2osiffl4lzb6bm65ejbeua4rsju",
  "disableSslVerification": true
}

GITLAB

{
  "type": "GITLAB",
  "pat": "AvTfLwSd6wBoK6bSPzks",
  "displayName": "MY GITLAB"
}

GITLAB CE/EE (Legacy)

{
  "type": "GITLAB_SERVER_LEGACY",
  "displayName": "GITLAB_SERVER v.3 Legacy",
  "username": "gitlabadmin",
  "password": "G4eeNPpNK82d",
  "origin": "http://mygitlab.yourorg.com/"
}

GITLAB CE/EE

{
  "type": "GITLAB_SERVER",
  "displayName": "GITLAB_SERVER v.4",
  "origin": "http://mygitlabserver.yourorg.com",
  "pat": "7yz0b4sa8f3g59kaz7wn"
}

AWS CODECOMMIT

{
  "type": "AWS",
  "username": "AHMY0OGWY8RX3RB1SXTU",
  "password": "YupPNQD8fyREjfkHrY8KqmYNz7c5QzWPubqSw2az",
  "awsRegion": "us-east-1"
}

AZURE

{
  "type": "AZURE",
  "pat": "vuxz5i9kn2pqrr2culs0j2kryxqu38myg8i5s0t3gp86h47wb6ft"
}

VSTS

{
  "type": "VSTS",
  "pat": "vuxz5i9kn2pqrr2culs0j2kryxqu38myg8i5s0t3gp86h47wb6ft",
  "displayName": "Visual Studio Ent."
}

TFS

{
  "type": "TFS_SERVER",
  "displayName": "TFS 2018 via API",
  "origin": "http://tfs2018.yourorg:8080/tfs",
  "username": "tfsadmin",
  "password": "I26C953WPmNbFr7hp3eosf$Z68PcXAHe"
}

AZURE DEVOPS

{
  "type": "AZURE_DEVOPS",
  "displayName": "Azure Devops (TFS 2019) via API",
  "origin": "http://myazuredevops.yourorg.com/",
  "username": "adevopsadmin",
  "password": "G6Dz6BuUGKh5lo%Zh#cJm#0QdN@#fZ8#"
}

TRACKED FOLDER

{
  "type": "FILESPACE",
  "displayName": "Tracked folder via API",
  "origin": "D:\tmp\*"
}

GERRIT

Note
The origin field parameter is required.

{
  "origin": "http://yourorg.hostsvr.com:8080",
  "type": "GERRIT",  
  "refSpecNotes": true,
  "refSpecChanges": true,
  "username": "johnsmith",
  "password": "jfJHhKHfksjhfkdsjhfelkwhfKFHlKDSHF",
  "displayName": "Gerrit repos"
}

Integration REST APIs

Add New Integration

Add New Integration Type API (examples) (this page)

Update Existing Integration

Remove Integration

Retrieve an Integration

Retrieve Integration List

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