cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
955
Views
0
Helpful
4
Replies

How to check route using rest api call

Prakin
Level 1
Level 1

hi,

how to check specific routes using rest api call?. which could be similar to "show ip route x.x.x.x vrf all"

4 Replies 4

balaji.bandi
Hall of Fame
Hall of Fame

Depends on what Router and IOS code running on it. check below guide for reference :

https://www.cisco.com/c/en/us/td/docs/routers/csr1000/software/restapi/restapi/RESTAPIvrf.html#pgfId-1076852

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Prakin
Level 1
Level 1

thanks, well actually i am looking for ACI, where are the routes can be fetched from APIC

mabushei
Cisco Employee
Cisco Employee

in Cisco ACI the rest APIs is constructed using the structure of the object model and REST API conventions.

The below API call is constructed using the structure of the object model, with each part of the object model represented in the URL of the API call.

 

GET https://<APIC_IP_ADDRESS>/api/mo/uni/tn-<TENANT_NAME>/out-<VRF_NAME>/rt-[<NETWORK_ADDRESS>/<PREFIX_LENGTH>].json

For example, in the API call, uni represents the root of the object model, tn-<TENANT_NAME> represents the tenant, out-<VRF_NAME> represents the VRF, and rt-[<NETWORK_ADDRESS>/<PREFIX_LENGTH>] represents the specific route. By following this structure, the API call is able to retrieve the desired information about the specific route.

 

Cisco ACI Object Model Reference Guide. This guide provides a comprehensive overview of the object model and the structure of each object, as well as the relationships between objects.

 

 

ecsnnsls
Level 1
Level 1

Hi,

You can poll the fvCEp, uribv4Route, uribv4Nexthop, uribv6Route and uribv6Nexthop classes to retrieve the routes.

HTH

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