cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
569
Views
5
Helpful
2
Replies

APIC postman interaction

Qwr!
Level 1
Level 1

I'm trying to update subnets via Postman; I'm not sure, but in a product production environment, I can't always use APIC inspector, so I thought I'd try with a browser URL. Is it necessary to always use the URL from the inspector or is there another recommended way ?

APIC inspector:   https_://{{apic}}/api/node/mo/uni/tn-DMZ/BD-VLAN02.json (working)
Browser URL:     https_://{{apic}}/#bTenants:DMZ|uni/tn-DMZ/BD-VLAN02.json (fails)

1 Accepted Solution

Accepted Solutions

RedNectar
VIP
VIP

Hi @Qwr! ,

What you see in the APIC Inspector is exactly what gets sent to the API which is what makes the change.

Now here's the thing. When you work with the GUI via the web browser, you are woking with a different application effectively.

Think of the Web GUI as the web portal, and the API as the Application that updates the sharded database (which is distributed across the APICs)

image.png

When you look at the API Inspector, you see the conversation between the Web GUI and the API engine, and when you put what you see there into Postman, well you are telling Postman to bypass the GUI and talk directly to the API engine.

So you can't just take the conversation that's designed to instruct the API what to do and plug it into the browser, although you sometimes can get pretty close - but you'll notice that every URL you see in the inspector has the telltale letters api in the URI:

url: https://apic1.dns/api/node/mo/uni/tn-Tenant04.json?query-target=children&target-subtree-class=vzBrCP&rsp-subtree-include=count
response: {"totalCount":"1","imdata":[{"moCount":{"attributes":{"childAction":"","count":"0","dn":"","status":""}}}]}

Now there are plugs (like BANG JSON Workspace) that WILL let you paste in the URI obtained from the API Inspector so you can see them in you browser. For example, the above URI when pasted into a browser with BANG looks like this:

image.png

So, to answer your question,

 Is it necessary to always use the URL from the inspector or is there another recommended way ?

the answer is YES.  But you may find using the Bang extension helpful - but essentially it is just doing what Postman also does, so I'd stick with Postman.

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

2 Replies 2

RedNectar
VIP
VIP

Hi @Qwr! ,

What you see in the APIC Inspector is exactly what gets sent to the API which is what makes the change.

Now here's the thing. When you work with the GUI via the web browser, you are woking with a different application effectively.

Think of the Web GUI as the web portal, and the API as the Application that updates the sharded database (which is distributed across the APICs)

image.png

When you look at the API Inspector, you see the conversation between the Web GUI and the API engine, and when you put what you see there into Postman, well you are telling Postman to bypass the GUI and talk directly to the API engine.

So you can't just take the conversation that's designed to instruct the API what to do and plug it into the browser, although you sometimes can get pretty close - but you'll notice that every URL you see in the inspector has the telltale letters api in the URI:

url: https://apic1.dns/api/node/mo/uni/tn-Tenant04.json?query-target=children&target-subtree-class=vzBrCP&rsp-subtree-include=count
response: {"totalCount":"1","imdata":[{"moCount":{"attributes":{"childAction":"","count":"0","dn":"","status":""}}}]}

Now there are plugs (like BANG JSON Workspace) that WILL let you paste in the URI obtained from the API Inspector so you can see them in you browser. For example, the above URI when pasted into a browser with BANG looks like this:

image.png

So, to answer your question,

 Is it necessary to always use the URL from the inspector or is there another recommended way ?

the answer is YES.  But you may find using the Bang extension helpful - but essentially it is just doing what Postman also does, so I'd stick with Postman.

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.

Qwr!
Level 1
Level 1

@RedNectarThank you for the wonderful explanation.

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