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

Contact Support
GitKraken Status  

Delete Existing Repository API

Deletes the existing repository from the Git Integration for Jira app repository configuration.

Only Jira admins can perform the Delete Repository API call.

 

url

{JiraBaseURL}/rest/gitplugin/1.0/repository

method

DELETE

Parameters

Field Description
id Integer. Required.

This is the ID of the existing repository. For example, id : 3,.

deleteFiles Boolean. Optional.

Default value is false. Indicates whether the repository folder is also deleted from the Jira server. If set to true, the repository folder is deleted from the Jira server. If set to false, the unused clone of a repository will remain in jira/home/data/git-plugin folder.

Important!
DO NOT use deleteFiles=true to repository files where origin points to an original repository path. For example:

  • …when a plain repository is pointing to an absolute path
  • …when a tracked folder is connected to a GitLab hashed storage

If set to true, it will erase (a) repositories from the absolute path and (b) repositories from your Gitlab.

Response

Deletes the repository from the Git Integration for Jira app repository configuration. If the deleteFiles parameter is set to true, the repository folder is also deleted from the Jira instance.

Examples

Example 1:
http://jira.yourorg.com/rest/gitplugin/1.0/repository?id=3&deleteFiles=true

Response:
{
  "success": true
}

Example 2:
http://jira.yourorg.com/rest/gitplugin/1.0/repository?id=5

Response:
{
  "success": false,
  "error": "Repository with id=5 does not exist",
  "advice": "Please try again with an existing repository id."
}

 

Repository REST APIs

Retrieve Repository List

Add New Repository

Update Existing Repository

Delete Existing Repository (this page)

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