Overview
Use this procedure to access the built-in API Inspector and view internal API messages between the GUI and the operating system. You can filter and search these messages to automate key network operations or develop external applications using the API.
When you perform a task in the APIC graphical user interface (GUI), the GUI creates and sends internal API messages to the operating system to execute the task. By using the API Inspector, which is a built-in tool of the APIC, you can view and copy these API messages. A network administrator can replicate these messages in order to automate key operations, or you can use the messages as examples to develop external applications that will use the API.
Procedure
| 1. | Log in to the APIC GUI. |
|||||||||||||||||||||
| 2. | In the upper right corner of the APIC window, click the System Tools icon to view the drop-down list. |
|||||||||||||||||||||
| 3. | In the drop-down list, choose the Show API Inspector. The API Inspector opens in a new browser window. |
|||||||||||||||||||||
| 4. | In the Filters toolbar of the API Inspector window, choose the types of API log messages to display. The displayed messages are color-coded according to the selected message types. This table shows the available message types:
|
|||||||||||||||||||||
| 5. | In the Search toolbar, you can search the displayed messages for an exact string or by a regular expression. This table shows the search controls:
|
|||||||||||||||||||||
| 6. | In the Options toolbar, you can arrange the displayed messages. This table shows the available options:
|
Example
This example shows two debug messages in the API Inspector window:
13:13:36 DEBUG - method: GET url: http://192.0.20.123/api/class/infraInfra.json
response: {"imdata":[{"infraInfra":{"attributes":{"instanceId":"0:0","childAction":"",
"dn":"uni/infra","lcOwn":"local","name":"","replTs":"never","status":""}}}]}
13:13:40 DEBUG - method: GET url: http://192.0.20.123/api/class/l3extDomP.json?
query-target=subtree&subscription=yes
response: {"subscriptionId":"72057598349672459","imdata":[]}