Module jira

ballerinax/jira Ballerina library

2.0.1

Overview

Jira is a powerful project management and issue tracking platform developed by Atlassian, widely used for agile software development, bug tracking, and workflow management.

The ballerinax/jira package provides APIs to connect and interact with Jira’s REST API endpoints, enabling seamless integration for operations such as managing issues, projects, users, and workflows. The latest version corresponds to the REST API version 3 (Cloud), which builds upon v2 with additional support such as Atlassian Document Format (ADF) in fields like comments and descriptions.

Setup guide

To use the Jira connector, you must have access to the Atlassian API through your Atlassian account. To access premium features, a Premium subscription is required. If you do not have an account, you can sign up for one here.

Step 1: Create an Atlassian account

  1. Sign up for an account or log in to your Atlassian account

Jira login screen

  1. You will be redirected after a successful login.

Jira redirect screen

Step 2: Create API token

  1. Click on account settings

Jira account settings path

  1. Click on security tab

Jira account settings

  1. Click on Create and manage API tokens

Jira Token

  1. Create API token

Create Token

  1. Store the access token securely for use in your application.

Quickstart

To use the Jira connector in your Ballerina application, update the .bal file as follows:

Step 1: Import the module

Import the jira module.

Copy
import ballerinax/jira;

Step 2: Instantiate a new connector

  1. Create a Config.toml file and, configure the obtained credentials in the above steps as follows:
Copy
username = "<your email>"
password = "<Access Token>"
  1. Create a jira:ConnectionConfig with the obtained access token and initialize the connector with it.
Copy
configurable string username = ?;
configurable string password = ?;

jira:ConnectionConfig config = {
    auth: {
        username,
        password
    }
};

final jira:Client jiraClient = check new(config,<"your-organization-id.atlassian.net/rest">);

Step 3: Invoke the connector operation

Get the user

Copy
public function main() returns error? {
    jira:User user = check jiraClient->/api/'3/myself;
}

Step 4: Run the Ballerina application

Copy
bal run

Examples

The Jira connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:

  1. Create Project and Issue - Creates a new Jira project and adds an issue to it.
  2. Create Issue and Add Comment - Creates a new issue in an existing Jira project and adds a comment to it.

Import

import ballerinax/jira;Copy

Other versions

See more...

Metadata

Released date: 4 months ago

Version: 2.0.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.12.0

GraalVM compatible: Yes


Pull count

Total: 154

Current verison: 86


Weekly downloads


Source repository


Keywords

Productivity

Cost/Freemium

Vendor/Jira

Area/Project Management

Type/Connector


Contributors