03-24-2025 06:18 AM
Hello ,
I was finding the API which gives me the interface status of APIC, I found one document but the API seems not to give me the interface status.
https://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/4-x/rest-api-config/Cisco-APIC-REST-API-Configuration-Guide-401/Cisco-APIC-REST-API-Configuration-Guide-401_chapter_0110.html
----------------------------------------------------------------------
You can use the REST API interface to poll for interface statistics. Several counters are available (for example, RX/TX, input/output / duplex, 30 second rates, 5 minute rate, unicast packets, multicast packets). Using the parent managed object, the children can be derived from it. To do this, you must have a good understanding of the object model and be able to navigate through the model to obtain the information desired using the example below.
Step 1 | Use the following base API call to get physical interface statistics: Example:https://apic-ip-address/api/node/mo/topology/pod-1/node-101/sys/phys-[eth1/1].json |
Step 2 | To determine the total ingress bytes on Leaf 101 port Eth1/1, you can issue the following API call: Example:/topology/pod-1/node-101/sys/phys-[eth1/1].json |
Step 3 | Visore allows you to dig deeper into the hierarchical tree. From the prior command, the operator can see children of the interface object, such as ingress and egress bytes. The child objects include the following: Example:/topology/pod-1/node-101/sys/phys-[eth1/1]/dbgEtherStats |
I get the following API response error , Can somebody assist or provide right API
{ "totalCount": "1", "imdata": [ { "error": { "attributes": { "code": "1", "text": "the messaging layer was unable to deliver the stimulus (destination (node) is marked unavailable)" } } } ] }
Solved! Go to Solution.
03-24-2025 06:49 AM
Thanks, I found the correct API
https://<APIC IP>/api/node/class/cnwPhysIf.json?&order-by=cnwPhysIf.modTs|desc
03-24-2025 06:31 AM
@Forward just based on the error you posted, this would indicated that the destination node is marked as unavailable, which normally means the leaf switch you are trying to reach (node-101 in this case) is not reachable by the APIC. Have you confirmed this is connected ok?
03-24-2025 06:49 AM
Thanks, I found the correct API
https://<APIC IP>/api/node/class/cnwPhysIf.json?&order-by=cnwPhysIf.modTs|desc
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide