<?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 get AP country code from DNAC API? in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/how-to-get-ap-country-code-from-dnac-api/m-p/4621666#M8908</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/991811"&gt;@777GE90&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In regards to the API call you have referenced:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Get Device List API call &lt;U&gt;does not&lt;/U&gt; return the AP Country Codes.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.cisco.com/docs/dna-center/#!get-device-list" target="_blank"&gt;https://developer.cisco.com/docs/dna-center/#!get-device-list&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see, it is not contained in the response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;• response:array[]&lt;BR /&gt;o apManagerInterfaceIp:string&lt;BR /&gt;o associatedWlcIp:string&lt;BR /&gt;o bootDateTime:string&lt;BR /&gt;o collectionInterval:string&lt;BR /&gt;o collectionStatus:string&lt;BR /&gt;o errorCode:string&lt;BR /&gt;o errorDescription:string&lt;BR /&gt;o family:string&lt;BR /&gt;o hostname:string&lt;BR /&gt;o id:string&lt;BR /&gt;o instanceTenantId:string&lt;BR /&gt;o instanceUuid:string&lt;BR /&gt;o interfaceCount:string&lt;BR /&gt;o inventoryStatusDetail:string&lt;BR /&gt;o lastUpdateTime:string&lt;BR /&gt;o lastUpdated:string&lt;BR /&gt;o lineCardCount:string&lt;BR /&gt;o lineCardId:string&lt;BR /&gt;o location:string&lt;BR /&gt;o locationName:string&lt;BR /&gt;o macAddress:string&lt;BR /&gt;o managementIpAddress:string&lt;BR /&gt;o memorySize:string&lt;BR /&gt;o platformId:string&lt;BR /&gt;o reachabilityFailureReason:string&lt;BR /&gt;o reachabilityStatus:string&lt;BR /&gt;o role:string&lt;BR /&gt;o roleSource:string&lt;BR /&gt;o serialNumber:string&lt;BR /&gt;o series:string&lt;BR /&gt;o snmpContact:string&lt;BR /&gt;o snmpLocation:string&lt;BR /&gt;o softwareType:string&lt;BR /&gt;o softwareVersion:string&lt;BR /&gt;o tagCount:string&lt;BR /&gt;o tunnelUdpPort:string&lt;BR /&gt;o type:string&lt;BR /&gt;o upTime:string&lt;BR /&gt;o waasDeviceMode:string&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although, you can see it does return the ‘location’ and ‘locationName’ fields.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If we dive deeper with the Get Device Detail API call, we get even less, with only the location field returned.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.cisco.com/docs/dna-center/#!get-device-detail" target="_blank"&gt;https://developer.cisco.com/docs/dna-center/#!get-device-detail&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would try the Get Wireless Profile API call. That might give you a country code for the AP, but I’m not sure.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.cisco.com/docs/dna-center/#!get-wireless-profile" target="_blank"&gt;https://developer.cisco.com/docs/dna-center/#!get-wireless-profile&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Some notes:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;• You may be able to get the country code from the location information returned above. Perhaps you can write a script to deduce the country code from the location string.&lt;/P&gt;
&lt;P&gt;• The AP country code is set at the factory and usually can’t be changed. Look at the product code on the back of the AP. If the product code does not contain “UX” then you can’t change the regulatory domain of the AP.&lt;/P&gt;
&lt;P&gt;• You can verify your WLC’s country code via CLI with this command from the WLC: show country&lt;/P&gt;
&lt;P&gt;• The only way I’ve seen to get the Country Code for an AP is to run this command from the WLC: show ap summary (see &lt;A href="https://www.cisco.com/en/US/docs/wireless/controller/7.4/command/reference/lwap/lwapcr74_chapter_010.pdf" target="_blank"&gt;https://www.cisco.com/en/US/docs/wireless/controller/7.4/command/reference/lwap/lwapcr74_chapter_010.pdf&lt;/A&gt;) see page 35&lt;/P&gt;
&lt;P&gt;• I’ve looked everywhere on the DNAC Dashboard and I can find no trace of country codes. It seems it was in some older versions under ‘Wireless’. I’m using &lt;A href="https://sandboxdnac.cisco.com" target="_blank"&gt;https://sandboxdnac.cisco.com&lt;/A&gt; to search.&lt;/P&gt;</description>
    <pubDate>Tue, 31 May 2022 14:46:44 GMT</pubDate>
    <dc:creator>Alexander Stevenson</dc:creator>
    <dc:date>2022-05-31T14:46:44Z</dc:date>
    <item>
      <title>How to get AP country code from DNAC API?</title>
      <link>https://community.cisco.com/t5/network-platform-api/how-to-get-ap-country-code-from-dnac-api/m-p/4620440#M8907</link>
      <description>&lt;P&gt;Hello, I am trying to get the AP Country Code from the DNAC API, but I can't seem to find it anywhere obvious.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was expecting to find it under the `network-device` endpoint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g:&amp;nbsp;/dna/intent/api/v1/network-device/{uuid}&amp;nbsp;but this does not seem to have it in the results.&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 10:24:27 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/how-to-get-ap-country-code-from-dnac-api/m-p/4620440#M8907</guid>
      <dc:creator>777GE90</dc:creator>
      <dc:date>2022-05-30T10:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get AP country code from DNAC API?</title>
      <link>https://community.cisco.com/t5/network-platform-api/how-to-get-ap-country-code-from-dnac-api/m-p/4621666#M8908</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/991811"&gt;@777GE90&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In regards to the API call you have referenced:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Get Device List API call &lt;U&gt;does not&lt;/U&gt; return the AP Country Codes.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.cisco.com/docs/dna-center/#!get-device-list" target="_blank"&gt;https://developer.cisco.com/docs/dna-center/#!get-device-list&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see, it is not contained in the response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;• response:array[]&lt;BR /&gt;o apManagerInterfaceIp:string&lt;BR /&gt;o associatedWlcIp:string&lt;BR /&gt;o bootDateTime:string&lt;BR /&gt;o collectionInterval:string&lt;BR /&gt;o collectionStatus:string&lt;BR /&gt;o errorCode:string&lt;BR /&gt;o errorDescription:string&lt;BR /&gt;o family:string&lt;BR /&gt;o hostname:string&lt;BR /&gt;o id:string&lt;BR /&gt;o instanceTenantId:string&lt;BR /&gt;o instanceUuid:string&lt;BR /&gt;o interfaceCount:string&lt;BR /&gt;o inventoryStatusDetail:string&lt;BR /&gt;o lastUpdateTime:string&lt;BR /&gt;o lastUpdated:string&lt;BR /&gt;o lineCardCount:string&lt;BR /&gt;o lineCardId:string&lt;BR /&gt;o location:string&lt;BR /&gt;o locationName:string&lt;BR /&gt;o macAddress:string&lt;BR /&gt;o managementIpAddress:string&lt;BR /&gt;o memorySize:string&lt;BR /&gt;o platformId:string&lt;BR /&gt;o reachabilityFailureReason:string&lt;BR /&gt;o reachabilityStatus:string&lt;BR /&gt;o role:string&lt;BR /&gt;o roleSource:string&lt;BR /&gt;o serialNumber:string&lt;BR /&gt;o series:string&lt;BR /&gt;o snmpContact:string&lt;BR /&gt;o snmpLocation:string&lt;BR /&gt;o softwareType:string&lt;BR /&gt;o softwareVersion:string&lt;BR /&gt;o tagCount:string&lt;BR /&gt;o tunnelUdpPort:string&lt;BR /&gt;o type:string&lt;BR /&gt;o upTime:string&lt;BR /&gt;o waasDeviceMode:string&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although, you can see it does return the ‘location’ and ‘locationName’ fields.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If we dive deeper with the Get Device Detail API call, we get even less, with only the location field returned.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.cisco.com/docs/dna-center/#!get-device-detail" target="_blank"&gt;https://developer.cisco.com/docs/dna-center/#!get-device-detail&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would try the Get Wireless Profile API call. That might give you a country code for the AP, but I’m not sure.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.cisco.com/docs/dna-center/#!get-wireless-profile" target="_blank"&gt;https://developer.cisco.com/docs/dna-center/#!get-wireless-profile&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Some notes:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;• You may be able to get the country code from the location information returned above. Perhaps you can write a script to deduce the country code from the location string.&lt;/P&gt;
&lt;P&gt;• The AP country code is set at the factory and usually can’t be changed. Look at the product code on the back of the AP. If the product code does not contain “UX” then you can’t change the regulatory domain of the AP.&lt;/P&gt;
&lt;P&gt;• You can verify your WLC’s country code via CLI with this command from the WLC: show country&lt;/P&gt;
&lt;P&gt;• The only way I’ve seen to get the Country Code for an AP is to run this command from the WLC: show ap summary (see &lt;A href="https://www.cisco.com/en/US/docs/wireless/controller/7.4/command/reference/lwap/lwapcr74_chapter_010.pdf" target="_blank"&gt;https://www.cisco.com/en/US/docs/wireless/controller/7.4/command/reference/lwap/lwapcr74_chapter_010.pdf&lt;/A&gt;) see page 35&lt;/P&gt;
&lt;P&gt;• I’ve looked everywhere on the DNAC Dashboard and I can find no trace of country codes. It seems it was in some older versions under ‘Wireless’. I’m using &lt;A href="https://sandboxdnac.cisco.com" target="_blank"&gt;https://sandboxdnac.cisco.com&lt;/A&gt; to search.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 14:46:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/how-to-get-ap-country-code-from-dnac-api/m-p/4621666#M8908</guid>
      <dc:creator>Alexander Stevenson</dc:creator>
      <dc:date>2022-05-31T14:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get AP country code from DNAC API?</title>
      <link>https://community.cisco.com/t5/network-platform-api/how-to-get-ap-country-code-from-dnac-api/m-p/4621685#M8909</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/976325"&gt;@Alexander Stevenson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the comprehensive response, very useful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So to give you some background, what I am trying to achieve here is to get the AP Country Code setting via the API, so that I can validate that it is set to the correct value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our DNAC instance is showing "&lt;SPAN class=""&gt;Installed Version:&lt;/SPAN&gt;&lt;SPAN class=""&gt;2.3.3.0-70399", which I think is the latest.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I too did struggle to find the "AP Country Code" in the UI, but managed to find it by doing the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;1. Login to DNAC.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;2. Click on the left hand menu and select "Assurance --&amp;gt; Health".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;3. Select the "Network" tab.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;4. Select an AP device to enter the "Device 360" area.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;5. Under "DEVICE DETAILS", press "View All Details" and the "Country Code" is displayed under "GENERAL INFORMATION".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;In regards to the network-device API response contents, unfortunately, both the "location" and "locationName" fields appear to be null values for us, so are not usable.&amp;nbsp; We also need to make sure that the location we are obtaining is the actual location setting of the AP, as that is the setting we are trying to validate, as opposed to just getting a generic location.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I'm not sure how I can use the get-wireless-profile endpoint, as it seems to require me to specify a profile name, which I am not familiar enough with DNAC to know how it links to specific AP's or whether our AP's are even linked to a profile name in the first place.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Ideally, I want to avoid SSH'ing into the device as we plan to automate these checks and the API would be the best way to do that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Given how difficult it seems to retrieve this information and as you suggest it may not be possible to change the country code in the first place, I will also have a check to see if this requirement is still valid for us.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But please do let me know if there is any way to get this information via the API.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 15:19:32 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/how-to-get-ap-country-code-from-dnac-api/m-p/4621685#M8909</guid>
      <dc:creator>777GE90</dc:creator>
      <dc:date>2022-05-31T15:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get AP country code from DNAC API?</title>
      <link>https://community.cisco.com/t5/network-platform-api/how-to-get-ap-country-code-from-dnac-api/m-p/4621878#M8910</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/991811"&gt;@777GE90&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're right. I did see the country code as a field in the&amp;nbsp;&lt;SPAN&gt;Device 360 area. I forgot about that, since it was blank.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm seeing much more granularity of API details returned by using the &lt;U&gt;DNAC Developer Toolkit&lt;/U&gt;. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;SPAN&gt;In the DNAC Dashboard, go to Platform --&amp;gt; Developer Toolkit&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;On the right, type 'Assurance' into the search bar.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Click 'Devices' in blue (this is&amp;nbsp;the device-health request)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Click the blue button 'Try it'&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;For 'deviceRole', specify 'AP' (You can also leave it blank to get all devices)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Click 'Run'&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;This will give you the IP and MAC of every AP. There must be a way to find the AP Country Code from that&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought for sure I was going to get lucky in the Reports section of the DNAC Dashboard when I saw 3 different reports for APIs. Unfortunately, none of them specify a country code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://sandboxdnac.cisco.com/data-sets-reports?reports-item=report-templates" target="_blank"&gt;https://sandboxdnac.cisco.com/data-sets-reports?reports-item=report-templates&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 21:58:05 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/how-to-get-ap-country-code-from-dnac-api/m-p/4621878#M8910</guid>
      <dc:creator>Alexander Stevenson</dc:creator>
      <dc:date>2022-05-31T21:58:05Z</dc:date>
    </item>
  </channel>
</rss>

