200-901 Cisco Platforms and Development Practice Question
A developer is using NX-API on a Cisco Nexus switch to execute CLI commands via JSON. Which endpoint and method should be used?
⚠ Common exam trap
The trap is that candidates confuse NX-API's /ins endpoint with RESTCONF paths or assume a GET request with a query parameter, when NX-API requires POST with a JSON body.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
POST /ins with JSON body
NX-API on Cisco Nexus switches exposes a REST endpoint at /ins that accepts POST requests with a JSON body containing the CLI commands to execute. The JSON body includes parameters such as 'ins_api' with 'version', 'type' (cli_show), 'chunk', 'sid', 'input' (the command), and 'output_format' (json). This is the standard way to run show commands programmatically via NX-API.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
GET /restconf/data/Cisco-NX-OS-device:cli
Why it's wrong here
RESTCONF is a separate YANG-model-driven interface, not the NX-API CLI endpoint, so it cannot execute arbitrary show commands as requested. It is tempting because RESTCONF also uses HTTP GET on a Nexus device, and it would be correct for model-driven configuration retrieval rather than raw CLI execution.
- ✗
POST /api/cli with XML body
Why it's wrong here
NX-API returns JSON when the request specifies JSON output; posting an XML body to /api/cli does not satisfy the JSON requirement. It is tempting because /api/cli is a valid NX-API endpoint, and it would be correct when the client needs XML-formatted responses instead of JSON.
- ✗
GET /ins?cmd=show version
Why it's wrong here
NX-API CLI execution requires a POST to /ins with the command in the JSON body; GET with a cmd query string does not submit a CLI payload. It is tempting because GET /ins is a real NX-API endpoint, and it would be correct for retrieving existing configuration or status data rather than executing an arbitrary show command.
- ✓
POST /ins with JSON body
Why this is correct
NX-API's JSON-RPC interface accepts commands at the /ins endpoint via HTTP POST, with the CLI commands supplied in the JSON body. GET is unsuitable because it cannot carry the command payload, and /cli returns plain text rather than JSON.
Go deeper
Related to this question
About these practice questions
One of 975 original 200-901 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Cisco exam blueprint
This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.