<?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: Webhooks | Custom payload using Liquid | Cant access child object in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/webhooks-custom-payload-using-liquid-cant-access-child-object/m-p/5410634#M1890</link>
    <description>&lt;P&gt;This looks like it would work to me, and validates.&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"uplink": "{{&lt;/SPAN&gt;&lt;SPAN&gt;alertData&lt;/SPAN&gt;&lt;SPAN&gt;|&lt;/SPAN&gt;&lt;SPAN&gt;dig:&lt;/SPAN&gt;&lt;SPAN&gt;"uplink"&lt;/SPAN&gt;&lt;SPAN&gt;}}"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 07 Mar 2024 22:20:02 GMT</pubDate>
    <dc:creator>matt_uc</dc:creator>
    <dc:date>2024-03-07T22:20:02Z</dc:date>
    <item>
      <title>Webhooks | Custom payload using Liquid | Cant access child object</title>
      <link>https://community.cisco.com/t5/network-platform-api/webhooks-custom-payload-using-liquid-cant-access-child-object/m-p/5410633#M1889</link>
      <description>&lt;P&gt;Hi All.&lt;BR /&gt;&lt;BR /&gt;I am using the webhook payload template editor tool and for some reason unknown to me, I can not access the child object "uplink"  I am using the same syntax as per the Meraki Docs.&lt;/P&gt;&lt;P&gt;LIQUID:&lt;/P&gt;&lt;PRE&gt;{
    "alert":"{{alertData.uplink}}"
}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;The Error I get:&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;" Failed to load webhook payload template preview. Make sure you're using valid JSON format. ["Body Liquid error: undefined variable uplink"] "&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The uplink value does exist:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;LIQUID:&lt;/P&gt;&lt;PRE class="lia-code-sample language-python"&gt;&lt;CODE&gt;{
 "alert" : {{alertData | jsonify }}
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;P&gt;JSON:&lt;/P&gt;&lt;PRE class="lia-code-sample language-python"&gt;&lt;CODE&gt;{
  "alert": {
    "uplink": "0"
  }
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Example from Meraki docs which I followed to the "T":&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developer.cisco.com/meraki/webhooks/custom-payload-templates-overview/#overview" target="_blank" rel="noopener nofollow noreferrer"&gt;https://developer.cisco.com/meraki/webhooks/custom-payload-templates-overview/#overview&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Child object properties can also be accessed using the {{foo.bar}} syntax.&lt;BR /&gt;&lt;BR /&gt;LIQUID:&lt;/P&gt;&lt;PRE&gt;{
    "port":"{{alertData.portNum}}"
}&lt;/PRE&gt;&lt;P&gt;JSON:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;
  &lt;SPAN class=""&gt;"port"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"3"&lt;/SPAN&gt;
&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Any suggestions would be appreciated, not sure if it is a bug or if I am doing something wrong.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 20:26:05 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/webhooks-custom-payload-using-liquid-cant-access-child-object/m-p/5410633#M1889</guid>
      <dc:creator>SuperM</dc:creator>
      <dc:date>2024-03-06T20:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Webhooks | Custom payload using Liquid | Cant access child object</title>
      <link>https://community.cisco.com/t5/network-platform-api/webhooks-custom-payload-using-liquid-cant-access-child-object/m-p/5410634#M1890</link>
      <description>&lt;P&gt;This looks like it would work to me, and validates.&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"uplink": "{{&lt;/SPAN&gt;&lt;SPAN&gt;alertData&lt;/SPAN&gt;&lt;SPAN&gt;|&lt;/SPAN&gt;&lt;SPAN&gt;dig:&lt;/SPAN&gt;&lt;SPAN&gt;"uplink"&lt;/SPAN&gt;&lt;SPAN&gt;}}"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Mar 2024 22:20:02 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/webhooks-custom-payload-using-liquid-cant-access-child-object/m-p/5410634#M1890</guid>
      <dc:creator>matt_uc</dc:creator>
      <dc:date>2024-03-07T22:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Webhooks | Custom payload using Liquid | Cant access child object</title>
      <link>https://community.cisco.com/t5/network-platform-api/webhooks-custom-payload-using-liquid-cant-access-child-object/m-p/5410635#M1891</link>
      <description>&lt;P&gt;&lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/32699"&gt;@matt_uc&lt;/A&gt;thanks that worked &lt;SPAN class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 03:22:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/webhooks-custom-payload-using-liquid-cant-access-child-object/m-p/5410635#M1891</guid>
      <dc:creator>SuperM</dc:creator>
      <dc:date>2024-03-08T03:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Webhooks | Custom payload using Liquid | Cant access child object</title>
      <link>https://community.cisco.com/t5/network-platform-api/webhooks-custom-payload-using-liquid-cant-access-child-object/m-p/5410636#M1892</link>
      <description>&lt;P&gt;&lt;BR /&gt;as &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/32699"&gt;@matt_uc&lt;/A&gt; correctly suggested:&lt;BR /&gt;&lt;A href="https://developer.cisco.com/meraki/webhooks/custom-payload-templates-overview/#dig" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/webhooks/custom-payload-templates-overview/#dig&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The &lt;STRONG&gt;alertData&lt;/STRONG&gt; property is ... &lt;EM&gt;special&lt;/EM&gt;. Since every alert contains different properties, its sort of a black box to the template language. So, using the "dig" filter runs a function to pull this info out at runtime. That being said, if the nested property is declared, then using the dot.notation works. &lt;BR /&gt;&lt;BR /&gt;We can update the documentation to make this more clear. &lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 11:36:19 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/webhooks-custom-payload-using-liquid-cant-access-child-object/m-p/5410636#M1892</guid>
      <dc:creator>DexterLabora</dc:creator>
      <dc:date>2024-03-08T11:36:19Z</dc:date>
    </item>
  </channel>
</rss>

