<?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: Get problemID from Davis Problem Trigger in workflow in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Get-problemID-from-Davis-Problem-Trigger-in-workflow/m-p/234064#M737</link>
    <description>&lt;P&gt;I was struggling with that as well...&lt;BR /&gt;Adding a Custom JS step to extract the impacted entity IDs from a problem to get entity NAMES so that a Teams notification is more meaningful...&lt;/P&gt;&lt;P&gt;But HOW (and where) can we find such internal code api documentation? I'm really struggling getting examples on what APIs exist....&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2024 15:55:45 GMT</pubDate>
    <dc:creator>r_weber</dc:creator>
    <dc:date>2024-01-11T15:55:45Z</dc:date>
    <item>
      <title>Get problemID from Davis Problem Trigger in workflow</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Get-problemID-from-Davis-Problem-Trigger-in-workflow/m-p/221728#M477</link>
      <description>&lt;P&gt;What if the Trigger is event Trigger, for example Davis problem trigger. How do i get the problem ID that trigger this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="william_cher_0-1693211221988.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/13831i3D51FDDBFB0C8ABF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="william_cher_0-1693211221988.png" alt="william_cher_0-1693211221988.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 08:28:57 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Get-problemID-from-Davis-Problem-Trigger-in-workflow/m-p/221728#M477</guid>
      <dc:creator>william_cher</dc:creator>
      <dc:date>2023-08-28T08:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get problemID from Davis Problem Trigger in workflow</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Get-problemID-from-Davis-Problem-Trigger-in-workflow/m-p/221729#M478</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/62755"&gt;@william_cher&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You can access the event payload and its attributes through &lt;A href="https://www.dynatrace.com/support/help/platform-modules/cloud-automation/workflows/reference#event" target="_self"&gt;{{ event() }} expression&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;PRE&gt;{{ event()["event.id"] }}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 08:35:55 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Get-problemID-from-Davis-Problem-Trigger-in-workflow/m-p/221729#M478</guid>
      <dc:creator>michal_zawislak</dc:creator>
      <dc:date>2023-08-28T08:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Get problemID from Davis Problem Trigger in workflow</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Get-problemID-from-Davis-Problem-Trigger-in-workflow/m-p/221730#M479</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/57046"&gt;@michal_zawislak&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply. How do I access this information in Javascript?&lt;/P&gt;&lt;P&gt;As im running a custom Javascript after the Trigger.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 08:55:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Get-problemID-from-Davis-Problem-Trigger-in-workflow/m-p/221730#M479</guid>
      <dc:creator>william_cher</dc:creator>
      <dc:date>2023-08-28T08:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get problemID from Davis Problem Trigger in workflow</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Get-problemID-from-Davis-Problem-Trigger-in-workflow/m-p/221731#M480</link>
      <description>&lt;P&gt;The "Run Javascript" action is a bit different as it's not allowed to use expressions there due to security concerns. Instead of expressions, you can use&amp;nbsp;&lt;A href="https://developer.dynatrace.com/reference/sdks/automation-utils/#execution-utilities-examples" target="_self"&gt;automation-utils&lt;/A&gt;&amp;nbsp;SDK to get event payload and then navigate to the attribute using JavaScript syntax.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import { execution } from '@dynatrace-sdk/automation-utils';

export default async function ({ execution_id }) {
  const exe = await execution(execution_id);
  const eventContext = exe.event();
  const eventId = eventContext['event.id']
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I hope this will help.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 09:02:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Get-problemID-from-Davis-Problem-Trigger-in-workflow/m-p/221731#M480</guid>
      <dc:creator>michal_zawislak</dc:creator>
      <dc:date>2023-08-28T09:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get problemID from Davis Problem Trigger in workflow</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Get-problemID-from-Davis-Problem-Trigger-in-workflow/m-p/234064#M737</link>
      <description>&lt;P&gt;I was struggling with that as well...&lt;BR /&gt;Adding a Custom JS step to extract the impacted entity IDs from a problem to get entity NAMES so that a Teams notification is more meaningful...&lt;/P&gt;&lt;P&gt;But HOW (and where) can we find such internal code api documentation? I'm really struggling getting examples on what APIs exist....&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 15:55:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Get-problemID-from-Davis-Problem-Trigger-in-workflow/m-p/234064#M737</guid>
      <dc:creator>r_weber</dc:creator>
      <dc:date>2024-01-11T15:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get problemID from Davis Problem Trigger in workflow</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Get-problemID-from-Davis-Problem-Trigger-in-workflow/m-p/234142#M745</link>
      <description>&lt;P&gt;You can find examples and available SDKs/APIs in the documentation:&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/platform-modules/automations/workflows/reference" target="_blank"&gt;https://docs.dynatrace.com/docs/platform-modules/automations/workflows/reference&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 09:20:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Get-problemID-from-Davis-Problem-Trigger-in-workflow/m-p/234142#M745</guid>
      <dc:creator>michal_zawislak</dc:creator>
      <dc:date>2024-01-12T09:20:39Z</dc:date>
    </item>
  </channel>
</rss>

