<?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: meraki.DashboardAPI: setting custom user agent string in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/meraki-dashboardapi-setting-custom-user-agent-string/m-p/5433691#M5449</link>
    <description>&lt;P&gt;You can use this: &lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(urllib.parse.unquote(apiCalls[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;][&lt;/SPAN&gt;&lt;SPAN&gt;'userAgent'&lt;/SPAN&gt;&lt;SPAN&gt;])) to find the caller.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 20 Jun 2024 19:39:58 GMT</pubDate>
    <dc:creator>riduque</dc:creator>
    <dc:date>2024-06-20T19:39:58Z</dc:date>
    <item>
      <title>meraki.DashboardAPI: setting custom user agent string</title>
      <link>https://community.cisco.com/t5/network-platform-api/meraki-dashboardapi-setting-custom-user-agent-string/m-p/5433689#M5447</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am using the python merakiDashboardAPI and would like to set the custom user agent string when doing API-callls. &lt;BR /&gt;I am following this guide:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api-v1/user-agents-overview/#formatting" target="_blank" rel="noopener nofollow noreferrer"&gt;https://developer.cisco.com/meraki/api-v1/user-agents-overview/#formatting&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;This are some parts of my code:&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;dashboard = meraki.DashboardAPI(suppress_logging=True,output_log=False,print_console=False,caller="testing testing")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;admins=dashboard.organizations.getOrganizationAdmins(organizationId=merakiOrgID)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;.....&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;apiCalls=dashboard.organizations.getOrganizationApiRequests(organizationId=merakiOrgID)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;When I look into the "apiCalls"-variable I see in the userAgent-field a very long string, like this:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;python-meraki/1.42.0 %7B%22implementation%22%3A%20%7B%22name%22%3A%20%22CPython%22%2C%20%22version%22%3A%20%223.10.12%22%7D%2C%20%22system%22%3A%20%7B%22name%22%3A%20%22Linux%22%2C%20%22release%22%3A%20%226.5.0-35-generic%22%7D%2C%20%22cpu%22%3A%20%22x86_64%22%2C%20%22caller%22%3A%20%22getApiUsage/1.0%20testing%22%7D&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I would expect, to see only "testing". &lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;What do I do wrong? &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Or, is this the normal output?&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Greetings&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Juergen&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Jun 2024 15:15:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/meraki-dashboardapi-setting-custom-user-agent-string/m-p/5433689#M5447</guid>
      <dc:creator>JM2024</dc:creator>
      <dc:date>2024-06-20T15:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: meraki.DashboardAPI: setting custom user agent string</title>
      <link>https://community.cisco.com/t5/network-platform-api/meraki-dashboardapi-setting-custom-user-agent-string/m-p/5433690#M5448</link>
      <description>&lt;P&gt;If you use urllib.parse package, you can use it to unquote it to something readable.&lt;/P&gt;&lt;PRE class="lia-code-sample language-markup"&gt;&lt;CODE&gt;&amp;gt;&amp;gt;&amp;gt; import meraki
&amp;gt;&amp;gt;&amp;gt; import urllib.parse
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; dashboard = meraki.DashboardAPI(
...     suppress_logging=True,
...     caller="testing testing"
... )
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; admins = dashboard.organizations.getOrganizationAdmins(orgID)
&amp;gt;&amp;gt;&amp;gt; apiCalls = dashboard.organizations.getOrganizationApiRequests(orgID)
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; print(apiCalls[0]['userAgent'])
python-meraki/1.46.0 %7B%22implementation%22%3A%20%7B%22name%22%3A%20%22CPython%22%2C%20%22version%22%3A%20%223.11.6%22%7D%2C%20%22distro%22%3A%20%7B%22name%22%3A%20%22macOS%22%2C%20%22version%22%3A%20%2214.5%22%7D%2C%20%22system%22%3A%20%7B%22name%22%3A%20%22Darwin%22%2C%20%22release%22%3A%20%2223.5.0%22%7D%2C%20%22cpu%22%3A%20%22arm64%22%2C%20%22caller%22%3A%20%22testing%20testing%22%7D
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; testing = urllib.parse.unquote(apiCalls[0]['userAgent'])
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; print(testing)
python-meraki/1.46.0 {"implementation": {"name": "CPython", "version": "3.11.6"}, "distro": {"name": "macOS", "version": "14.5"}, "system": {"name": "Darwin", "release": "23.5.0"}, "cpu": "arm64", "caller": "testing testing"}
&amp;gt;&amp;gt;&amp;gt; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Jun 2024 19:01:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/meraki-dashboardapi-setting-custom-user-agent-string/m-p/5433690#M5448</guid>
      <dc:creator>Rasmus Hoffmann Birkelund</dc:creator>
      <dc:date>2024-06-20T19:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: meraki.DashboardAPI: setting custom user agent string</title>
      <link>https://community.cisco.com/t5/network-platform-api/meraki-dashboardapi-setting-custom-user-agent-string/m-p/5433691#M5449</link>
      <description>&lt;P&gt;You can use this: &lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(urllib.parse.unquote(apiCalls[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;][&lt;/SPAN&gt;&lt;SPAN&gt;'userAgent'&lt;/SPAN&gt;&lt;SPAN&gt;])) to find the caller.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Jun 2024 19:39:58 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/meraki-dashboardapi-setting-custom-user-agent-string/m-p/5433691#M5449</guid>
      <dc:creator>riduque</dc:creator>
      <dc:date>2024-06-20T19:39:58Z</dc:date>
    </item>
  </channel>
</rss>

