Hi
From one of your APICs you can query the fvRsBd object:
moquery -c fvRsBd -f 'fv.RsBd.tDn=="<DN OF BD>"' | grep dn
For example you want to print all EPGs which are assigned to BD XYZ in tenant TEST (thats uni/tn-TEST/BD-XYZ):
moquery -c fvRsBd -f 'fv.RsBd.tDn=="uni/tn-TEST/BD-XYZ"' | grep dn
dn : uni/tn-TEST/ap-APP1/epg-A/rsbd
dn : uni/tn-TEST/ap-APP1/epg-B/rsbd
dn : uni/tn-TEST/ap-APP1/epg-C/rsbd
dn : uni/tn-TEST/ap-APP1/epg-D/rsbd
HTH
Marcel