JIRA
How to extract projects and tasks
When building applications that integrate with JIRA, you often need to:
- Extract project and task data in a specific format
- Handle nested relationships (projects and tasks)
- Transform JIRA’s specific fields into your schema
- Deal with pagination and authentication
Let’s see how superglue makes this straightforward.
Prerequisites
- A JIRA account with access to the JIRA API
- Early access to the hosted version of superglue via https://superglue.cloud or a self-hosted server
Authentication Setup
- Generate a JIRA API token from Atlassian Account Settings
- Note your JIRA domain (e.g.,
superglue.atlassian.net
) - Keep both the token and domain handy for the examples below
Installation
Authentication
JIRA requires authentication, which we can handle via API tokens.
You can generate an API token from Atlassian Account Settings.
From with this token and your email address, you can generate a base64 encoded JIRA token.
Simple Project and Task Extraction
Let’s start with a basic example that fetches projects and tasks (called issues in JIRA) from a single project:
The generated task jsonata will look similar to this:
Notice that superglue automatically parses field priorities to handle priorities not found in your schema. Particularly, it converts “Highest” to “URGENT” and “Lowest” to “LOW”. Also, it cannot find corresponding fields for target_date and start_date, so it returns null for those fields. This is valid since these fields are not required by our schema.
What’s Happening Here?
-
Schema Definition: We define a schema that includes:
- Project details (id, title, dates)
- Task information (id, status, priority)
- Assignee details
- Timestamps and metadata
-
Configuration: The config object tells superglue:
- Where to get the data (JIRA REST API endpoint)
- What to extract (via the instruction)
- How to format it (via responseSchema)
- How to handle authentication and pagination
-
Joining Projects and Tasks: Since we have formatted the tasks with the project identifier, we can easily join the projects and tasks together, creating a list of projects with their tasks.
Understanding the Response
The transformed data will look like this:
Next Steps
- Check the API Reference for detailed type information
- Learn about authentication options
- Join our Discord for support