Skip to main content
Skip table of contents

Jigit - APIs

Jigit APIs are used to manage configurations for GitLab or GitHub repositories, projects or groups.

Does Jigit have REST APIs?

Jigit API, actually, is not a REST API. It accepts application/x-www-form-urlencoded content type and returns text/html. In all cases, it either redirects to the plugin admin page or returns an empty response.

Basic information

These APIs are used by the UI, feel free to review the Network Tab in your browser to explore more details on how the UI uses them.

URL: {JIRA_BASE_URL}/rest/jigit/1.0/repo

Http verb: POST

Request headers:
- Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Response headers:
- Content-Type: text/html;charset=UTF-8

Add a configuration

URL: {JIRA_BASE_URL}/rest/jigit/1.0/repo/add

Form parameters (encoded):repo_name=test&url=https%3A%2F%2Fgitlab.com&service_type=GitLab&token=TOKEN&repository_id=GROUP%2FREPO&repo_type=SingleRepository&def_branch=master&branches_strategy=all&request_timeout=10&sleep_timeout=10&sleep_requests=100

Parameter name

Description

Possible value/Default value

Requirements

repo_name

String name that represents a configuration

Required

url

GitLab/GitHub url

Required

service_type

Predefined value

GitLab
GitLab8
GitHub

Required

token

Authentication token

Required

repository_id

Repository/group id like
”project/repository”

Required

repo_type

Predefined value

SingleRepository
GroupOfRepositories

Required

def_branch

Default branch name to scan

Required

branches_strategy

A strategy to scan branches in a repository or a group of repositories

selected - scan only selected branch
all - scan all branches in repository
mask - scan repositories by pattern defined in “def_branch”(bug/*)

Default value : selected

request_timeout

Request timeout in seconds

Default: 10 sec

Optional

sleep_timeout

Timeout in seconds to wait between each batch of requests defined in sleep_requests

Default: 10 sec

Optional

sleep_requests

Count of requests before waiting “sleep_timeout” seconds. This and previous parameters are used to reduce load on GitLab/GitHub and Jira, especially during initial indexing

Default: 100

Optional

include_subgroups

Flag which indicates to include all sub-groups and repositories in a group

Default: ““
To enable should be equal to “on“

Optional.
It’s taken into account only for
repo_type=GroupOfRepositories

Test a configuration

URL: {JIRA_BASE_URL}/rest/jigit/1.0/repo/test

Form parameters(encoded):url=https%3A%2F%2Fgitlab.com&service_type=GitLab&token=TOKEN&change_token=on&repository_id=alex_p1%2Ftest&repo_type=SingleRepository&def_branch=master&include_subgroups=on&branches_strategy=all&request_timeout=10&sleep_timeout=10&sleep_requests=100&repo_name=test

Parameter name

Description

Possible value/Default value

Requirements

repo_name

String name represents configuration

Required

url

GitLab/GitHub url

Required

service_type

Predefined value

GitLab
GitLab8
GitHub

Required

token

Authentication token

Optional

repository_id

Repository/group id like
”project/repository”

Required

repo_type

Predefined value

SingleRepository
GroupOfRepositories

Required

def_branch

Default branch name to scan

Required

request_timeout

Request timeout in seconds

Default: 10 sec

Optional

include_subgroups

Flag which indicates to include all sub-groups and repositories in a group

Default: ““
To enable should be equal to “on“

Optional.
It’s taken into account only for
repo_type=GroupOfRepositories

change_token

Flag which indicates to use provided token instead of existing one

Default: ““
To enable should be equal to “on“

Optional

Edit configuration

URL: {JIRA_BASE_URL}/rest/jigit/1.0/repo/edit

Form parameters(encoded):url=https%3A%2F%2Fgitlab.com&service_type=GitLab&token=TOKEN&change_token=on&repository_id=&repo_type=SingleRepository&def_branch=master&include_subgroups=on&branches_strategy=mask&request_timeout=10&sleep_timeout=10&sleep_requests=100&repo_name=test

Parameter name

Description

Possible value/Default value

Requirements

repo_name

String name represents configuration

Required

url

GitLab/GitHub url

Required

service_type

Predefined value

GitLab
GitLab8
GitHub

Required

token

Authentication token

Optional

repository_id

Repository/group id like
”project/repository”

Required

def_branch

Default branch name to scan

Required

branches_strategy

Predefined value

selected - scan only selected branch
all - scan all branches in repository
mask - scan repositories by pattern defined in “def_branch”(bug/*)

Default value : selected

request_timeout

Request timeout in seconds

Default: 10 sec

Optional

sleep_timeout

Timeout in seconds to wait between each batch of requests defined in sleep_requests

Default: 10 sec

Optional

sleep_requests

Count of requests before waiting “sleep_timeout” seconds

Default: 100

Optional

change_token

Flag which indicates to use provided token instead of existing one

Default: ““
To enable should be equal to “on“

Optional

Remove configuration

URL: {JIRA_BASE_URL}/rest/jigit/1.0/repo/remove

Parameter name

Description

Requirement

repo

the name of the configuration

Required

Clear data

URL: {JIRA_BASE_URL}/rest/jigit/1.0/repo/clear

Parameter name

Description

Requirement

repo

the name of the configuration

Required

Disable/Enable configuration

URL: {JIRA_BASE_URL}/rest/jigit/1.0/repo/activity

Parameter name

Description

Requirement

enabled

true or false

Required

repo

the name of the configuration

Required

Add a branch to a configuration

URL: {JIRA_BASE_URL}/rest/jigit/1.0/repo/branch/add

Parameter name

Description

Requirement

branch

branch name

Required

repo

the name of the configuration

Required

Remove branch from configuration

URL: {JIRA_BASE_URL}/rest/jigit/1.0/repo/branch/remove

Parameter name

Description

Requirement

branch

the branch name

Required

repo

the name of the configuration

Required

Updated:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.