cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
802
Views
5
Helpful
4
Replies
aciguru
Beginner

Get Request for all EPGs

I am trying to get a list of all EPGs used in our fabric. Can someone assist with a script to use on postman or a moquery command to run.

2 ACCEPTED SOLUTIONS

Accepted Solutions
RedNectar
Advocate

Hi @aciguru ,

To see all EPGs, run the following command from an APIC:

apic1# moquery -c fvAEPg | egrep "^name\ "

However, if you have multiple tenants using he same EPG names, you might find filtering on distinguished name (dn) better than filtering on "name" - i.e:

apic1# moquery -c fvAEPg | egrep "^dn\ "

I hope this helps.


Don't forget to mark answers as correct if it solves your problem. This helps others find the correct answer if they search for the same problem.


RedNectar
aka Chris Welsh


Don't forget to mark answers as correct if it solves your problem. This helps others find the correct answer if they search for the same problem

View solution in original post

Sergiu.Daniluk
VIP Advocate

Hi @aciguru 

If all you are looking for is to get all EPGs configured in your fabric, then you can do a GET to this URL:

https://{{apic_ip}}/api/class/fvAEPg.json

Stay safe,

Sergiu

View solution in original post

4 REPLIES 4
RedNectar
Advocate

Hi @aciguru ,

To see all EPGs, run the following command from an APIC:

apic1# moquery -c fvAEPg | egrep "^name\ "

However, if you have multiple tenants using he same EPG names, you might find filtering on distinguished name (dn) better than filtering on "name" - i.e:

apic1# moquery -c fvAEPg | egrep "^dn\ "

I hope this helps.


Don't forget to mark answers as correct if it solves your problem. This helps others find the correct answer if they search for the same problem.


RedNectar
aka Chris Welsh


Don't forget to mark answers as correct if it solves your problem. This helps others find the correct answer if they search for the same problem

View solution in original post

This worked well. Thank you 

Sergiu.Daniluk
VIP Advocate

Hi @aciguru 

If all you are looking for is to get all EPGs configured in your fabric, then you can do a GET to this URL:

https://{{apic_ip}}/api/class/fvAEPg.json

Stay safe,

Sergiu

View solution in original post

I will test this with postman. Thank you.