Jira Python API Docs | dltHub
Build a Jira-to-database pipeline in Python using dlt with AI Workbench support for Claude Code, Cursor, and Codex.
Last updated:
Jira is an issue tracking and project management platform exposing REST APIs for interacting with issues, projects, users, workflows and metadata. The REST API base URL is For Jira Cloud (site-specific): https://<your-domain>.atlassian.net/rest/api/3 Alternate Cloud (via api.atlassian.com with cloudId for OAuth 3LO): https://api.atlassian.com/ex/jira/<cloudId>/rest/api/3 For Jira Server/DC (on-prem): https://<host>:<port>/rest/api/2 (or /rest/api/latest which maps to supported version) and Supports Basic (email + API token) for ad-hoc scripts, OAuth 2.0 (3LO) for apps, OAuth 1.0a (server), Cookie session, and App/connect JWT for Connect apps..
dlt is an open-source Python library that handles authentication, pagination, and schema evolution automatically. dlthub provides AI context files that enable code assistants to generate production-ready pipelines. Install with uv pip install "dlt[workspace]" and start loading Jira data in under 10 minutes.
What data can I load from Jira?
Here are some of the endpoints you can load from Jira:
| Resource | Endpoint | Method | Data selector | Description |
|---|---|---|---|---|
| issues | /issue/{issueIdOrKey} | GET | (single issue object) | Get issue by id or key |
| search | /search | GET | issues | Search issues using JQL; paginated (startAt, maxResults, total) |
| projects | /project | GET | (top-level array) | Get all projects visible to user |
| project | /project/{projectIdOrKey} | GET | (single project object) | Get project details |
| project_versions | /project/{projectIdOrKey}/version | GET | (top-level array) | Project versions (paged in server) |
| users_search | /user/search | GET | (top-level array) | Find users (Cloud: user-search endpoints vary; use /user/search or accountId based endpoints) |
| my_permissions | /mypermissions | GET | (object) | Permissions the caller has |
| issue_createmeta | /issue/createmeta | GET | (object with projects list) | Metadata for creating issues (projects array inside response) |
| statuses | /status | GET | (top-level array) | All issue statuses visible to user |
| fields | /field | GET | (top-level array) | All fields available in instance |
| server_info | /serverInfo or /rest/api/2/serverInfo | GET | (object) | Server/instance metadata (contains baseUrl) |
How do I authenticate with the Jira API?
Jira Cloud supports basic auth by sending HTTP Basic auth with email:api_token or Bearer tokens for OAuth 2.0; requests to site endpoints use Authorization header (Basic base64(email:api_token) or Authorization: Bearer ). Some integrations use api.atlassian.com with cloudId for OAuth flows. Special headers: X-Atlassian-Token and X-Force-Accept-Language documented.
1. Get your credentials
- Basic (API token): Log in to https://id.atlassian.com/manage/api-tokens → Create API token → copy token. 2) OAuth 2.0 (3LO): In Atlassian developer console create app → request OAuth 2.0 authorization code flow to obtain access token scoped for Jira. 3) For on-prem OAuth/OAuth1 or username/password use instance admin docs. (See Atlassian developer docs for step-by-step flows.)
2. Add them to .dlt/secrets.toml
[sources.jira_source] email = "alice@example.com" api_token = "your_api_token_here" cloud_id = "your_cloud_id_if_using_api_atlassian"
dlt reads this automatically at runtime — never hardcode tokens in your pipeline script. For production environments, see setting up credentials with dlt for environment variable and vault-based options.
How do I set up and run the pipeline?
Set up a virtual environment and install dlt:
uv venv && source .venv/bin/activate uv pip install "dlt[workspace]"
1. Install the dlt AI Workbench:
dlt ai init --agent <your-agent> # <agent>: claude | cursor | codex
This installs project rules, a secrets management skill, appropriate ignore files, and configures the dlt MCP server for your agent. Learn more →
2. Install the rest-api-pipeline toolkit:
dlt ai toolkit rest-api-pipeline install
This loads the skills and context about dlt the agent uses to build the pipeline iteratively, efficiently, and safely. The agent uses MCP tools to inspect credentials — it never needs to read your secrets.toml directly. Learn more →
3. Start LLM-assisted coding:
Use /find-source to load data from the Jira API into DuckDB.
The rest-api-pipeline toolkit takes over from here — it reads relevant API documentation, presents you with options for which endpoints to load, and follows a structured workflow to scaffold, debug, and validate the pipeline step by step.
4. Run the pipeline:
python jira_pipeline.py
If everything is configured correctly, you'll see output like this:
Pipeline jira_pipeline load step completed in 0.26 seconds 1 load package(s) were loaded to destination duckdb and into dataset jira_data The duckdb destination used duckdb:/jira.duckdb location to store data Load package 1749667187.541553 is LOADED and contains no failed jobs
Inspect your pipeline and data:
dlt pipeline jira_pipeline show
This opens the Pipeline Dashboard where you can verify pipeline state, load metrics, schema (tables, columns, types), and query the loaded data directly.
Python pipeline example
This example loads issues and search from the Jira API into DuckDB. It mirrors the endpoint and data selector configuration from the table above:
import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def jira_source(api_token=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "For Jira Cloud (site-specific): https://<your-domain>.atlassian.net/rest/api/3 Alternate Cloud (via api.atlassian.com with cloudId for OAuth 3LO): https://api.atlassian.com/ex/jira/<cloudId>/rest/api/3 For Jira Server/DC (on-prem): https://<host>:<port>/rest/api/2 (or /rest/api/latest which maps to supported version)", "auth": { "type": "http_basic", "api_token": api_token, }, }, "resources": [ {"name": "issues", "endpoint": {"path": "issue/{issueIdOrKey}"}}, {"name": "search", "endpoint": {"path": "search", "data_selector": "issues"}} ], } yield from rest_api_resources(config) def get_data() -> None: pipeline = dlt.pipeline( pipeline_name="jira_pipeline", destination="duckdb", dataset_name="jira_data", ) load_info = pipeline.run(jira_source()) print(load_info)
To add more endpoints, append entries from the resource table to the "resources" list using the same name, path, and data_selector pattern.
How do I query the loaded data?
Once the pipeline runs, dlt creates one table per resource. You can query with Python or SQL.
Python (pandas DataFrame):
import dlt data = dlt.pipeline("jira_pipeline").dataset() sessions_df = data.search.df() print(sessions_df.head())
SQL (DuckDB example):
SELECT * FROM jira_data.search LIMIT 10;
In a marimo or Jupyter notebook:
import dlt data = dlt.pipeline("jira_pipeline").dataset() data.search.df().head()
See how to explore your data in marimo Notebooks and how to query your data in Python with dataset.
What destinations can I load Jira data to?
dlt supports loading into any of these destinations — only the destination parameter changes:
| Destination | Example value |
|---|---|
| DuckDB (local, default) | "duckdb" |
| PostgreSQL | "postgres" |
| BigQuery | "bigquery" |
| Snowflake | "snowflake" |
| Redshift | "redshift" |
| Databricks | "databricks" |
| Filesystem (S3, GCS, Azure) | "filesystem" |
Change the destination in dlt.pipeline(destination="snowflake") and add credentials in .dlt/secrets.toml. See the full destinations list.
Troubleshooting
Authentication failures
401 Unauthorized: occurs when credentials are invalid or missing. For Basic auth ensure Authorization: Basic base64(email:api_token) for Cloud; for OAuth ensure token not expired and correct scopes.
Rate limiting and 429
Jira Cloud enforces rate limits; calls may return 429 Too Many Requests. Respect Retry-After header, back off and retry with exponential backoff.
Pagination quirks
Search and many list endpoints are paginated using startAt, maxResults and return total and issues (for /search). Some older Server endpoints may use different paging or return top-level arrays; check each endpoint's doc.
Ensure that the API key is valid to avoid 401 Unauthorized errors. Also, verify endpoint paths and parameters to avoid 404 Not Found errors.
Next steps
Continue your data engineering journey with the other toolkits of the dltHub AI Workbench:
data-exploration— Build custom notebooks, charts, and dashboards for deeper analysis with marimo notebooks.dlthub-runtime— Deploy, schedule, and monitor your pipeline in production.
dlt ai toolkit data-exploration install dlt ai toolkit dlthub-runtime install
Was this page helpful?
Community Hub
Need more dlt context for Jira?
Request dlt skills, commands, AGENT.md files, and AI-native context.