> For the complete documentation index, see [llms.txt](https://docs.onum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onum.com/listeners/listener-integrations/pull-data-from-http-endpoints/pull-data-from-the-jira-api.md).

# Pull data from the Jira API

## Overview

Get a list of Jira issues using the **HTTP Pull** Listener.

## HTTP Pull Listener configuration

In Falcon Onum, go to the **Listeners** area and click **New Listener > HTTP Pull**. Give a name to your new Listener and enter the following data:

### Parameters

N/A

### Secrets

You must define these credentials in Onum:

* `username` will reference your Jira username.
* `password` will reference your Jira password.

To do it, click **Add element** and enter a **Name** for the secret (in this case, `username`). Then, click the **Value** field and select **New secret** to create a new one:

* Give the secret a **Name**.
* Turn off the **Expiration date** option.
* Click **Add new value** and paste the secret corresponding to the value.
* Click **Save**.

You can now select the secret you just created in the **Value** field list. Repeat the process for the `password`.

{% hint style="info" %}
Learn more about secrets in Onum in [this article](/settings/organization-settings/secrets-management.md).
{% endhint %}

### Setup

After entering the required parameters and secrets, you can choose to manually enter the rest of configuration fields, or simply paste the given YAML:

{% tabs %}
{% tab title="Config as YAML" %}
Toggle **ON** the **Config as YAML** option to enable a free text field where you can paste the following YAML:

```yaml
withTemporalWindow: true
temporalWindow:
  duration: 7m
  offset: 1m
  tz: UTC
  format: RFC3339
withAuthentication: true
authentication:
  type: basic
  basic:
    username: ${secrets.username}
    password: ${secrets.password}
withEnumerationPhase: false
collectionPhase:
  paginationType: cursor
  cursorSelector: ".nextPageToken"
  initialRequest:
    method: GET
    responseType: json
    url: https://aflacinc.atlassian.net/rest/api/2/search/jql
    queryParams:
      - name: jql
        value: "updated>=-7m order by updated asc"
      - name: fields
        value: "updated,parent,project,resolved,resolutionDate,issuetype,summary,description,creator,assignee,reporter,created,duedate,aggregatetimespent,priority,labels,comment,status,resolution,attachment,issuekey"
      - name: maxResults
        value: 5000
    headers:
      - name: Accept
        value: application/json
  nextRequest:
    method: GET
    responseType: json
    url: https://aflacinc.atlassian.net/rest/api/2/search/jql
    queryParams:
      - name: jql
        value: "updated>=-7m order by updated asc"
      - name: fields
        value: "updated,parent,project,resolved,resolutionDate,issuetype,summary,description,creator,assignee,reporter,created,duedate,aggregatetimespent,priority,labels,comment,status,resolution,attachment,issuekey"
      - name: maxResults
        value: 5000
      - name: nextPageToken
        value: ${pagination.cursor}
    headers:
      - name: Accept
        value: application/json    
  output:
    select: ".issues"
    outputMode: element
```

{% endtab %}

{% tab title="Manually configure" %}
**Temporal Window**

Toggle **ON** to add a temporal window for events. This repeatedly shifts the time window over which data is collected.

* **Duration** - `7m`
* **Offset** - `1m`
* **Format** - `RFC3339`

**Authentication**

Toggle **ON** to configure the authentication phase. This is required to get the token to pull data using **OAuth**.

* **Type**<mark style="color:red;">**\***</mark> - `Basic`
  * **Username**<mark style="color:red;">**\***</mark> - Enter your Jira username.
  * **Password**<mark style="color:red;">**\***</mark> - Enter your Jira password.

**Collection Phase**

* **Pagination Type**<mark style="color:red;">**\***</mark> - `Cursor`
* **Cursor Selector**<mark style="color:red;">**\***</mark> - `.nextPageToken`
* **Initial Request**&#x20;
  * **Response Type**<mark style="color:$primary;">**\***</mark> - `JSON`
  * **Method**<mark style="color:red;">**\***</mark> - `GET`
  * **URL**<mark style="color:red;">**\***</mark> - `https://aflacinc.atlassian.net/rest/api/2/search/jql`
  * **Query Params**&#x20;
    * **Name** - `jql`
    * **Value** - `updated>=-7m order by updated asc`
    * **Name** - `fields`
    * **Value** - `updated,parent,project,resolved,resolutionDate,issuetype,summary,description,creator,assignee,reporter,created,duedate,aggregatetimespent,priority,labels,comment,status,resolution,attachment,issuekey`
    * **Name** - `maxResults`
    * **Value** - `5000`
  * **Headers** -
    * **Name** - `Accept`
    * **Value** - `application/json`
* **Next Request**
  * **Response Type**<mark style="color:$primary;">**\***</mark> - `JSON`
  * **Method**<mark style="color:red;">**\***</mark> - `GET`
  * **URL**<mark style="color:red;">**\***</mark> - `https://aflacinc.atlassian.net/rest/api/2/search/jql`
  * **Query Params**&#x20;
    * **Name** - `jql`
    * **Value** - `updated>=-7m order by updated asc`
    * **Name** - `fields`
    * **Value** - `updated,parent,project,resolved,resolutionDate,issuetype,summary,description,creator,assignee,reporter,created,duedate,aggregatetimespent,priority,labels,comment,status,resolution,attachment,issuekey`
    * **Name** - `maxResults`
    * **Value** - `5000`
  * **Headers** -
    * **Name** - `Accept`
    * **Value** - `application/json`
* **Output**
  * **Select**<mark style="color:$primary;">**\***</mark> - `.issues`
  * **Output Mode**<mark style="color:$primary;">**\***</mark> - `element`
    {% endtab %}
    {% endtabs %}

When you're done, click **Create labels** to move on to the next step and define the required [Labels](/listeners/labels.md) if needed.
