You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I would like to find the post-mortem associated with an incident via the API, but I cannot find the post-mortem reference in the the Incident itself.
There is an incident in the post-mortem API, but there seems no also seems no way to list post-mortems.
My purpose is to ensure that P1/P2 incidents have a post-mortem and that it follows out format and agreements (for example - a Jira ticket is needed for each Action item). The initial ideas was to list Incidents that are closed/resolved and see whether they have a post-mortem. If so get the post-mortem and review the content for format and ticket links. If not, create post-mortem in our format and notify the incident owner that a post-mortem skeleton had been created.
Hi @Wolfgang Kandek,
This is Darryl. I am here to help. 😀
Understand that you would like to leverage Opsgenie Incident API to list out the Opsgenie Incidents which don't have a Postmortem yet.
We recommend tailoring the `query` inline parameter in the URL when making the API request.
The List Incident API documentation is -> https://docs.opsgenie.com/docs/incident-api#list-incidents
The Search Syntax for Incidents documentation is a great reference for you to adjust your query -> https://support.atlassian.com/opsgenie/docs/search-syntax-for-incidents/
Last, please encode the URL with the reference -> https://www.w3schools.com/tags/ref_urlencode.ASP
Hope this helps.
Support Engineer, Atlassian
Hi @Wolfgang Kandek,
You can use the following query parameters for postmortemStatus:
If you want to only include incidents that have a published postmortem, you can use the following endpoint with 'published' as the value for the 'postmortemStatus' query parameter:
@Wolfgang Kandek You would need to use the Get Postmortem Request API, using the incident ID returned from the List Incidents endpoint.
It looks like right now the only way to get the postmortemid is to create a postmortem via the API (in which case it will return the id) or in the UI, go to Analytics >> postmortem reports (id is in the URL)
I have found that there is a feature request to add this functionality to the API: