<?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: Retrieve all wireless profiles via DNAC API in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4564196#M8960</link>
    <description>&lt;P&gt;After a lot of trial and error, I figured out, that for some reason my lab-DNAC doesn't like the&amp;nbsp;/dna/intent/api/v1/wireless/profile call. If I do it on customers DNAC or on a dCloud DNAC the call works perfectly fine.&lt;/P&gt;&lt;P&gt;Thanks to everybody who tried helping me.&lt;/P&gt;</description>
    <pubDate>Fri, 04 Mar 2022 15:26:52 GMT</pubDate>
    <dc:creator>Cedric Metzger</dc:creator>
    <dc:date>2022-03-04T15:26:52Z</dc:date>
    <item>
      <title>Retrieve all wireless profiles via DNAC API</title>
      <link>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4559050#M8954</link>
      <description>&lt;P&gt;For a specific usecase, I need to get all wireless profiles from DNAC via API. The documentation (&lt;A href="https://developer.cisco.com/docs/dna-center/#!get-wireless-profile" target="_blank" rel="noopener"&gt;https://developer.cisco.com/docs/dna-center/#!get-wireless-profile&lt;/A&gt;) says that the&amp;nbsp;&lt;SPAN&gt;/dna/intent/api/v1/wireless/profile should &lt;EM&gt;"Get either one or &lt;U&gt;&lt;STRONG&gt;all the wireless network profiles&lt;/STRONG&gt;&lt;/U&gt; if no name is provided for network-profile"&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when I issue the API call with an empty value for "profileName" I always get a "undefined" as response. Following you can see my test from DNACs toolkit page. I get the same result with postman.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-02-24 at 18.34.52.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/144686iEBD0D18C8329C3CB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-02-24 at 18.34.52.png" alt="Screenshot 2022-02-24 at 18.34.52.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Test Summary for "profileName" values:&lt;/P&gt;&lt;P&gt;- nothing submitted: "undefined"&lt;/P&gt;&lt;P&gt;- "asdf" submitted:&amp;nbsp;"Profile Not Found"&lt;/P&gt;&lt;P&gt;- valid profile name submitted: Profile gets returned&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anybody an idea, which value I need to enter, to get &lt;STRONG&gt;&lt;U&gt;all wireless profiles&lt;/U&gt;&lt;/STRONG&gt; returned?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 17:39:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4559050#M8954</guid>
      <dc:creator>Cedric Metzger</dc:creator>
      <dc:date>2022-02-24T17:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all wireless profiles via DNAC API</title>
      <link>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4559066#M8955</link>
      <description>&lt;P&gt;Hey Cedric,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you tried deleting the query param, and just using&amp;nbsp;&lt;SPAN&gt;/dna/intent/api/v1/wireless/profile with no query?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't test right now unfortunately, so not sure if this works.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 18:18:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4559066#M8955</guid>
      <dc:creator>korey_oehlers</dc:creator>
      <dc:date>2022-02-24T18:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all wireless profiles via DNAC API</title>
      <link>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4559083#M8956</link>
      <description>&lt;P&gt;Hi Korey,&lt;/P&gt;&lt;P&gt;Yes i tried this with postman. Got the same repsonse (undefined) &lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-02-24 at 20.01.51.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/144691i9337594854BE37E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-02-24 at 20.01.51.png" alt="Screenshot 2022-02-24 at 20.01.51.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I also tried calling out the param explicitly in the URL with&amp;nbsp;&lt;A href="https://DNAC/intent/api/v1/wireless/profile?profileName=null" target="_blank" rel="noopener"&gt;https://DNAC/intent/api/v1/wireless/profile?profileName=null&lt;/A&gt;&amp;nbsp;or with&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;A href="https://DNAC/intent/api/v1/wireless/profile?profileName=null" target="_blank" rel="noopener"&gt;https://DNAC/intent/api/v1/wireless/profile?profileName&lt;/A&gt;&amp;nbsp;The first one give "Profile not Found" and the second one "undefined" as response back.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 19:02:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4559083#M8956</guid>
      <dc:creator>Cedric Metzger</dc:creator>
      <dc:date>2022-02-24T19:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all wireless profiles via DNAC API</title>
      <link>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4559094#M8957</link>
      <description>&lt;P&gt;Cedric,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using python not postman, but I was able to get it to work with:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;https://&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;server&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/dna/intent/api/v1/wireless/profile?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Does that work for you?&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Feb 2022 19:21:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4559094#M8957</guid>
      <dc:creator>korey_oehlers</dc:creator>
      <dc:date>2022-02-24T19:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all wireless profiles via DNAC API</title>
      <link>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4559141#M8958</link>
      <description>&lt;P&gt;Hi Korey&lt;/P&gt;&lt;P&gt;Unfortunately I still get "undefined" by calling&amp;nbsp;&lt;SPAN&gt;https://&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;server&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/dna/intent/api/v1/wireless/profile?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Would you mind sharing your whole sample script, so I can try figuring it out?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 21:00:58 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4559141#M8958</guid>
      <dc:creator>Cedric Metzger</dc:creator>
      <dc:date>2022-02-24T21:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all wireless profiles via DNAC API</title>
      <link>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4559519#M8959</link>
      <description>&lt;P&gt;Sure, no problem.&amp;nbsp; Here's what I tested with:&lt;/P&gt;&lt;PRE&gt;import requests
import base64

def get_dna_token():

    url = f'https://{server}/dna/system/api/v1/auth/token'
    payload = None
    auth = f'{username}:{password}'.encode()
    auth = base64.b64encode(auth).decode()
    headers = {
        "Content-Type": "application/json",
        "Authorization": f"Basic {auth}",
        "Accept": "application/json"
    }

    response = requests.post(url, headers=headers, data=payload, verify=False)
    token = response.json()['Token']

    return token

def get_wireless_profile(token):

    url = f'https://{server}/dna/intent/api/v1/wireless/profile?'
    payload = None
    headers = {
        "Content-Type": "application/json",
        "X-Auth-Token": f"{token}",
        "Accept": "application/json"
    }
    
    response = requests.get(url, headers=headers, data=payload, verify=False)

    print(response)

    response = response.json()

    return response

def main():

    token = get_dna_token()

    test = get_wireless_profile(token)

    print(test)

if __name__ == '__main__':

    server = '1.1.1.1'
    username = 'test'
    password = 'test'

    requests.packages.urllib3.disable_warnings()
    main()&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Feb 2022 12:45:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4559519#M8959</guid>
      <dc:creator>korey_oehlers</dc:creator>
      <dc:date>2022-02-25T12:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all wireless profiles via DNAC API</title>
      <link>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4564196#M8960</link>
      <description>&lt;P&gt;After a lot of trial and error, I figured out, that for some reason my lab-DNAC doesn't like the&amp;nbsp;/dna/intent/api/v1/wireless/profile call. If I do it on customers DNAC or on a dCloud DNAC the call works perfectly fine.&lt;/P&gt;&lt;P&gt;Thanks to everybody who tried helping me.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 15:26:52 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4564196#M8960</guid>
      <dc:creator>Cedric Metzger</dc:creator>
      <dc:date>2022-03-04T15:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all wireless profiles via DNAC API</title>
      <link>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4564787#M8961</link>
      <description>Have you upgraded your DNAC recently?&lt;BR /&gt;&lt;BR /&gt;You need to restart the API bundle.&lt;BR /&gt;CSCvr70208&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 06 Mar 2022 06:53:37 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4564787#M8961</guid>
      <dc:creator>aradford</dc:creator>
      <dc:date>2022-03-06T06:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all wireless profiles via DNAC API</title>
      <link>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4565018#M8962</link>
      <description>&lt;P&gt;Jep, but that didn't help. I'll update my DNAC to 2.2.3 to see if anything improves. Otherwise I'll have to open a TAC case I guess.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Mar 2022 19:32:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/retrieve-all-wireless-profiles-via-dnac-api/m-p/4565018#M8962</guid>
      <dc:creator>Cedric Metzger</dc:creator>
      <dc:date>2022-03-06T19:32:26Z</dc:date>
    </item>
  </channel>
</rss>

