cancel
Showing results for 
Search instead for 
Did you mean: 

X690 - RESTCONF API - What is the value of <key> in openconfig_network_instance URL

X690 - RESTCONF API - What is the value of <key> in openconfig_network_instance URL

md1
New Contributor

Hi,

We are working on an automation project the polls the switches periodically and would like to extract the MAC address of connected devices to the switch and what ports they are connected to. The result of 'show fdb ports 1:1-1:48' is basically what we're after.

It looks like we might be able to achieve a similar result by using API GET calls against the switch using the built in RESTCONF API but I am struggling with this specific URL:
https://<ip>/rest/restconf/data/openconfig-network-instance:network-instances/network-instance=<key>/fdb

I've pulled this URL from the RESTCONF reference documentation at https://[ip]/apps/resconfdoc# version 2.1.1.41, from our X690 switch directly, so I'm assuming its supported.

It is asking for a <key> but I am struggling to find examples of what this would be. 

Does anyone have any experience with this/ have any idea what the <key> value should be?

Many thanks in advance!

 

1 ACCEPTED SOLUTION

Chris_H
Extreme Employee

The "network-instance" key should be the "name" of the given "network-instance" when you run https://<IP>/rest/restconf/data/openconfig-network-instance:network-instances/

This would be "VR-Default" (case sensitive) when you use the default VR, so you can run "https://<IP>/rest/restconf/data/openconfig-network-instance:network-instances/network-instance=VR-Default/fdb?formatted=true" 

You will probably see the MAC addresses even when you use the first link without specifying the specific key and "fdb".

 

View solution in original post

3 REPLIES 3

Chris_H
Extreme Employee

The "network-instance" key should be the "name" of the given "network-instance" when you run https://<IP>/rest/restconf/data/openconfig-network-instance:network-instances/

This would be "VR-Default" (case sensitive) when you use the default VR, so you can run "https://<IP>/rest/restconf/data/openconfig-network-instance:network-instances/network-instance=VR-Default/fdb?formatted=true" 

You will probably see the MAC addresses even when you use the first link without specifying the specific key and "fdb".

 

md1
New Contributor

Thanks for the reply!
I've tried VR-Default but unfortunately get a 500 Internal Server Error: 

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Trying anything else other than VR-Default as the key returns 404 error so it sounds like that is the key, just need to get past the 500 error :).
 
 

md1
New Contributor

Will try a firmware update. Currently on 31.3.1.3. Looks like the 500 internal server error might be fixed on version 31.6 onwards: https://extremeportal.force.com/ExtrArticleDetail?an=000103544.

Thanks for your help Chris.

GTM-P2G8KFN