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:

Add new integration type

url

/rest/gitplugin/1.0/integration

method

POST

parameters

Request body is a JSON structure. For complete reference of the parameters, see Add New Integration API.

GITHUB

Example 1: (Username/password)

1 2 3 4 5 6 { "type": "GITHUB", "password": "mypassword", "username": "johnsmith", "displayName": "johnsmith's GitHub via API" }

Example 2: (Personal access token)

1 2 3 4 5 { "type": "GITHUB", "pat": "q9ie8y8lwrrlsg943ioox3qdv085hyr63h005rxb", "displayName": "johnsmith's GitHub via API (pat)" }

GITHUB ENTERPRISE

Example 1: (Username/password)

1 2 3 4 5 6 7 8 { "type": "GITHUB_SERVER", "displayName": "GitHub Ent. via API -- password", "origin": "https://mygithub.yourorg.com", "username": "githubadmin", "password": "4TKaCXtaf59G", "disableSslVerification": true }

Example 2: (Personal access token)

1 2 3 4 5 6 7 { "type": "GITHUB_SERVER", "displayName": "GitHub Ent. via API -- pat", "origin": "https://mygithub.yourorg.com", "pat": "330sw9nqs1ges2osiffl4lzb6bm65ejbeua4rsju", "disableSslVerification": true }

GITLAB

1 2 3 4 5 { "type": "GITLAB", "pat": "AvTfLwSd6wBoK6bSPzks", "displayName": "MY GITLAB" }

GITLAB CE/EE (Legacy)

1 2 3 4 5 6 7 { "type": "GITLAB_SERVER_LEGACY", "displayName": "GITLAB_SERVER v.3 Legacy", "username": "gitlabadmin", "password": "G4eeNPpNK82d", "origin": "http://mygitlab.yourorg.com/" }

GITLAB CE/EE

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

AWS CODECOMMIT

1 2 3 4 5 6 { "type": "AWS", "username": "AHMY0OGWY8RX3RB1SXTU", "password": "YupPNQD8fyREjfkHrY8KqmYNz7c5QzWPubqSw2az", "awsRegion": "us-east-1" }

AZURE

1 2 3 4 { "type": "AZURE", "pat": "vuxz5i9kn2pqrr2culs0j2kryxqu38myg8i5s0t3gp86h47wb6ft" }

VSTS

1 2 3 4 5 { "type": "VSTS", "pat": "vuxz5i9kn2pqrr2culs0j2kryxqu38myg8i5s0t3gp86h47wb6ft", "displayName": "Visual Studio Ent." }

TFS

1 2 3 4 5 6 7 { "type": "TFS_SERVER", "displayName": "TFS 2018 via API", "origin": "http://tfs2018.yourorg:8080/tfs", "username": "tfsadmin", "password": "I26C953WPmNbFr7hp3eosf$Z68PcXAHe" }

AZURE DEVOPS

1 2 3 4 5 6 7 { "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

1 2 3 4 5 { "type": "FILESPACE", "displayName": "Tracked folder via API", "origin": "D:\\tmp\\*" }

GERRIT

Note
The origin field parameter is required.

1 2 3 4 5 6 7 8 9 { "origin": "http://yourorg.hostsvr.com:8080", "type": "GERRIT", "refSpecNotes": true, "refSpecChanges": true, "username": "johnsmith", "password": "jfJHhKHfksjhfkdsjhfelkwhfKFHlKDSHF", "displayName": "Gerrit repos" }