This document describes how to obtain the Distinguished Name (DN) of an object within the Cisco Application Policy Infrastructure Controller (APIC) GUI. When you troubleshoot the logical model or attempt to create a script on the APIC GUI, it can be difficult to match the object that you want to interact with on the GUI with the actual class name, or obtain its DN in order to view the Managed Object (MO) attributes in Visore.
There are many available methods that can be used in order to determine the DN of an object that you see in the GUI. This section describes four different methods.
While you navigate to the GUI, you will notice that there are many dynamic elements loaded. These elements respond to your clicks as you navigate through the GUI representation of the Object Model. When you click an object, the URL within your browser should update in order to include the DN of the object that you select.
For example, if you click tenant common, the URL updates to reflect this:
http://x.x.x.x/#bTenants:common|uni/tn-common
As you read the Uniform Resource Identifier (URI), notice that the DN of the object that you last clicked appears after the pipe (|).
For some of the policies in the GUI, you can right-click on the policy and see a Post ... option:
When you click this option, you are presented with the DN for that policy/MO:
Similarly, you can right-click on a policy and choose the Save as ... option in order to download either an XML or JSON output of the selected object and various properties (as well as special filters, if needed).
This image shows the available selections when you choose the Save as... option:
Here are some notes about these selections:
This example shows the Save as ... operation for the tenant common, where the All Properties, Self, and XML selections are specified:
This example shows the Save as ... operation for the tenant common, where the Only Configuration, Self, and XML selections are specified:
Notice that both versions of the content selections provide the DN of the chosen object. You also receive the name of the class, which in this case is fvTenant (shown as the start of the object instance). This is useful for Visore or MOquery.
You can take the subscription requests directly from the Application Policy Infrastructure (API) inspector in order to obtain the DN of an object. In order to enable this, click Show API Inspector under the Welcome, <username> message near the top-right navigation bar.
Here is an example that shows the health of the tenant common:
Here is an example that provides a look inside of the API inspector for tenant common:
If you desire to have a more in-depth analysis, you can enable the browser debugging information feature, which includes the DN of the object that you select.
In order to enable this, click Show Debug info under the Welcome, <username> message near the top-right navigation bar.
Once this is enabled, there is some fine print near the bottom of the browser window that begins with the words Current Screen.
When you click tenant common, you will see this output:
Current Screen:insieme.stromboli.layout.Tab [fv:infoTenant:center:a ] | Current
Mo:insieme.stromboli.model.def.fvTenant [uni/tn-common ]