> For the complete documentation index, see [llms.txt](https://docs.docontrol.io/docontrol-user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docontrol.io/docontrol-user-guide/workflows/define-workflow-settings/action-settings/utilities/jira-actions.md).

# Jira actions

Using a workflow, you can automatically create an issue in Jira, or a sub-task in Jira when this option is enabled.

Adding a workflow step to create a Jira issue helps to expedite incident handling and resolution: any detected data exposure is automatically converted into actionable Jira tickets. This automation leverages your established Jira processes to manage and remediate security risks efficiently, while providing a clear audit trail at the same time.&#x20;

To configure the **Create issue** step in workflows, follow these steps:

1. [Create a Jira issue](#create-a-jira-issue)
2. [Set up Jira headers](#set-up-jira-headers)
3. [Create a secret](#create-a-secret)
4. [Add API key to Jira issue](#add-api-key-to-jira-issue)

<figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FF8PtDnBvsL3nj8jClTYs%2Fcreate%20Jira%20issue.png?alt=media&amp;token=6d94417e-7646-4283-98af-b25f5bdb8935" alt=""><figcaption></figcaption></figure>

## Create a Jira issue

Leverage your current Jira processes to manage and resolve any data exposure in a timely and efficient manner, by adding the **Create issue** step to any DoControl workflow.

1. Open a new or existing workflow.
2. In the actions menu, select **Utilities > Jira > Create issue** and drag to the canvas.&#x20;
3. Enter the request URL.
4. Enter the query parameter keys and values.

## **Set up Jira headers**

To create the API key, you need to convert it to base64 format, which is a required part of the HTTP Basic Authentication scheme used by Jira's API. This encoding ensures your credentials are safely transmitted as a standard HTTP header without being garbled by special characters.

1. Open your Jira account and go to [Security > API tokens](https://id.atlassian.com/manage-profile/security/api-tokens).
2. Click **Create API token > Create.**&#x20;
3. Copy the API token.
4. To encode the token in base64, go to [Jira documentation](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/#supply-basic-auth-headers) and follow their instructions:
   * Linux or Unix or MacOS:\
     `echo -n "user@example.com:api_token_string" | base64`
   * Windows 7 and later, using Microsoft Powershell:

     ```sh
     $Text = ‘user@example.com:api_token_string’
     $Bytes = [System.Text.Encoding]::UTF8.GetBytes($Text)
     $EncodedText = [Convert]::ToBase64String($Bytes)
     $EncodedText
     ```

## Create a secret

DoControl protects secrets for any API or integrated app, such as Jira, in our AWS Key Management Service. Storing secrets in AWS KMS is a critical best practice, helping to improve your overall security posture.

<figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FVlPMgvHEsogb3TOBHE5H%2FJira%20secret.png?alt=media&amp;token=7890b709-b47f-465c-8656-172488d25103" alt=""><figcaption></figcaption></figure>

1. In DoControl, go to [Settings > Workflows > Secrets > Add secret](https://app.docontrol.io/settings/workflows?tab=Secrets).
2. Assign a **secret name**.
3. For the **value**, enter the API token that was encoded to base64 format.
4. Click **Save**.<br>

## Add API key to Jira issue

In the **Create issue** step, add the secret to the Jira workflow. Adding the API key allows DoControl to securely and reliably authenticate to Jira for data integration.

1. Go to the **Authorization field > Add API key here**.<br>

   <div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FbQJDTkrWNHRpjuHiJ5gE%2FJira%20utility%20add%20API%20key.png?alt=media&amp;token=653a29e5-80ce-4eb9-acbc-8d6199e78869" alt=""><figcaption></figcaption></figure></div>
2. Select the secret that you just created from the dropdown. <br>

   <div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FcaC4yMgrBM8n4SQDISzW%2Fchoose%20secret.png?alt=media&amp;token=86d793bf-3db4-4184-bca8-e65b5135a800" alt=""><figcaption></figcaption></figure></div>
3. Make sure a space appears after Basic, and delete the brackets. The authorization field is displayed with the secret you added: <br>

   <div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FadElRy0OqyFeolYomgqu%2FJira%20header%20new.png?alt=media&amp;token=0d058207-102d-49ba-bb4e-5b5f8542d58b" alt=""><figcaption></figcaption></figure></div>
4. In your workflow, go to **Create issue step >** **Request URL** and add the Jira domain of your organization.<br>

   <div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2F06W6b5oYyT8Zrvxvzj6M%2FJira%20request%20URL.png?alt=media&amp;token=adce04e0-2e00-4579-b3a9-bfe8aa772fb0" alt=""><figcaption></figcaption></figure></div>
5. Type the body text.
6. Define the request timeout in seconds.

{% hint style="info" %}
For more information on Jira APIs, see [Jira documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docontrol.io/docontrol-user-guide/workflows/define-workflow-settings/action-settings/utilities/jira-actions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
