Accessing JIRA Ticket Information

rest-api

(Sean Phelan) #1

We recently implemented the JIRA Server extension to create JIRA tickets from PagerDuty incidents.

Do you know if it is possible to access the ticket information from the REST API (see screenshot)? We currently use the api to do some reporting and it would be great if we could get the ticket associated with the incident. I looked at the get incident and it doesnt appear to be available using this call.


(Thomas Roach) #2

The REST API can’t grab any information not stored within PagerDuty. If it’s a field within a PagerDuty incident, feel free to reach out to us at support@pagerduty.com so we can take a closer look at this for you!


(Paul) #3

If you are just looking to find the JIRA project name, you can do so using the List log entries for an incident endpoint. Underneath "type": "trigger_log_entry", you will find "channel": { "issue": ...}, which contains the URL and the name of the JIRA project.

Here is a sample response:

{
      "id": "xxxxxxxxxxxxxxxxxxxxxxEN0M",
      "type": "trigger_log_entry",
      "summary": "Triggered through the website",
      "self": "https://api.pagerduty.com/log_entries/xxxxxxxxxxxxxxxxxxxxxxEN0M",
      "html_url": "https://xxxxxxxxxxxxxxxxxxxxxx.pagerduty.com/incidents/PF6UKT7/log_entries/xxxxxxxxxxxxxxxxxxxxxxEN0M",
      "created_at": "2018-05-31T18:20:33Z",
      "agent": null,
      "channel": {
        "type": "jira",
        "summary": "test",
        "user": {
          "name": "PagerDuty Support"
        },
        "issue": {
          "url": "http://subdomain.atlassian.com/browse/PROJ-7",
          "key": "PROJ-7"
        }
      }

Using that project name, you may be able to get this information from Atlassian’s REST API; for help with this I would recommend reaching out to their support team.


(Sean Phelan) #4

That works for incidents created from Jira. However, I cant find a similar log entry for a Jira Ticket created from an existing Incident. I find a custom_log_entry but no issue information.


(Jay Chiarella) #6

Hi Sean,

Unfortunately I was not able to find the Jira issue information if the Jira issue was created from a PagerDuty incident, as you mentioned. However, I’d be happy to create a feature request on your behalf for this feature.

Per our process, when we receive product feedback from a customer, and once we close out the request in our support ticketing system, it will automatically create a new request for our Product team through a separate internal system.

The Jira information seems to only be available if it’s included in the trigger_log_entry, as Paul mentioned above. This means that the Jira information is currently only available for incidents triggered from Jira.

I hope this helps!

Jay