# Jira

## Step 1: Generate Credentials

1. **Generate API Token**

   * Go to Atlassian API Token Management
     * Click ***Create Token***
     * Label it (e.g., “Alert Integration”) and copy the token

   ![Create API Token](/files/KAxWymvDnyZbI5uS45da)

   * Note down the ***admin email address*** and ***Jira base URL*** (e.g., <https://your-domain.atlassian.net>)
2. **Assign Necessary Permission Scopes**

   * Go to ***Select App***
     * Select ***Jira*** app

   ![Select JIRA App](/files/5uyjnCR8LuohdwTgrgqm)

   * Go to ***Select Scopes***
     * Select ***write:jira-work***

   ![Assign Permission Scopes](/files/vsQu0M1nFvr1dUBmQ4KU)

   * Review the settings

***

## Step 2: Define JIRA Issue Ticket Fields

1. **Each alert will be converted into a Jira issue with the following fields**

   | Field        | Description                                                                      |
   | ------------ | -------------------------------------------------------------------------------- |
   | project      | Key or ID of the Jira project (e.g., "OPS", "ALERTS" or "10034", "2000")         |
   | issuetype    | Key or ID of type of issue (e.g., "Bug", "Task", "Incident" or "10040", "10000") |
   | reporter     | Atlassian account ID of the reporter (not email)                                 |
   | labels       | Optional: tags like "automated", "alert", "monitoring"                           |
   | customfields | Optional: map alert metadata to custom Jira fields                               |

   * Please use the following to gather more info about the custom fields, if necessary:
     * [Get custom field IDs for Jira](https://confluence.atlassian.com/jirakb/get-custom-field-ids-for-jira-and-jira-service-management-744522503.html)
     * Please note down the ***Custom Field Name*** and the ***text value*** that should be assigned to the custom field.

***

## Deliverables

Please email the following to <socv2@cybrhawk.com>:

1. **API Credentials**
   * Please make sure the following credentials are noted in the email.
     * JIRA\_EMAIL : admin email address
     * JIRA\_API\_TOKEN : generated API token
     * JIRA\_BASE\_URL : Jira base URL noted above
2. **Jira issue ticket fields**
   * Please note the fields needs to be set for the Jira issue ticket
     * project
     * issuetype
     * reporter
     * labels
     * customfields (names & values)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cybrhawksoc.gitbook.io/cybrhawk-docs/platform-management/alerting/jira.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
