cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2532
Views
5
Helpful
4
Replies

Get Request for all EPGs

tawa-ndafa
Level 1
Level 1

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
VIP
VIP

Hi @tawa-ndafa ,

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.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

View solution in original post

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Hi @tawa-ndafa 

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
VIP
VIP

Hi @tawa-ndafa ,

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.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

This worked well. Thank you 

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Hi @tawa-ndafa 

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

I will test this with postman. Thank you.

Save 25% on Day-2 Operations Add-On License