cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2611
Views
2
Helpful
1
Replies

API calls to list all EPG's applied to an interface

Ben Clifton
Level 1
Level 1

I'm trying to list all EPG's associated with a physical interface.

It's proving a little difficult because up until this point I've been able to use the API inspector in the GUI to find the relevant API endpoints.

The GUI appears to have no page that lists this sort of information, so the API inspector doesn't help too much.

I can go the opposite way and list all the interfaces associated with a particular EPG by going to:

Tenant>Application Profiles>{app-profile}>Application EPG's and then checking the 'Operational tab'.

API call:

https://{apic-IP-address}/api/node/mo/uni/{tenant}/{application profile}/{epg}.json?query-target=children&target-subtree-class=fvCEp&rsp-subtree=children&rsp-subtree-class=fvRsToVm,fvRsVm,fvRsHyper,fvRsCEpToPathEp,fvIp,fvPrimaryEncap&subscription=yes&order-by=fvCEp.mcastAddr|asc&page=0&page-size=15

But it would be useful to list all EPG's associated with an interface.

Has anyone else done this before? or know of some API calls to list this sort of information?

1 Reply 1

cmchuron1
Level 1
Level 1

Figured it out.  Say you're looking for everything deployed to switch 100 Eth 1/3, you would use the following:

https://{{APIC}}/api/class/fvRsPathAtt.json?query-target-filter=wcard(fvRsPathAtt.dn,"paths-100/pathep-\[eth1/3\]")


The command line can also show you this pretty quickly.  Run the following from the APIC:

apic1# show running-config leaf 100