show restconf-yang capabilities
Displays the list of YANG data models and capabilities supported by the device's RESTCONF interface, used to verify RESTCONF compatibility and available modules for automation.
show restconf-yang capabilitiesWhen to Use This Command
- Checking which YANG modules are supported before writing a RESTCONF script to configure OSPF.
- Verifying that a specific YANG model (e.g., ietf-interfaces) is available after upgrading IOS.
- Troubleshooting a RESTCONF API call that fails due to unsupported module.
- Auditing device capabilities for compliance with network automation standards.
Command Examples
Basic capability listing
show restconf-yang capabilitiesCapabilities:
urn:ietf:params:restconf:capability:defaults:1.0?basic-mode=report-all
urn:ietf:params:restconf:capability:depth:1.0
urn:ietf:params:restconf:capability:fields:1.0
urn:ietf:params:restconf:capability:filter:1.0
urn:ietf:params:restconf:capability:replay:1.0
urn:ietf:params:restconf:capability:start-time:1.0
urn:ietf:params:restconf:capability:with-defaults:1.0
urn:ietf:params:xml:ns:yang:ietf-ip?module=ietf-ip&revision=2018-02-22
urn:ietf:params:xml:ns:yang:ietf-interfaces?module=ietf-interfaces&revision=2018-02-20
urn:ietf:params:xml:ns:yang:ietf-routing?module=ietf-routing&revision=2018-03-13
urn:ietf:params:xml:ns:yang:ietf-ospf?module=ietf-ospf&revision=2019-05-21
urn:ietf:params:xml:ns:yang:ietf-bgp?module=ietf-bgp&revision=2019-01-25Each line shows a capability URI. Lines with 'module=' indicate supported YANG modules. The 'revision=' shows the specific version. For example, 'ietf-interfaces' with revision 2018-02-20 is available.
Filtering for a specific module
show restconf-yang capabilities | include ietf-interfacesurn:ietf:params:xml:ns:yang:ietf-interfaces?module=ietf-interfaces&revision=2018-02-20
The output is filtered to show only lines containing 'ietf-interfaces'. This confirms the module is supported with the given revision.
Understanding the Output
The output lists all RESTCONF capabilities as URIs. Each URI represents a feature or YANG module. Lines containing 'module=' indicate a YANG data model; the module name and revision are key. For automation, you need the exact module name and revision to construct RESTCONF URLs. If a required module is missing, the device cannot be managed via RESTCONF for that feature. The 'capability:' lines (e.g., depth, filter) are standard RESTCONF features that should always be present. Watch for missing modules when upgrading IOS; some modules may be removed or added.
CCNA Exam Tips
CCNA exam may ask which command verifies YANG module support for RESTCONF.
Remember that 'show restconf-yang capabilities' is a privileged EXEC command, not config mode.
The output includes revision dates; exam might test that different revisions affect compatibility.
Know that 'ietf-interfaces' is a common YANG module for interface configuration.
Common Mistakes
Mistake: Using 'show restconf capabilities' (missing 'yang') — command will fail.
Mistake: Assuming all YANG modules are supported; always verify with this command.
Mistake: Ignoring revision dates; using wrong revision in RESTCONF URL causes errors.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions