cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
871
Views
0
Helpful
3
Replies

Use Postman to query an ACI Contract Filter

a12288
Level 3
Level 3

Good day.

From time to time I need to verify whether a specific port is being opened or not, so I would like use Postman to query a defined ACI Filter but the problem I have is that the Postman response does not have the port information, and I do not know where to force Postman to query all the Child MOs. 

Here is what I used https://{{apic}}/api/node/mo/uni/tn-***/flt-***/fltCnts.json?query-target=children&target-subtree-class=vzEntry&query-target-filter=not(wcard(vzEntry.dn,"__ui_"))

The only difference with the ACI API Inspector is my Postman does not have this "&subscription=yes", as whenever I added it I will get a 405 error. How do you guys 

Leo

3 Replies 3

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Hi @a12288 

Have you tried using just:

https://{{apic}}/api/node/mo/uni/tn-***/flt-***/fltCnts.json?query-target=children

For me, it returns correct values, including ports.

 

Take care,

Sergiu

Unfortunately, Sergiu

It did not return the port information and by the way we are running 5.2(4e), and I used https://{{apic}}/api/node/mo/uni/tn-CCS/flt-FLTP-SCCM/fltCnts.json?query-target=children

{
"totalCount": "1",
"imdata": [
{
"faultCounts": {
"attributes": {
"childAction": "",
"crit": "0",
"critAcked": "0",
"critAckedandDelegated": "0",
"critDelegated": "0",
"dn": "uni/tn-CCS/flt-FLTP-SCCM/fltCnts",
"maj": "0",
"majAcked": "0",
"majAckedandDelegated": "0",
"majDelegated": "0",
"minor": "0",
"minorAcked": "0",
"minorAckedandDelegated": "0",
"minorDelegated": "0",
"status": "",
"warn": "0",
"warnAcked": "0",
"warnAckedandDelegated": "0",
"warnDelegated": "0"
}
}
}
]
}

Leo

Ah sorry. I've copy pasted the URL from your initial post. I highlighted with red the problem:

https://{{apic}}/api/node/mo/uni/tn-***/flt-***/fltCnts.json?query-target=children

You are basically querying the fault counts, not the object itself.

This is the correct URL:

https://{{apic_ip}}/api/mo/uni/tn-***/flt-***.json?query-target=children

In your case:

https://{{apic}}/api/node/mo/uni/tn-CCS/flt-FLTP-SCCM.json?query-target=children

 

Take care,

Sergiu

Review Cisco Networking for a $25 gift card

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