Implementing and Operating Cisco Enterprise Network Core Technologies (ENCOR) v1.2AutomationEasy

A network engineer is tasked with automating the configuration of several Cisco IOS XE routers. The engineer wants to retrieve the current running configuration in a structured, machine-readable format. Which REST API URI path should the engineer use to accomplish this using RESTCONF?

  1. A/restconf/operations/get-config
  2. B/restconf/data/Cisco-IOS-XE-native:native
  3. C/restconf/data/ietf-interfaces:interfaces
  4. D/restconf/config/running
Show answer & explanation

Correct answer: B. /restconf/data/Cisco-IOS-XE-native:native

To retrieve the full running configuration of a Cisco IOS XE device via RESTCONF, the 'Cisco-IOS-XE-native:native' YANG model is used, which represents the traditional IOS XE CLI configuration. The '/restconf/data/' prefix indicates a request for data nodes.

Why the other options are wrong

  • A. This path format is incorrect for retrieving configuration data; 'operations' is for RPCs, and 'get-config' is not a standard RESTCONF operation for this purpose.
  • C. This path is used to retrieve interface-specific configuration data, not the entire running configuration.
  • D. While 'running' refers to the running configuration, the correct path requires a specific YANG model identifier, not a generic 'config' segment.

RESTCONF for IOS XE Native Config

RESTCONF uses YANG models to represent device configurations. For Cisco IOS XE, the 'Cisco-IOS-XE-native:native' model specifically exposes the entire traditional CLI-like running configuration.

  • RESTCONF is a protocol for configuring network devices using YANG data models.
  • Cisco-IOS-XE-native:native is the YANG model for the traditional IOS XE running configuration.
  • The /restconf/data/ path prefix is used to access data nodes.

Memory trick: RESTful configuration fetches data from the native model.

More Automation questions