PRICING
PRODUCT
SOLUTIONS
by use case
learn more
BlogTemplatesVideosYoutubeRESOURCES
COMMUNITIES AND SOCIAL MEDIA
PARTNERS
Jira, Atlassian's versatile issue tracking and project management platform, has become an indispensable tool for countless development teams worldwide. While its user-friendly interface makes it easy to manage projects and track issues, Jira's true power lies in its extensive customization options and integration capabilities. Central to this is the Jira REST API, which opens up a world of possibilities for automating tasks, building custom apps, and seamlessly integrating Jira with other tools in your development ecosystem. In this comprehensive guide, we'll dive deep into the Jira REST API, explore its capabilities, and walk through practical examples to help you get started.
Key Takeaways: The Jira REST API is a versatile tool for automating tasks, building custom apps, and integrating Jira with other development tools across both Cloud and Server/Data Center versions. It offers a wide range of capabilities including issue management, bulk operations, and custom reporting, with support for advanced features like pagination and data expansion. While there are some differences between versions, the API's core functionality remains consistent, allowing teams to efficiently customize Jira to their specific needs and integrate it seamlessly with their development ecosystem.
At its core, an API (Application Programming Interface) is a set of protocols and tools that specify how software components should interact. In the context of Jira, the API allows external applications to interact with Jira programmatically, enabling the retrieval and manipulation of data, as well as the execution of actions within Jira. Jira provides two types of APIs:
The Jira Java API is a powerful tool for developers building custom Jira applications or plugins. It provides direct access to the Jira server's underlying Java objects and methods, allowing deep integration and customization. However, this level of access is only available for on-premise Jira installations (Server or Data Center) where you have direct access to the server. If you're working with Jira Cloud or building a standalone integration, the REST API is the way to go.
REST (Representational State Transfer) is an architectural style that defines a set of constraints for creating web services. A REST API exposes a set of HTTP endpoints that can be accessed by sending requests with specific HTTP methods (GET, POST, PUT, DELETE) to perform operations on resources.
The Jira REST API follows this architecture, providing a comprehensive set of endpoints to interact with almost every aspect of Jira, from issues and projects to agile boards and dashboards. It returns data in JSON format and supports a variety of authentication methods to ensure secure access.
One of the key advantages of the REST API is its platform independence - you can call the API from any device or application that can make HTTP requests, regardless of the programming language used. This makes it the ideal choice for building integrations between Jira and other tools, or for scripting interactions with Jira from the command line.
The possibilities are nearly endless. Here are just a few examples of what you can achieve with the Jira REST API:
These are just a few examples - the Jira REST API provides an extensive set of endpoints that cover nearly every feature and function available in Jira's user interface. If you can do it in Jira, chances are you can do it via the API.
While the Jira REST API provides largely the same capabilities across Jira Cloud, Server, and Data Center, there are a few key differences to be aware of:
Despite these differences, the core concepts and usage patterns for the REST API remain largely the same across deployments. The skills and knowledge you gain working with one version of the API will be readily transferable to others.
To get started with the Jira REST API, you'll need:
With these elements in place, you're ready to start making your first API requests.
Let's walk through a practical example of using the Jira REST API to create, retrieve, update, and search for issues. We'll be using Postman for our examples, but the principles apply to any API client.
If you don't already have a Jira instance to work with, the easiest way to get started is to sign up for a free Jira Cloud instance at https://www.atlassian.com/software/jira. Once your site is set up, create a new project to work with.
To authenticate our API requests, we'll use an API token. Here's how to generate one:
Let's start by retrieving the details of an existing issue:
Now let's create a new issue via the API:
Switch to the "Body" tab, select the "raw" radio button, and enter the following JSON, replacing the project.key, issuetype.name, summary, and description values as appropriate:
3. Click "Send". Jira will respond with a 201 Created status and the full details of the newly created issue.
To update an existing issue, we use the PUT method:
In the request body, include the fields you want to update, for example:
2. Click "Send". Jira will respond with a 204 No Content status to indicate the update was successful.
Jira's powerful search capabilities are also accessible via the REST API using JQL (Jira Query Language):
In the request body, include a JQL query and any additional parameters:
Ā This query will return the 10 most recently created issues in the 'To Do' status from the specified project, including only the summary, status, and assignee fields.
These examples just scratch the surface of what's possible with the Jira REST API. As you become more familiar with the available endpoints and parameters, you'll be able to build increasingly complex and powerful integrations.
One of the most powerful applications of the Jira REST API is task creation and update automation. With Latenode, you can set up sophisticated workflows that automatically create and update tasks in Jira based on data from external sources or specific triggers. This ensures that information in your project management system remains current and timely, enhancing team efficiency.
For example, you could create a workflow that automatically creates a new task in Jira when an error message is received from a monitoring system, populating all necessary fields and assigning the task to the appropriate developer. As updates come in, the task can be automatically updated, and when the issue is resolved, it can be closed. This streamlined approach not only improves issue tracking but also saves your team time, allowing them to focus on solving problems rather than administrating them.
You can learn more about this script and the integration with Latenode in this article. The integration with Latenode offers a few key benefits:
Imagine every important email from a client automatically turning into a task in Jira. With Latenode, this becomes a reality. Our platform ensures the creation of a new task in the right project with populated fields based on the email content, guaranteeing that no important request is missed.
Here's an example of how a Latenode workflow automates Jira task creation and updates based on incoming email data from an external source.
This image would show a visual representation of the workflow in Latenode's interface, with connected nodes representing each step of the process from email receipt to Jira task creation.
This is just one example of how Latenode can transform your approach to using the Jira API with powerful automation. In fact, the platform's capabilities are virtually limitless - you can create any automation scenarios necessary to improve your business efficiency. Whether it's automatic task distribution, sending notifications, tracking key performance indicators, or any other tasks - Latenode provides the tools to bring them to life.
By leveraging Latenode's visual workflow builder and seamless integration with the Jira REST API, you can easily design and implement complex automation scenarios, increasing project management efficiency and accelerating your team's workflows.
If you need help or advice on how to create your own script or if you want to replicate this one, contact our Discord community, where the Low-code automation experts are located.
As you start working with larger datasets in Jira, you'll need to be aware of how the REST API handles pagination, expansion of nested resources, and ordering of results.
Many Jira resources contain references to other, nested resources. For example, an Issue contains references to its Project, Issuetype, Creator, Reporter, Assignee, Comments, Attachments, and more. By default, these nested resources are returned as stubs, containing only a few basic fields and a self link to the full resource.
If you need the full details of a nested resource, you can use the expand query parameter to request that Jira includes the full resource in the response. For example, to include the full details of an issue's project and assignee:
You can expand multiple resources by comma-separating them. Be aware that expansions can significantly increase the size of the response payload, so use them judiciously.
Requests that could potentially return a large number of results (like JQL searches) are paginated by default. The API will return a maximum number of results per page (defaulting to 50, but customizable up to 100) along with links to the next and previous pages.
You can control pagination using the startAt and maxResults parameters:
For example, to retrieve the second page of results with a page size of 20:
Your application will need to handle making multiple requests to retrieve all pages of results.
You can control the order of results using the orderBy parameter, which accepts a comma-separated list of fields to order by. Each field can be prefixed with a - to indicate descending order.
For example, to order issues by creation date descending, then by priority ascending:
GET .../rest/api/3/search?jql=project=YOUR_PROJECT_KEY&orderBy=-created,priority
Not all fields support ordering - refer to the documentation for the specific endpoint to see what's available.
Here are a couple of more advanced examples demonstrating the power of the Jira REST API for bulk operations.
Suppose you have a CSV file containing data for multiple issues you want to create or update in Jira. You can use a tool like Postman to automate this process:
In the Body tab, select the "raw" radio button and enter a template for your issue data, using variables for the fields that will come from your CSV:
2. Switch to the "Pre-request Script" tab and add code to read your CSV file and set the corresponding variables:
3. In the "Runner" window, select your CSV file as the data file and start the run. Postman will create a new request for each row in your CSV, substituting the variables from the file.
This is a powerful technique for bulk importing data into Jira from external sources.
If your source data is already in JSON format, you can use the bulk create/update endpoint to process multiple issues in a single request:
POST https://your-domain.atlassian.net/rest/api/3/issue/bulk
The request body should contain an array of issue create/update objects, each following the same format as a single issue create/update request:
This will create two issues in one request - a Task in the PROJ1 project and a Bug in the PROJ2 project. You can include up to 50 issues in a single bulk request.
The bulk endpoint is also useful for performing bulk transitions, updates, and deletions. For example, to transition multiple issues to the "Done" status:
This assumes that "31" is the ID of your "Done" transition - you can find the available transitions for an issue type via the /rest/api/3/issue/{issueIdOrKey}/transitions endpoint.
The Jira REST API is an immensely powerful tool for integrating Jira with other systems, automating tasks, and extending Jira's capabilities. In this guide, we've covered the fundamentals of the API, including:
However, we've only just scratched the surface. The Jira REST API provides endpoints for working with nearly every aspect of Jira, from projects and boards to users and permissions. As you build your integrations, be sure to refer to the official Atlassian documentation for the most up-to-date and comprehensive information.
With the Jira REST API in your toolkit, the possibilities for what you can do with Jira are nearly endless. Whether you're building a custom reporting dashboard, synchronizing data with another system, or automating complex workflows, the API provides the flexibility and power you need to make it happen.
Jira Cloud supports OAuth 2.0 and API tokens for authentication. For OAuth, you'll need to register your application in Atlassian's developer console to obtain a client ID and secret. API tokens are a simpler option for scripts and personal integrations. Jira Server and Data Center support Basic Auth (username and password) and session-based authentication using cookies.
While the core endpoints and functionalities are largely the same, there are some key differences:
Always refer to the documentation specific to your Jira deployment to ensure you're using the correct URLs and parameters.
Jira Cloud enforces rate limits to ensure the stability and performance of the service. If you exceed the rate limit, you'll receive a 429 Too Many Requests response.
To avoid hitting rate limits:
Server and Data Center deployments have rate limiting disabled by default, but administrators can choose to enable and configure rate limits if needed.
Yes, Jira Server and Data Center have a REST API that is largely similar to the jira Cloud API. The main differences are:
Refer to the Server/Data Center-specific rest api documentation for the most accurate information for your version of Jira.
The Jira REST API is a powerful and flexible way to integrate Jira into your development workflow. Whether you're working in the cloud or managing your own server, the API provides the tools you need to automate, customize, and extend Jira to fit your team's unique needs. With a little exploration and experimentation, you'll be able to unlock the full potential of Jira and take your project management to the next level.