<?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 pass problem values to payload for API integration in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/how-to-pass-problem-values-to-payload-for-API-integration/m-p/261815#M1863</link>
    <description>&lt;P&gt;Try with&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;"ImpactedEntities":&lt;/SPAN&gt; {{ &lt;SPAN class=""&gt;Stage&lt;/SPAN&gt; }}&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2024 13:51:49 GMT</pubDate>
    <dc:creator>PacoPorro</dc:creator>
    <dc:date>2024-11-07T13:51:49Z</dc:date>
    <item>
      <title>how to pass problem values to payload for API integration</title>
      <link>https://community.dynatrace.com/t5/Automations/how-to-pass-problem-values-to-payload-for-API-integration/m-p/261807#M1862</link>
      <description>&lt;P&gt;Hi World ,&lt;BR /&gt;&lt;BR /&gt;I want to create a workflow that will send problem details in JSON payload to another API.&amp;nbsp; I tried this in payload&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;"ImpactedEntities": {Stage}&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;but it is printing stage instead of picking value in variable stage .&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tried with and without double quotes&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 13:59:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/how-to-pass-problem-values-to-payload-for-API-integration/m-p/261807#M1862</guid>
      <dc:creator>siddharth</dc:creator>
      <dc:date>2024-11-12T13:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass problem values to payload for API integration</title>
      <link>https://community.dynatrace.com/t5/Automations/how-to-pass-problem-values-to-payload-for-API-integration/m-p/261815#M1863</link>
      <description>&lt;P&gt;Try with&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;"ImpactedEntities":&lt;/SPAN&gt; {{ &lt;SPAN class=""&gt;Stage&lt;/SPAN&gt; }}&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 13:51:49 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/how-to-pass-problem-values-to-payload-for-API-integration/m-p/261815#M1863</guid>
      <dc:creator>PacoPorro</dc:creator>
      <dc:date>2024-11-07T13:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass problem values to payload for API integration</title>
      <link>https://community.dynatrace.com/t5/Automations/how-to-pass-problem-values-to-payload-for-API-integration/m-p/261824#M1864</link>
      <description>&lt;P&gt;Nope Not working on the other hand it is stating it is the wrong variable&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I think this is the solution&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/platform-modules/automations/workflows/reference#any-object" target="_blank"&gt;https://docs.dynatrace.com/docs/platform-modules/automations/workflows/reference#any-object&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;so for accessing last stage data, I am using event&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;{{ event()['event.category'] }}&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 15:24:41 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/how-to-pass-problem-values-to-payload-for-API-integration/m-p/261824#M1864</guid>
      <dc:creator>siddharth</dc:creator>
      <dc:date>2024-11-07T15:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass problem values to payload for API integration</title>
      <link>https://community.dynatrace.com/t5/Automations/how-to-pass-problem-values-to-payload-for-API-integration/m-p/262050#M1865</link>
      <description>&lt;P&gt;So finally I was able to make a payload and this is how it looks&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
"ImpactedEntities" : [{ 
  "type" : "{{ event('affected_entity_types') }} " , 
  "name" : "{{ event('affected_entity_ids')   }}" ,
  "entity" : "{{ event('affected_entity_ids' ) }}"
  } ],
 "ImpactedEntity"  :{ 
  "type" : "{{ event('affected_entity_types') | first }}" , 
  "name" : "{{ event('affected_entity_ids') | first }}" ,
  "entity" : "{{ event('affected_entity_ids') | first }}"
  },
  "PID" :"{{ event()['event.id'] }}" ,
  "ProblemID" : "{{ event('display_id') }}"  ,
  "ProblemTitle" : "{{ event()['event.name'] | replace('\n', ' ') | replace('**', '') | replace('# ', '') }}"  ,
  "ProblemDetailsText" : "{{ event()['event.description'] | replace('\n', ' ') | replace('**', '') | replace('# ', '') }}"  ,
  "ProblemURL" : "https://{environmentid}.apps.dynatrace.com/ui/apps/dynatrace.davis.problems/problem/{{ event()['event.id'] }}"  ,
  "ProblemSeverity" : "{{ event()['event.category'] }}"  ,
  "State" : "{{ event()['event.status'] }}" ,
  "tags" : {{ event().get('entity_tags','[]') | to_json  }} ,
  "ProblemDetailsJSONv2": {
    "description": "{{ event()['event.description'] | replace('\n', ' ') | replace('**', '') | replace('# ', '') }}",
    "title": "{{ event()['event.name'] | replace('\n', ' ') | replace('**', '') | replace('# ', '') }}",
    "pid": "{{ event()['event.id'] }}",
    "display_id": "{{ event('display_id') }}"
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 11:42:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/how-to-pass-problem-values-to-payload-for-API-integration/m-p/262050#M1865</guid>
      <dc:creator>siddharth</dc:creator>
      <dc:date>2024-11-11T11:42:16Z</dc:date>
    </item>
  </channel>
</rss>

