Skip to content

Jira

Atlassian Jira issues, sprints and projects plus Confluence pages as SQL, with JQL/CQL pushdown

Connector software
Free and open source
Service credentials
Required
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/jira/index.md to help me query Jira with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Find open engineering bugs by priority

This example uses project ENG. Replace it with your Jira project key.

Uses your connected account. Set up the connector and credentials to run it with your data.

SELECT key, title, priority, assignee_display_name
FROM jira.main.issues()
WHERE project_key = 'ENG' AND issue_type = 'Bug' AND state = 'open'
ORDER BY priority, key

Quick start

Choose where to run Jira, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach the release directly

Downloads the latest release for your platform and caches it locally.

ATTACH 'jira' AS jira (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/vgi-jira'
);

3. Add service credentials

After attaching, create the secret for the service you want to query in the same SQL session. Replace the placeholders with your service settings.

atlassian credentials

Atlassian site URL plus an API token (Cloud), a personal access token (Data Center) or an OAuth token

Get these credentials →
secret.sql
CREATE SECRET atlassian (
    TYPE atlassian,
    site_url              '<site_url>',
    email                 '<email>',
    api_token             '<API_TOKEN>',  -- secret
    personal_access_token '<PERSONAL_ACCESS_TOKEN>',  -- secret
    oauth_access_token    '<OAUTH_ACCESS_TOKEN>',  -- secret
    cloud_id              '<cloud_id>',
    api_gateway_url       '<api_gateway_url>',
    deployment            '<deployment>'
);
Credential fields and requirements →

4. Run a query

query.sql
SELECT key, title, priority, assignee_display_name
FROM jira.main.issues()
WHERE project_key = 'ENG' AND issue_type = 'Bug' AND state = 'open'
ORDER BY priority, key
More example queries →
Technical details
Verified connector release
v0.2.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach the release directly

Uses the verified release each time you attach the connector.

ATTACH 'jira' AS jira (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/[email protected]'
);

Overview

Atlassian Jira (Cloud and Data Center) and Confluence Cloud as SQL: issues, changelogs, sprints, projects, pages and spaces, read-only, with JQL and CQL pushdown.

ATTACH options

custom_fields
Hoist Jira custom fields into typed issues() columns: 'column=Field name or customfield_N[:TYPE], …' (TYPE: VARCHAR, DOUBLE, BIGINT, BOOLEAN, DATE, TIMESTAMPTZ, VARCHAR[], JSON; default VARCHAR).VARCHAR

Catalog

Everything jira exposes once attached — read straight from the worker's released build.

jira 2 schemas
confluence 1 table · 4 functions

Confluence Cloud spaces and pages with SQL-to-CQL pushdown.

Schema examples (6)
Examples (6)

Runbooks in a space (space and label become CQL)

SELECT title, last_modified_at
FROM jira.confluence.pages()
WHERE space_key = 'OPS' AND list_contains(labels, 'runbook')
ORDER BY title;

Full-text search, reading plain-text bodies

SELECT title, left(body_text, 200) AS preview
FROM jira.confluence.pages(cql := 'text ~ "deploy"')
WHERE type = 'page'
ORDER BY title;

Edit history of a page

SELECT number, author_id, created_at, message
FROM jira.confluence.page_versions(page_id := '1001')
ORDER BY number;

Most used labels across pages

SELECT name, count(*) AS pages
FROM jira.confluence.page_labels()
GROUP BY name
ORDER BY pages DESC, name;
2 more examples

Unresolved inline comments on a page

SELECT author_id, inline_selection, body_text
FROM jira.confluence.page_comments(page_id := '1001')
WHERE kind = 'inline' AND resolution_status = 'open'
ORDER BY created_at;

Global spaces

SELECT key, name
FROM jira.confluence.spaces
WHERE type = 'global'
ORDER BY key;
Tables
spaces 1 example9 cols

Confluence spaces: key, name, type, status and home page of every space you can see.

Columns
idnot null VARCHAR
Space id.
key VARCHAR
Space key (ENG). Pushed down.
name VARCHAR
Space name.
type VARCHAR
global, personal, collaboration or knowledge_base. Pushed down.
status VARCHAR
current or archived. Pushed down.
author_id VARCHAR
accountId of the space creator.
created_at TIMESTAMP WITH TIME ZONE
When the space was created.
homepage_id VARCHAR
Id of the space home page.
html_url VARCHAR
Link to the space in the Confluence UI.
ConstraintsPRIMARY KEY (id)
Example

Global spaces

SELECT key, name
FROM jira.confluence.spaces
WHERE type = 'global'
ORDER BY key;
Link
Table functions
page_comments (page_id := VARCHAR) 1 example

Footer and inline comments on Confluence pages.

Named arguments
page_id := VARCHAR
Page id (named). A WHERE page_id = / IN filter works too; otherwise every page is read. · default null
Returns columns
page_id VARCHAR
Page id (pushed down: = / IN).
id VARCHAR
Comment id.
kind VARCHAR
footer or inline.
status VARCHAR
Comment status (current …).
author_id VARCHAR
accountId of the author.
created_at TIMESTAMP WITH TIME ZONE
When the comment (its current version) was created.
version BIGINT
Comment version number.
body_storage VARCHAR
Body in storage format.
body_text VARCHAR
Body as plain text.
resolution_status VARCHAR
Inline comments: open, reopened, resolved or dangling.
inline_selection VARCHAR
Inline comments: the highlighted page text.
Example

Unresolved inline comments on a page

SELECT author_id, inline_selection, body_text
FROM jira.confluence.page_comments(page_id := '1001')
WHERE kind = 'inline' AND resolution_status = 'open'
ORDER BY created_at;
Link
page_labels (page_id := VARCHAR) 1 example

Labels on Confluence pages.

Named arguments
page_id := VARCHAR
Page id (named). A WHERE page_id = / IN filter works too; otherwise every page is read. · default null
Returns columns
page_id VARCHAR
Page id (pushed down: = / IN).
id VARCHAR
Label id.
name VARCHAR
Label name.
prefix VARCHAR
Label prefix: global, my or team.
Example

Most used labels across pages

SELECT name, count(*) AS pages
FROM jira.confluence.page_labels()
GROUP BY name
ORDER BY pages DESC, name;
Link
page_versions (page_id := VARCHAR) 1 example

Version history of Confluence pages.

Named arguments
page_id := VARCHAR
Page id (named). A WHERE page_id = / IN filter works too; otherwise every page is read. · default null
Returns columns
page_id VARCHAR
Page id (pushed down: = / IN).
number BIGINT
Version number.
message VARCHAR
Version message.
minor_edit BOOLEAN
Whether this was a minor edit.
author_id VARCHAR
accountId of the editor.
created_at TIMESTAMP WITH TIME ZONE
When the version was created.
Example

Edit history of a page

SELECT number, author_id, created_at, message
FROM jira.confluence.page_versions(page_id := '1001')
ORDER BY number;
Link
pages (cql := VARCHAR) 2 examples

Confluence pages and blog posts from a CQL search, with storage-format and plain-text bodies.

Named arguments
cql := VARCHAR
Optional CQL (named), ANDed with the clauses generated from WHERE; its ORDER BY is kept. · default null
Returns columns
id VARCHAR
Content id. Pushed down.
type VARCHAR
page or blogpost. Pushed down.
status VARCHAR
current, draft, archived …
title VARCHAR
Title. = pushes down (title = "…").
space_key VARCHAR
Space key. Pushed down.
space_name VARCHAR
Space name.
parent_id VARCHAR
Direct parent page id (last ancestor). Pushed down (parent =).
author_id VARCHAR
Creator accountId. Pushed down (creator =).
author_display_name VARCHAR
Creator display name.
created_at TIMESTAMP WITH TIME ZONE
When the content was created. Ranges push down.
version BIGINT
Current version number.
last_modified_at TIMESTAMP WITH TIME ZONE
When the content last changed. Ranges push down (lastmodified).
last_modified_by VARCHAR
accountId of the last editor.
labels VARCHAR[]
Labels. list_contains(labels, 'x') pushes down (label = "x").
excerpt VARCHAR
Search excerpt.
body_storage VARCHAR
Body in storage format (XHTML with ac:/ri: macros). Fetched only when selected.
body_text VARCHAR
Body as plain text (extracted from storage format). Fetched only when selected.
html_url VARCHAR
Link to the page in the Confluence UI.
Examples (2)

Runbooks in a space (space and label become CQL)

SELECT title, last_modified_at
FROM jira.confluence.pages()
WHERE space_key = 'OPS' AND list_contains(labels, 'runbook')
ORDER BY title;

Full-text search, reading plain-text bodies

SELECT title, left(body_text, 200) AS preview
FROM jira.confluence.pages(cql := 'text ~ "deploy"')
WHERE type = 'page'
ORDER BY title;
Link
main 7 tables · 9 functions

Jira issues with SQL-to-JQL pushdown, their history and work, projects, boards and sprints.

Schema examples (12)
Examples (12)

Open bugs in a project by priority (one JQL request: project, issuetype, statusCategory)

SELECT key, title, priority, assignee_display_name
FROM jira.main.issues()
WHERE project_key = 'ENG' AND issue_type = 'Bug' AND state = 'open'
ORDER BY priority, key;

Issues per status category for one label (list_contains becomes labels = "backend")

SELECT status_category, count(*) AS issues
FROM jira.main.issues()
WHERE list_contains(labels, 'backend')
GROUP BY status_category
ORDER BY status_category;

Combine raw JQL with SQL filters: recently resolved issues of the current sprint

SELECT key, closed_at
FROM jira.main.issues(jql := 'sprint in openSprints()')
WHERE closed_at >= TIMESTAMPTZ '2026-11-01'
ORDER BY closed_at;

Status transitions of one issue in order (cycle-time building block)

SELECT changed_at, from_string, to_string, author_display_name
FROM jira.main.issue_changelog(issue_key := 'ENG-1')
WHERE field = 'status'
ORDER BY changed_at;
8 more examples

Hours each issue of a project spent In Progress, from consecutive status changes

SELECT issue_key,
  sum(epoch(next_at - changed_at)) / 3600 AS hours_in_progress
FROM (SELECT issue_key, changed_at, to_string, lead(changed_at) OVER (PARTITION BY issue_key ORDER BY changed_at) AS next_at FROM jira.main.issue_changelog(jql := 'project = ENG') WHERE field = 'status')
WHERE to_string = 'In Progress' AND next_at IS NOT NULL
GROUP BY issue_key
ORDER BY issue_key;

Most talkative commenters in a project

SELECT author_display_name, count(*) AS comments
FROM jira.main.issue_comments(jql := 'project = ENG')
GROUP BY author_display_name
ORDER BY comments DESC;

Read one issue's discussion as text

SELECT created_at, author_display_name, body
FROM jira.main.issue_comments(issue_key := 'ENG-1')
ORDER BY created_at;

Hours logged per person on one issue

SELECT author_display_name, sum(time_spent_seconds) / 3600.0 AS hours
FROM jira.main.issue_worklogs(issue_key := 'ENG-2')
GROUP BY author_display_name
ORDER BY hours DESC;

Open issues that are blocked, and by what

SELECT issue_key, linked_issue_key, linked_issue_status
FROM jira.main.issue_links(jql := 'statusCategory != Done')
WHERE relationship = 'is blocked by'
ORDER BY issue_key;

Components of a project with their leads

SELECT name, lead_display_name
FROM jira.main.components(project_key := 'ENG')
ORDER BY name;

Unreleased versions by release date

SELECT project_key, name, release_date
FROM jira.main.versions()
WHERE NOT released
ORDER BY release_date;

Statuses of the Bug workflow in a project

SELECT status, status_category
FROM jira.main.project_statuses(project_key := 'ENG')
WHERE issue_type = 'Bug'
ORDER BY status;
Tables
boards 1 example5 cols

Jira Software boards (scrum, kanban).

Columns
idnot null BIGINT
Board id (what sprints(board_id := …) takes).
name VARCHAR
Board name. = pushes down (name=, re-checked exactly).
type VARCHAR
scrum, kanban or simple. Pushed down.
project_key VARCHAR
Key of the board's project (location). Pushed down (projectKeyOrId).
project_name VARCHAR
Name of the board's project.
ConstraintsPRIMARY KEY (id)
Example

Scrum boards per project

SELECT project_key, name, id
FROM jira.main.boards
WHERE type = 'scrum'
ORDER BY project_key, name;
Link
fields 1 example12 cols

Jira fields, system and custom, with their JQL clause names and types.

Columns
idnot null VARCHAR
Field id.
key VARCHAR
Field key.
name VARCHAR
Field name.
is_custom BOOLEAN
Whether this is a custom field.
schema_type VARCHAR
Value type: string, number, array, option, user, date, datetime …
schema_items VARCHAR
Element type of array fields.
schema_custom VARCHAR
Custom field type key (e.g. com.pyxis.greenhopper.jira:gh-sprint).
custom_id BIGINT
Numeric custom field id (cf[N] in JQL).
clause_names VARCHAR[]
Names usable in JQL.
searchable BOOLEAN
Whether the field can be searched in JQL.
orderable BOOLEAN
Whether JQL can ORDER BY it.
navigable BOOLEAN
Whether it appears in issue navigator columns.
ConstraintsPRIMARY KEY (id)
Example

Custom fields and their types

SELECT name, id, schema_type
FROM jira.main.fields
WHERE is_custom
ORDER BY name;
Link
issue_types 1 example6 cols

Jira issue types (Epic, Story, Bug, Task, Sub-task …) and their hierarchy levels.

Columns
idnot null VARCHAR
Issue type id.
name VARCHAR
Issue type name.
description VARCHAR
Issue type description.
is_subtask BOOLEAN
Whether it is a sub-task type.
hierarchy_level BIGINT
Hierarchy level (Cloud): 1 epic, 0 standard, -1 sub-task.
scope_project_id VARCHAR
Project of a team-managed issue type.
ConstraintsPRIMARY KEY (id)
Example

Sub-task issue types

SELECT name FROM jira.main.issue_types WHERE is_subtask ORDER BY name;
Link
priorities 1 example5 cols

Jira issue priorities (Highest … Lowest) with their colours and icons.

Columns
idnot null VARCHAR
Priority id.
name VARCHAR
Priority name.
description VARCHAR
Priority description.
status_color VARCHAR
Display colour (hex).
icon_url VARCHAR
URL of the priority's icon image.
ConstraintsPRIMARY KEY (id)
Example

All priorities

SELECT id, name FROM jira.main.priorities ORDER BY id;
Link
projects 1 example11 cols

Jira projects visible to the secret's user.

Columns
idnot null VARCHAR
Project id.
key VARCHAR
Project key (ENG). Pushed down on Cloud.
name VARCHAR
Project name.
project_type VARCHAR
software, business or service_desk.
style VARCHAR
classic (company-managed) or next-gen (team-managed); Cloud only.
category VARCHAR
Project category name.
lead VARCHAR
Project lead accountId (Cloud) or username (Data Center).
lead_display_name VARCHAR
Project lead display name.
description VARCHAR
Project description.
is_private BOOLEAN
Whether the project is private (Cloud).
html_url VARCHAR
Link to the project in the Jira UI.
ConstraintsPRIMARY KEY (id)
Example

Software projects and their leads

SELECT key, name, lead_display_name
FROM jira.main.projects
WHERE project_type = 'software'
ORDER BY key;
Link
statuses 1 example7 cols

Jira workflow statuses and their categories.

Columns
idnot null VARCHAR
Status id.
name VARCHAR
Status name.
description VARCHAR
Status description.
status_category VARCHAR
Category name: To Do, In Progress, Done.
status_category_key VARCHAR
Category key: new, indeterminate, done.
scope_type VARCHAR
PROJECT for team-managed project statuses; NULL when global.
scope_project_id VARCHAR
Project of a team-managed status.
ConstraintsPRIMARY KEY (id)
Example

Statuses that count as done

SELECT name
FROM jira.main.statuses
WHERE status_category_key = 'done'
ORDER BY name;
Link
users 1 example8 cols

Jira users (people, apps and customers) visible to the secret's user.

Columns
account_idnot null VARCHAR
accountId (Cloud) or user key (Data Center).
name VARCHAR
Username (Data Center); NULL on Cloud.
display_name VARCHAR
Name shown in the Jira UI (full name for people).
email_address VARCHAR
Email address; NULL unless visible under the user's privacy settings.
active BOOLEAN
Whether the account is active.
account_type VARCHAR
atlassian (person), app or customer (Cloud).
time_zone VARCHAR
IANA time zone from the user profile (e.g. Europe/London).
locale VARCHAR
Language/region from the user profile (e.g. en_GB).
ConstraintsPRIMARY KEY (account_id)
Example

Active human accounts

SELECT display_name, account_id
FROM jira.main.users
WHERE active AND coalesce(account_type, 'atlassian') = 'atlassian'
ORDER BY display_name;
Link
Table functions
components (project_key := VARCHAR) 1 example

Components of Jira projects.

Named arguments
project_key := VARCHAR
Project key (named). A WHERE project_key = / IN filter works too; otherwise every project is read. · default null
Returns columns
project_key VARCHAR
Project key (pushed down: = / IN).
id VARCHAR
Component id.
name VARCHAR
Component name.
description VARCHAR
Component description.
lead VARCHAR
Component lead accountId (Cloud) or username (Data Center).
lead_display_name VARCHAR
Component lead display name.
assignee_type VARCHAR
Default assignee rule: PROJECT_DEFAULT, COMPONENT_LEAD, PROJECT_LEAD, UNASSIGNED.
Example

Components of a project with their leads

SELECT name, lead_display_name
FROM jira.main.components(project_key := 'ENG')
ORDER BY name;
Link
issue_changelog (issue_key := VARCHAR, jql := VARCHAR) 2 examples

Field-level change history of Jira issues: status transitions, reassignments, edits (one row per changed field).

Named arguments
issue_key := VARCHAR
Issue key, or comma-separated keys (named). A WHERE issue_key = / IN filter works too. · default null
jql := VARCHAR
JQL selecting the issues to read (named), ANDed with any issue_key filter. Without either, every issue is read. · default null
Returns columns
issue_key VARCHAR
Key of the issue (pushed down: = / IN reads only those issues).
history_id VARCHAR
Changelog entry id (several fields can change in one entry).
author VARCHAR
Who made the change: accountId (Cloud) or username (Data Center).
author_display_name VARCHAR
Display name of who made the change.
changed_at TIMESTAMP WITH TIME ZONE
When the change was made.
field VARCHAR
Changed field name as shown in the history (status, assignee, Sprint, …).
field_id VARCHAR
Changed field id (Cloud), e.g. status or customfield_10020.
field_type VARCHAR
'jira' for system fields, 'custom' for custom fields.
from_value VARCHAR
Previous raw value (an id for status/user fields).
from_string VARCHAR
Previous value as displayed (e.g. 'To Do').
to_value VARCHAR
New raw value.
to_string VARCHAR
New value as displayed (e.g. 'In Progress').
Examples (2)

Status transitions of one issue in order (cycle-time building block)

SELECT changed_at, from_string, to_string, author_display_name
FROM jira.main.issue_changelog(issue_key := 'ENG-1')
WHERE field = 'status'
ORDER BY changed_at;

Hours each issue of a project spent In Progress, from consecutive status changes

SELECT issue_key,
  sum(epoch(next_at - changed_at)) / 3600 AS hours_in_progress
FROM (SELECT issue_key, changed_at, to_string, lead(changed_at) OVER (PARTITION BY issue_key ORDER BY changed_at) AS next_at FROM jira.main.issue_changelog(jql := 'project = ENG') WHERE field = 'status')
WHERE to_string = 'In Progress' AND next_at IS NOT NULL
GROUP BY issue_key
ORDER BY issue_key;
Link
issue_comments (issue_key := VARCHAR, jql := VARCHAR) 2 examples

Comments on Jira issues, with the body as plain text and as raw ADF JSON.

Named arguments
issue_key := VARCHAR
Issue key, or comma-separated keys (named). A WHERE issue_key = / IN filter works too. · default null
jql := VARCHAR
JQL selecting the issues to read (named), ANDed with any issue_key filter. Without either, every issue is read. · default null
Returns columns
issue_key VARCHAR
Key of the issue (pushed down: = / IN reads only those issues).
id BIGINT
Comment id.
author VARCHAR
Author accountId (Cloud) or username (Data Center).
author_display_name VARCHAR
Author display name.
body VARCHAR
Comment as plain text.
body_adf JSON
Comment as raw ADF JSON (Cloud); NULL on Data Center.
created_at TIMESTAMP WITH TIME ZONE
When the comment was posted.
updated_at TIMESTAMP WITH TIME ZONE
When the comment was last edited.
visibility VARCHAR
Restriction as type:value (e.g. role:Developers); NULL when visible to all.
is_public BOOLEAN
Jira Service Management: whether customers can see the comment.
Examples (2)

Most talkative commenters in a project

SELECT author_display_name, count(*) AS comments
FROM jira.main.issue_comments(jql := 'project = ENG')
GROUP BY author_display_name
ORDER BY comments DESC;

Read one issue's discussion as text

SELECT created_at, author_display_name, body
FROM jira.main.issue_comments(issue_key := 'ENG-1')
ORDER BY created_at;
Link
issue_worklogs (issue_key := VARCHAR, jql := VARCHAR) 1 example

Time logged on Jira issues (worklogs).

Named arguments
issue_key := VARCHAR
Issue key, or comma-separated keys (named). A WHERE issue_key = / IN filter works too. · default null
jql := VARCHAR
JQL selecting the issues to read (named), ANDed with any issue_key filter. Without either, every issue is read. · default null
Returns columns
issue_key VARCHAR
Key of the issue (pushed down: = / IN reads only those issues).
id BIGINT
Worklog id.
author VARCHAR
Author accountId (Cloud) or username (Data Center).
author_display_name VARCHAR
Author display name.
started_at TIMESTAMP WITH TIME ZONE
When the work started.
time_spent_seconds BIGINT
Time spent in seconds.
time_spent VARCHAR
Time spent as entered (e.g. 3h 20m).
comment VARCHAR
Worklog comment as plain text.
created_at TIMESTAMP WITH TIME ZONE
When the worklog was created.
updated_at TIMESTAMP WITH TIME ZONE
When the worklog was last updated.
Example

Hours logged per person on one issue

SELECT author_display_name, sum(time_spent_seconds) / 3600.0 AS hours
FROM jira.main.issue_worklogs(issue_key := 'ENG-2')
GROUP BY author_display_name
ORDER BY hours DESC;
Link
issues (jql := VARCHAR, page_size := BIGINT) 3 examples

Jira issues matching a JQL search, with SQL filters pushed into the JQL and only selected fields fetched.

Named arguments
jql := VARCHAR
Optional JQL (named). ANDed with the clauses generated from WHERE; its ORDER BY is kept. · default null
page_size := BIGINT
Issues per request (named, 1-100; default 100). · default 100
Returns columns
repo VARCHAR
Project key
project_key VARCHAR
Project key
project_name VARCHAR
Project name
number BIGINT
Issue number within the project
key VARCHAR
Issue key
id BIGINT
Jira's numeric issue id
title VARCHAR
Issue summary
summary VARCHAR
Issue summary
state VARCHAR
'closed' when the status category is Done, else…
status VARCHAR
Workflow status name
status_category VARCHAR
Status category: To Do, In Progress or Done
issue_type VARCHAR
Issue type name
is_subtask BOOLEAN
Whether the issue type is a sub-task type
priority VARCHAR
Priority name
resolution VARCHAR
Resolution name
user_login VARCHAR
Reporter's accountId
reporter_display_name VARCHAR
Reporter's display name
creator VARCHAR
Creator's accountId
assignee VARCHAR
Assignee's accountId
assignee_display_name VARCHAR
Assignee's display name
assignees VARCHAR[]
Assignee ids as a list
labels VARCHAR[]
Labels
components VARCHAR[]
Component names
fix_versions VARCHAR[]
Fix version names
affects_versions VARCHAR[]
Affects version names
parent_key VARCHAR
Parent issue key
parent_summary VARCHAR
Parent issue summary
sprint_ids BIGINT[]
Ids of the sprints the issue is or was in
sprint_names VARCHAR[]
Names of the sprints the issue is or was in
due_date DATE
Due date
original_estimate_seconds BIGINT
Original time estimate in seconds
remaining_estimate_seconds BIGINT
Remaining time estimate in seconds
time_spent_seconds BIGINT
Time logged in seconds
votes BIGINT
Vote count
watches BIGINT
Watcher count
body VARCHAR
Description as plain text
description_adf JSON
Description as raw Atlassian Document Format JS…
html_url VARCHAR
Link to the issue in the Jira UI
created_at TIMESTAMP WITH TIME ZONE
When the issue was created
updated_at TIMESTAMP WITH TIME ZONE
When the issue last changed
closed_at TIMESTAMP WITH TIME ZONE
Resolution date
status_category_changed_at TIMESTAMP WITH TIME ZONE
When the status category last changed
custom_fields JSON
Every non-empty custom field as a JSON object k…
Examples (3)

Open bugs in a project by priority (one JQL request: project, issuetype, statusCategory)

SELECT key, title, priority, assignee_display_name
FROM jira.main.issues()
WHERE project_key = 'ENG' AND issue_type = 'Bug' AND state = 'open'
ORDER BY priority, key;

Issues per status category for one label (list_contains becomes labels = "backend")

SELECT status_category, count(*) AS issues
FROM jira.main.issues()
WHERE list_contains(labels, 'backend')
GROUP BY status_category
ORDER BY status_category;

Combine raw JQL with SQL filters: recently resolved issues of the current sprint

SELECT key, closed_at
FROM jira.main.issues(jql := 'sprint in openSprints()')
WHERE closed_at >= TIMESTAMPTZ '2026-11-01'
ORDER BY closed_at;
Link
project_statuses (project_key := VARCHAR) 1 example

Workflow statuses available per issue type in Jira projects.

Named arguments
project_key := VARCHAR
Project key (named). A WHERE project_key = / IN filter works too; otherwise every project is read. · default null
Returns columns
project_key VARCHAR
Project key (pushed down: = / IN).
issue_type VARCHAR
Issue type name.
issue_type_id VARCHAR
Issue type id.
is_subtask BOOLEAN
Whether the issue type is a sub-task type.
status_id VARCHAR
Status id.
status VARCHAR
Status name.
status_category VARCHAR
Status category name (To Do, In Progress, Done).
status_category_key VARCHAR
Status category key (new, indeterminate, done).
Example

Statuses of the Bug workflow in a project

SELECT status, status_category
FROM jira.main.project_statuses(project_key := 'ENG')
WHERE issue_type = 'Bug'
ORDER BY status;
Link
sprints (board_id := BIGINT) 2 examples

Sprints of Jira Software boards.

Named arguments
board_id := BIGINT
Board id (named). A WHERE board_id = / IN filter works too; otherwise every board is read. · default null
Returns columns
board_id BIGINT
Board the sprint was read from (pushed down).
id BIGINT
Sprint id.
name VARCHAR
Sprint name.
state VARCHAR
active, closed or future. Pushed down.
goal VARCHAR
Sprint goal.
start_at TIMESTAMP WITH TIME ZONE
Planned start.
end_at TIMESTAMP WITH TIME ZONE
Planned end.
complete_at TIMESTAMP WITH TIME ZONE
When the sprint was completed.
created_at TIMESTAMP WITH TIME ZONE
When the sprint was created.
origin_board_id BIGINT
Board the sprint was created on.
Examples (2)

The active sprint of each board

SELECT board_id, name, goal, end_at
FROM jira.main.sprints()
WHERE state = 'active'
ORDER BY board_id;

Done vs total issues of the active sprint of board 1

SELECT count(*) FILTER (WHERE i.state = 'closed') AS done, count(*) AS total
FROM jira.main.sprints(board_id := 1) s
JOIN jira.main.issues() i ON list_contains(i.sprint_ids, s.id)
WHERE s.state = 'active';
Link
versions (project_key := VARCHAR) 1 example

Versions (releases) of Jira projects.

Named arguments
project_key := VARCHAR
Project key (named). A WHERE project_key = / IN filter works too; otherwise every project is read. · default null
Returns columns
project_key VARCHAR
Project key (pushed down: = / IN).
id VARCHAR
Version id.
name VARCHAR
Version name.
description VARCHAR
Version description.
released BOOLEAN
Whether the version is released.
archived BOOLEAN
Whether the version is archived.
overdue BOOLEAN
Whether the release date has passed while unreleased.
start_date DATE
Start date.
release_date DATE
Release date.
Example

Unreleased versions by release date

SELECT project_key, name, release_date
FROM jira.main.versions()
WHERE NOT released
ORDER BY release_date;
Link

Credentials

The secret type jira declares, as reported by the worker itself.

atlassian

How to get these credentials

Atlassian site URL plus an API token (Cloud), a personal access token (Data Center) or an OAuth token

secret.sql
CREATE SECRET atlassian (
    TYPE atlassian,
    site_url              '<site_url>',
    email                 '<email>',
    api_token             '<API_TOKEN>',  -- secret
    personal_access_token '<PERSONAL_ACCESS_TOKEN>',  -- secret
    oauth_access_token    '<OAUTH_ACCESS_TOKEN>',  -- secret
    cloud_id              '<cloud_id>',
    api_gateway_url       '<api_gateway_url>',
    deployment            '<deployment>'
);
Key Type Required Description
site_url VARCHAR — Site URL as you browse it: https://acme.atlassian.net (Cloud) or https://jira.example.com/jira (Data Center). http:// only for 127.0.0.1/localhost.
email VARCHAR — Atlassian account email for API-token basic auth (Data Center: a username).
api_token secret VARCHAR — API token from id.atlassian.com (Data Center: the user's password).
personal_access_token secret VARCHAR — Data Center personal access token (sent as Bearer).
oauth_access_token secret VARCHAR — OAuth 2.0 (3LO) access token with read scopes.
cloud_id VARCHAR — With an OAuth token: the site's cloud id, to route through https://api.atlassian.com/ex/jira/<cloud_id>.
api_gateway_url VARCHAR — Override of the OAuth API gateway (default https://api.atlassian.com).
deployment VARCHAR — auto (default: detect from /rest/api/2/serverInfo), cloud or datacenter.

The worker doesn't mark which keys are required.

Create the secret in the same session, after attaching jira — the worker registers its secret types at ATTACH. Keys marked secret are masked in duckdb_secrets(); angle-bracket values are placeholders. Read credentials from your environment or secret store in your application and pass them through your SQL client’s parameter bindings. Keep real values out of saved SQL and history. Native DuckDB and Haybarn do not provide a SQL getenv() function.

Try these queries

issues_columns — The issues() result columns (binds only; create an atlassian secret and drop LIMIT 0 for rows)

SELECT key, title, state, status, assignee, created_at
FROM jira.main.issues()
LIMIT 0;

Uses issues

pages_columns — The pages() result columns (binds only; create an atlassian secret and drop LIMIT 0 for rows)

SELECT id, space_key, title, last_modified_at
FROM jira.confluence.pages()
LIMIT 0;

Uses pages

Edit history of a page

SELECT number, author_id, created_at, message
FROM jira.confluence.page_versions(page_id := '1001')
ORDER BY number

Uses page_versions

Most used labels across pages

SELECT name, count(*) AS pages
FROM jira.confluence.page_labels()
GROUP BY name
ORDER BY pages DESC, name

Uses page_labels

Unresolved inline comments on a page

SELECT author_id, inline_selection, body_text
FROM jira.confluence.page_comments(page_id := '1001')
WHERE kind = 'inline' AND resolution_status = 'open'
ORDER BY created_at

Uses page_comments

Global spaces

SELECT key, name
FROM jira.confluence.spaces
WHERE type = 'global'
ORDER BY key

Uses spaces

22 more examples in the Catalog, each listed under the table or function it uses.

Questions it can answer

Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.

  • List the keys and titles of open bugs in the ENG Jira project.
  • How many Jira issues are there in each status category?
  • Which issues are assigned to Ada Lovelace, and what is their status?
  • Show every status transition of issue ENG-1 in order, with who made it and when.
  • What is the name of the active sprint on the ENG scrum board?
  • Which issues are in the active sprint, and how many are done?

Jira is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.