01-07-2021 09:40 AM
Hello,
I wrote the following request to get the list of Tengig interface on a catalyst 9K:
The reply is like :
{
"Cisco-IOS-XE-native:TenGigabitEthernet": [
{
"name": "1/0/1",
"description": "*** BB - ETH - Marseille - $via Orange Media Cloud ***"
},{
"name": "1/0/10",
"description": "*** BB - ETH - MONACO - $via Orange Media Cloud ***"
},{
"name": "1/0/11",
"description": "*** BB - ETH - RENNE - $via Orange Media Cloud ***"
},...] }}
My question is simple : Is it possible to specify one the request that I want the result to be filtered on name=1/0/11 in order to receive only 1 item ?
Thanks.
01-12-2021 03:31 PM - edited 01-12-2021 03:37 PM
according to programmability guide that would be
https://10.200.1.1/restconf/data/Cisco-IOS-XE-native:native/interface/TenGigabitEthernet=1%2F0%2F11?fields=name;description
see:
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/1612/b_1612_programmability_cg/restconf_programmable_interface.html
"%2F" is html url encoding for "/" so "1%2F0%2F11" equals to 1/0/11.
hth
01-13-2021 12:32 AM
Actually, my request is more generic than only the interface name:
With URL like :
wihch returns:
{
"IPMROUTE-STD-MIB:ipMRouteEntry": [
{
"ipMRouteGroup": "224.0.1.40",
"ipMRouteSource": "0.0.0.0",
"ipMRouteInIfIndex": 0,
"CISCO-IPMROUTE-MIB:ciscoIpMRouteBps": 0
},
{
"ipMRouteGroup": "238.1.3.1",
"ipMRouteSource": "10.42.5.25",
"ipMRouteInIfIndex": 65,
"CISCO-IPMROUTE-MIB:ciscoIpMRouteBps": 36403536
},...
is it possible to filter on "ipMRouteGroup" value ?
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