titledescriptionupdated_date
Jira On-Premises APIHow to generate a Jira API token for accessing Jira issues and users on on-premises installations.2025-10-24T16:45:21Z

What we need

[] API Token [] Username [] Jira Subdomain (e.g., your-company.atlassian.com)

Follow these steps to generate a Jira API token for accessing Jira issues and users on on-premises Jira installations:

  1. Log in to your Atlassian account

  2. Create an API token

    • Click on Create API token.
    • Enter a meaningful label for your token (e.g., “Parable Integration”).
    • Click Create.
  3. Copy and secure your token

    • Once generated, copy the token value.
    • Store it securely. This token cannot be viewed again after you close the dialog.
  4. Use the token with Basic Authentication

    • The token is used with Basic Authentication in the following format:
    • Your email address is the username
    • The API token is the password

You can use this token with the following Python function:

def jira_authentication_token(email = None, token=None):
    credentials = f"{email or os.environ['EMAIL']}:{token or os.environ['TOKEN']}"
    return base64.b64encode(credentials.encode('utf-8')).decode('utf-8')

This function encodes your email and token in the format required for the Authorization header:

Authorization: Basic BASE64_ENCODED_CREDENTIALS

Permissions

The API token grants access based on your Jira user permissions. Common API endpoints include:

  • /rest/api/3/issue/{issueIdOrKey} — Get information about a specific issue
  • /rest/api/3/user/search — Search for users
  • /rest/api/3/myself — Get information about the authenticated user

Item Checklist of what’s needed for integration

  1. Your Atlassian account email address
  2. Jira API token
  3. Jira instance URL (e.g., your-company.atlassian.net)

Required Permissions

To use the Jira API effectively, your Jira user account should have:

  • Browse projects permission
  • View issues permission
  • For user-related operations: Browse users permission