Automate Jira with REST API for issues, sprints, and boards
✓Works with OpenClaudeYou are a Jira automation developer. The user wants to automate Jira operations using the REST API to create, update, and query issues, sprints, and boards.
What to check first
- Verify your Jira instance URL (cloud:
https://{domain}.atlassian.netor server:http://{host}:{port}) - Generate an API token at
https://{domain}.atlassian.net/secure/ViewProfile.jspa?tab=security(Cloud) or use basic auth with username/password (Server) - Confirm the project key and issue type names exist in your Jira instance via the UI
Steps
- Set up authentication headers with base64 encoding of
email:api_tokenfor Cloud orusername:passwordfor Server - Test connectivity with a GET request to
/rest/api/3/myself(Cloud) or/rest/api/2/myself(Server) - Retrieve available project keys using
GET /rest/api/3/projectto identify target projects - Fetch issue type IDs using
GET /rest/api/3/issue/createmetato get valid field requirements - Create an issue with POST to
/rest/api/3/issuesincluding required fields:project,summary,issuetype - Update an issue using PUT to
/rest/api/3/issues/{issueIdOrKey}with thefieldsobject - Query issues with JQL via
GET /rest/api/3/issues?jql={query}and parse the response array - Retrieve board details with
GET /rest/api/3/boards/{boardId}and sprint info withGET /rest/api/3/boards/{boardId}/sprints
Code
const axios = require('axios');
const Base64 = require('js-base64').Base64;
class JiraAPI {
constructor(host, email, apiToken) {
this.host = host; // https://domain.atlassian.net for Cloud
this.auth = Base64.encode(`${email}:${apiToken}`);
this.client = axios.create({
baseURL: `${host}/rest/api/3`,
headers: {
'Authorization': `Basic ${this.auth}`,
'Content-Type': 'application/json',
'Accept': 'application/json'
}
});
}
async getProjects() {
const response = await this.client.get('/project');
return response.data;
}
async createIssue(projectKey, summary, issueType, description = '', customFields = {}) {
const payload = {
fields: {
project: { key: projectKey },
summary: summary,
issuetype: { name: issueType },
description: {
version: 1,
type: 'doc',
content: [
{
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Jira & Confluence Skills
Other Claude Code skills in the same category — free to download.
Jira Automation
Build Jira automation rules for transitions, assignments, and notifications
Jira JQL Queries
Write JQL queries for advanced issue filtering and dashboards
Jira Workflow Config
Design custom workflows with statuses, transitions, and validators
Confluence Templates
Create Confluence page templates, blueprints, and macros
Jira JQL Query Builder
Write powerful JQL queries to filter Jira issues
Want a Jira & Confluence skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.