This section provides the Representational State Transfer Configuration Protocol (RESTCONF) API sections for the port CLI commands.
To access the top-level interfaces resource within the openconfig-interfaces YANG model, use the following URL:
https://$ip:8080/rest/restconf/data/openconfig-interfaces:interfaces/interface=%s/config
Use this API operation to do the following:
Enable or disable Flex-UNI.
Configure QoS shape rate.
Configure Auto-sense.
Sample server response:
{ "openconfig-interfaces:config": { "flex-uni": true, "qos-shape-rate": 10, "auto-sense":true } }
To access the top-level interfaces resource within the openconfig-interfaces YANG model, use the following URL:
https://$ip:8080/rest/restconf/data/openconfig-interfaces:interfaces/interface=%s/ethernet/switched-vlan/config
Use this API operation to do the following:
Configure a default VLAN ID.
Enable or disable the default VLAN on a tagged port.
Sample server response:
{ "openconfig-interfaces:config": { "native-vlan": 1, -> "default-vlan-id <vid>" command on port interface "untag-port-default-vlan": true, } }
To access the top-level interfaces resource within the openconfig-interfaces YANG model, use the following URLs:
URL: https://$ip:8080/rest/restconf/data/openconfig-interfaces:interfaces/interface=%s/config URL: https://$ip:8080/rest/restconf/data/openconfig-interfaces:interfaces/interface=%s/state
Use this API operation to do the following:
Get interface configuration.
Get URLs available in RESTCONF Phase 1.
Sample server response:
Based on Yang Model