<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get problem Id of a Custom Alert event created through API? in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-get-problem-ID-of-a-Custom-Alert-event-created-through/m-p/244545#M3092</link>
    <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/6931"&gt;@Yosi_Neuman&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I tried it out, but I only get the event detail.&lt;/P&gt;&lt;P&gt;What I'm trying to find out is the problem Id.&lt;/P&gt;&lt;P&gt;I need this to close the corresponding Problem that is opened, based on the event.&lt;/P&gt;&lt;P&gt;Best strategy I have found out is searching problems by the title of the event, through the "text" scope in problemSelector. Besides the obvious problem of what to search exactly, the text search only supports 30 characters...&lt;/P&gt;&lt;P&gt;There should be a way to search problems that contain a certain event... The information of the correlationId is in the event, which is in the problem data, but it seems that it is not searchable?&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2024 22:36:04 GMT</pubDate>
    <dc:creator>AntonioSousa</dc:creator>
    <dc:date>2024-05-01T22:36:04Z</dc:date>
    <item>
      <title>How to get problem ID of a Custom Alert event created through API?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-get-problem-ID-of-a-Custom-Alert-event-created-through/m-p/242685#M3063</link>
      <description>&lt;P&gt;If one wants to create a Problem in Dynatrace, we can create an event of type "CUSTOM_ALERT", which will make it's way into a Problem.&lt;/P&gt;
&lt;P&gt;When creating this event, one gets back correlationId's, but not the ID of the corresponding problem.&lt;/P&gt;
&lt;P&gt;What are the best practices for getting the problem ID after a "CUSTOM_ALERT" event creation?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 13:48:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/How-to-get-problem-ID-of-a-Custom-Alert-event-created-through/m-p/242685#M3063</guid>
      <dc:creator>AntonioSousa</dc:creator>
      <dc:date>2024-08-08T13:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get problem Id of a Custom Alert event created through API?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-get-problem-ID-of-a-Custom-Alert-event-created-through/m-p/244211#M3087</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/17213"&gt;@AntonioSousa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For me running&amp;nbsp;&lt;STRONG&gt;/api/v2/events&lt;/STRONG&gt; with &lt;SPAN&gt;&lt;STRONG&gt;eventSelector&lt;/STRONG&gt; equals to the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;correlationId&lt;/STRONG&gt;&amp;nbsp;is working OK.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Yosi_Neuman_0-1714380565666.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19487i8F61DF5D92BBE575/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Yosi_Neuman_0-1714380565666.png" alt="Yosi_Neuman_0-1714380565666.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Yos&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 08:51:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/How-to-get-problem-ID-of-a-Custom-Alert-event-created-through/m-p/244211#M3087</guid>
      <dc:creator>Yosi_Neuman</dc:creator>
      <dc:date>2024-04-29T08:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get problem Id of a Custom Alert event created through API?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-get-problem-ID-of-a-Custom-Alert-event-created-through/m-p/244545#M3092</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/6931"&gt;@Yosi_Neuman&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I tried it out, but I only get the event detail.&lt;/P&gt;&lt;P&gt;What I'm trying to find out is the problem Id.&lt;/P&gt;&lt;P&gt;I need this to close the corresponding Problem that is opened, based on the event.&lt;/P&gt;&lt;P&gt;Best strategy I have found out is searching problems by the title of the event, through the "text" scope in problemSelector. Besides the obvious problem of what to search exactly, the text search only supports 30 characters...&lt;/P&gt;&lt;P&gt;There should be a way to search problems that contain a certain event... The information of the correlationId is in the event, which is in the problem data, but it seems that it is not searchable?&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 22:36:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/How-to-get-problem-ID-of-a-Custom-Alert-event-created-through/m-p/244545#M3092</guid>
      <dc:creator>AntonioSousa</dc:creator>
      <dc:date>2024-05-01T22:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get problem Id of a Custom Alert event created through API?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-get-problem-ID-of-a-Custom-Alert-event-created-through/m-p/244560#M3093</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/17213"&gt;@AntonioSousa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stand corrected !&lt;/P&gt;&lt;P&gt;Yes, you are right , only the search via text can help here - very odd ! &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yos&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 05:40:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/How-to-get-problem-ID-of-a-Custom-Alert-event-created-through/m-p/244560#M3093</guid>
      <dc:creator>Yosi_Neuman</dc:creator>
      <dc:date>2024-05-02T05:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get problem ID of a Custom Alert event created through API?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-get-problem-ID-of-a-Custom-Alert-event-created-through/m-p/272410#M3666</link>
      <description>&lt;P&gt;ugh...i was finally getting around to similar. Trying to build a bi-directional integration with LogicMonitor and Dynatrace.&amp;nbsp; I guess another instance where Dynatrace falls short again.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I agree Antonio.....any Problem created from an Event should have a list of related CorrelationIDs as an attribute. Then an API call to Problems API with the CorrelationID should allow the associated problem to be closed.&amp;nbsp; With options like, explicit match so that one doesn't accidently close a problem where multiple correlationIDs are related but not all solved.&lt;/P&gt;&lt;P&gt;Dynatrace, if you see this, think about it.&amp;nbsp; and ,No, I'm not creating a enhancement proposal.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 14:49:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/How-to-get-problem-ID-of-a-Custom-Alert-event-created-through/m-p/272410#M3666</guid>
      <dc:creator>ct_27</dc:creator>
      <dc:date>2025-03-13T14:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get problem Id of a Custom Alert event created through API?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-get-problem-ID-of-a-Custom-Alert-event-created-through/m-p/272793#M3667</link>
      <description>&lt;P&gt;You can use directly the correlationId to get the eventId, the eventId is also the problemId, if multiple events get merged together you may use any of the evenIds to get into the problem.&lt;/P&gt;&lt;P&gt;Sample python function:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def get_event_id(event_response, root_url, headers):
    url = f"{root_url}/api/v2/events"
    correlation_id = event_response['eventIngestResults'][0]['correlationId']
    params = {
        'eventSelector': f"correlationId({correlation_id})"
    }
    
    response = requests.post(url, headers=headers, json=params)
    res_json = response.json()
    
    if len(res_json['totalCount']) &amp;lt; 1:
        print(f"No Events found for {event_response}")
        print(res_json)
        exit()
    
    return res_json['events'][0]['eventId']&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 18 Mar 2025 11:33:36 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/How-to-get-problem-ID-of-a-Custom-Alert-event-created-through/m-p/272793#M3667</guid>
      <dc:creator>mark_bley</dc:creator>
      <dc:date>2025-03-18T11:33:36Z</dc:date>
    </item>
  </channel>
</rss>

