DevNet Associate (DEVASC) v1.0Cisco Platforms and DevelopmentHard
A network automation engineer is developing a Python script to manage VLANs, interfaces, and routing protocols on a Cisco Nexus switch. The engineer requires a programmatic interface that provides direct HTTP/HTTPS access to the switch's configuration and operational state, returning data in JSON or XML format without requiring a separate network management system. Which programmability feature on NX-OS would best meet this requirement?
- ACLI via SSH
- BSNMP
- CNETCONF/YANG
- DNX-API REST
Show answer & explanationAnswer & explanation
Correct answer: D. NX-API REST
NX-API REST is a native, direct-device programmability feature on Cisco Nexus switches that provides an HTTP/HTTPS interface to interact with the device using JSON or XML payloads for both configuration and operational data.
Why the other options are wrong
- A. CLI via SSH involves text parsing, which is less efficient and more error-prone than structured data formats.
- B. SNMP is primarily for monitoring and basic configuration, not for comprehensive configuration management of VLANs or routing protocols.
- C. While NETCONF/YANG provides structured data, NX-API REST is the more common and direct HTTP-based method for programmatic control on Nexus switches without external controllers.
Cisco NX-API REST
Cisco NX-API REST is a native HTTP/HTTPS-based API on Nexus switches that allows programmatic interaction with the device. It supports sending CLI commands and retrieving operational/configuration data in structured JSON or XML format.
- Directly embedded on the Nexus switch.
- Uses HTTP/HTTPS for communication.
- Supports both configuration and operational commands.
- Returns data in JSON or XML.
Memory trick: NX-OS offers APIs for direct control and structured data.