API Tokens

 

General information

Available ONLY for JIRA administrators

You can read more about Tokens here REST API Tokens


Get all Tokens

Method type: GET

URL: {JIRA_URL}/rest/extender/1.0/tokenTools/get

Respons format: JSON

Example response:

{ "tokens": [ { "label": "Token name", "user": "admin", "token": "ip9ul19f8jenb92tji8lo34qt7tb1meo", "limitTo": "[post].*/rest/api/2/issue/KANBAN-100/comment.*<br>.*/rest/api/2/issue/SCRUM-[1-2]{1}/comment.*", "ip": "", "validUntil": 1630476718964, "dateCreated": 1622700718964, "counter": 100 }, { "label": "Token name two", "user": "jankowalski", "token": "okf8a73basc74nasc9n32", "limitTo": "", "ip": "192.168.1.1", "validUntil": 1630476718964, "dateCreated": 1622700718964, "counter": 123456 } ], "status": "ok" }

 


Create Token

Method type: POST

URL: {JIRA_URL}/rest/extender/1.0/tokenTools/set

Request format: JSON

Example request:

{ "label": "Token name", "daysUntilExpiry": 90 "userName": "admin", "limitTo": "[post].*/rest/api/2/issue/KANBAN-100/comment.*\n.*/rest/api/2/issue/SCRUM-[1-2]{1}/comment.*" "token": "ip9ul19f8jenb92tji8lo34qt7tb1meo" }
{ "label": "Token name", "daysUntilExpiry": 0 "token": "ip9ul19f8jenb92tji8lo34qt7tb1meo" }

label - required - token name

daysUntilExpiry - optional - for security reasons, you can set this token to automatically expire. You can't change the expiry date once the token is created.

userName - optional - a user who will be able to use token, leave this field empty so that anyone can use the token.

limitTo - optional - you can limit the token to specific urls and methods, you can add new line sign using \n, \\n or <br>

token - optional - token, leave this field empty and the system will generate a random string

 


Delete Token

Method type: DELETE

URL: {JIRA_URL}/rest/extender/1.0/tokenTools/delete

Request format: JSON

Example request:

 


Disable/Enable "Usage Details" data collection

Method type: POST

URL: {JIRA_URL}/rest/extender/1.0/tokenTools/set

Request format: JSON

Example request:

 


Disable/Enable adding token calls to the audit log

Method type: POST

URL: {JIRA_URL}/rest/extender/1.0/tokenTools/set

Request format: JSON

Example request:

 

Changes