<?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: Conflicting Traffic values between GUI and API in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450832#M7904</link>
    <description>&lt;P&gt;Hi Oren, indeed the usage corresponds correct, but the Traffic numbers are way off&lt;/P&gt;</description>
    <pubDate>Wed, 04 Dec 2024 22:03:18 GMT</pubDate>
    <dc:creator>ptouch</dc:creator>
    <dc:date>2024-12-04T22:03:18Z</dc:date>
    <item>
      <title>Conflicting Traffic values between GUI and API</title>
      <link>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450830#M7902</link>
      <description>&lt;P&gt;Hi I'm trying to extract the current bandwidth of a given MS port.&lt;/P&gt;&lt;P&gt;For this I'm using the API call: &lt;BR /&gt;&lt;A href="https://api.meraki.com/api/v1/devices/Q2GW-MAAU-5Q3H/switch/ports/statuses?timespan=86400" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v1/devices/{MSserialNumber}/switch/ports/statuses?timespan=86400&lt;/A&gt; &lt;/P&gt;&lt;P&gt;On the UI I get:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ptouch_0-1733222556526.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/264111iD72C047548932743/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;On the API output I get following JSON for that same port:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;        &lt;/SPAN&gt;&lt;SPAN&gt;"usageInKb"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;            &lt;/SPAN&gt;&lt;SPAN&gt;"total"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;1028182893&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;            &lt;/SPAN&gt;&lt;SPAN&gt;"sent"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;322472038&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;            &lt;/SPAN&gt;&lt;SPAN&gt;"recv"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;705710855&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;        },&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;        &lt;/SPAN&gt;&lt;SPAN&gt;"clientCount"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;        &lt;/SPAN&gt;&lt;SPAN&gt;"powerUsageInWh"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;0.0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;        &lt;/SPAN&gt;&lt;SPAN&gt;"trafficInKbps"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;            &lt;/SPAN&gt;&lt;SPAN&gt;"total"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;97486.9&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;            &lt;/SPAN&gt;&lt;SPAN&gt;"sent"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;30575.1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;            &lt;/SPAN&gt;&lt;SPAN&gt;"recv"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;66911.8&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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;&lt;P&gt;-&amp;gt; the usageInKb seems to match, but the trafficInKbps doesn't&lt;/P&gt;&lt;P&gt;1. What's the timespan (currently 86400) to use to get the most recent trafficInKbps of a given switchport?&lt;/P&gt;&lt;P&gt;2. How comes these values are different between UI and API?&lt;/P&gt;&lt;P&gt;3. Is there a more accurate way to get the current BW used on a given port over API&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 10:45:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450830#M7902</guid>
      <dc:creator>ptouch</dc:creator>
      <dc:date>2024-12-03T10:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Traffic values between GUI and API</title>
      <link>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450831#M7903</link>
      <description>&lt;P&gt;This might be a matter of conversion.&lt;BR /&gt;1Mb = 1,024 Kb (not 1,000).&lt;BR /&gt;1Gb = 1,024 Mb = 1,048,576 Kb.&lt;/P&gt;&lt;P&gt;Therefore 1,051,718,192 Kb = 1,003 Gb.&lt;/P&gt;&lt;P&gt;Does it make sense?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 21:09:20 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450831#M7903</guid>
      <dc:creator>obrigg</dc:creator>
      <dc:date>2024-12-04T21:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Traffic values between GUI and API</title>
      <link>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450832#M7904</link>
      <description>&lt;P&gt;Hi Oren, indeed the usage corresponds correct, but the Traffic numbers are way off&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 22:03:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450832#M7904</guid>
      <dc:creator>ptouch</dc:creator>
      <dc:date>2024-12-04T22:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Traffic values between GUI and API</title>
      <link>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450833#M7905</link>
      <description>&lt;P&gt;Thanks for the clarification.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Traffic&lt;/STRONG&gt; is defined as "&lt;SPAN&gt;A breakdown of the &lt;STRONG&gt;average speed&lt;/STRONG&gt; of data that has passed through this port during the timespan."&lt;BR /&gt;While &lt;STRONG&gt;Usage&lt;/STRONG&gt; is defined as "A breakdown of how many kilobytes have passed through this port during the timespan."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Oren_0-1733359000041.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/264112i9A9249D7193C0B9E/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Reference: &lt;A href="https://developer.cisco.com/meraki/api-v1/get-device-switch-ports-statuses/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://developer.cisco.com/meraki/api-v1/get-device-switch-ports-statuses/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 00:37:53 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450833#M7905</guid>
      <dc:creator>obrigg</dc:creator>
      <dc:date>2024-12-05T00:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Traffic values between GUI and API</title>
      <link>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450834#M7906</link>
      <description>&lt;P&gt;Hi Oren,&lt;/P&gt;&lt;P&gt;Thanks for pointing out, I kind of missed that. It's somewhat confusing as the dashboard URI timespan is similar as the API but showing different values:&lt;BR /&gt;&lt;A href="https://n170.meraki.com/Org/n/key/manage/nodes/new_list/number/ports/18?timespan=86400" target="_blank" rel="nofollow noopener noreferrer"&gt;https://n170.meraki.com/Org/n/key/manage/nodes/new_list/number/ports/18?timespan=86400&lt;/A&gt;&lt;/P&gt;&lt;P&gt;but understood, I overlooked this in the description.&lt;BR /&gt;&lt;BR /&gt;This means I need to find another way to get the latest speed of that port&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 08:40:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450834#M7906</guid>
      <dc:creator>ptouch</dc:creator>
      <dc:date>2024-12-05T08:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Traffic values between GUI and API</title>
      <link>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450835#M7907</link>
      <description>&lt;P&gt;I probably would have missed it too, unless I was looking for it.&lt;/P&gt;&lt;P&gt;By latest speed, do you mean 100M/1G/10G/etc’?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The &lt;A href="https://developer.cisco.com/meraki/api-v1/get-device-switch-ports-statuses/" target="_self" rel="nofollow noopener noreferrer"&gt;getDeviceSwitchPortsStatuses&lt;/A&gt; operation will get you that (there’s a new org-wide version coming out later this week).&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 08:44:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450835#M7907</guid>
      <dc:creator>obrigg</dc:creator>
      <dc:date>2024-12-05T08:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Traffic values between GUI and API</title>
      <link>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450836#M7908</link>
      <description>&lt;P&gt;I'm looking for the API call to readout the exact value as you can see on the UI. To read out every 10s to get the actual speed at that moment&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ptouch_0-1733388974498.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/264113iD818075A5FC07969/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 08:57:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450836#M7908</guid>
      <dc:creator>ptouch</dc:creator>
      <dc:date>2024-12-05T08:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Traffic values between GUI and API</title>
      <link>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450837#M7909</link>
      <description>&lt;P&gt;I understand. The real-time traffic value you’re looking for is not currently available via API.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 15:01:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450837#M7909</guid>
      <dc:creator>obrigg</dc:creator>
      <dc:date>2024-12-05T15:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Conflicting Traffic values between GUI and API</title>
      <link>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450838#M7910</link>
      <description>&lt;P&gt;Real time data is not available via the API.&lt;BR /&gt;I'm doing something similar to you but for historical metrics via Prometheus and I went with a timespan of 900s (15 minutes) that I have noticed is the minimum that always give me a reply as I have noticed that using a timespan of 12/13 minutes or lower almost always replies with all 0.&lt;/P&gt;&lt;P&gt;For live monitoring the only way to go is the Dashboard, but for historical metrics I think that the average over 15 minutes could be good enough.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 09:11:51 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/conflicting-traffic-values-between-gui-and-api/m-p/5450838#M7910</guid>
      <dc:creator>gianluca.ulivi</dc:creator>
      <dc:date>2025-01-09T09:11:51Z</dc:date>
    </item>
  </channel>
</rss>

