350-601 Automation Practice Question
Exhibit
{
"error": {
"code": "400",
"message": "Invalid command",
"clierror": "Invalid command at line 1"
}
}Refer to the exhibit. An NX-API request returns this JSON error. What is the most likely cause?
⚠ Common exam trap
Cisco often tests the misconception that any CLI command can be executed via NX-API, but in reality, NX-API has a restricted command set, and candidates may incorrectly attribute the error to credentials or API version mismatches.
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
✓
The command is not allowed via NX-API
The JSON error indicates that the NX-API request was rejected because the command is not permitted through the NX-API interface. NX-API enforces a strict allowlist of commands; any command not explicitly allowed (e.g., certain show commands or configuration commands that could destabilize the switch) will return this error. This is a security and stability feature of the NX-API RESTful interface.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The API version in the request is mismatched
Why it's wrong here
API version mismatch typically gives a different error code (e.g., 404).
- ✗
Invalid credentials
Why it's wrong here
Invalid credentials return 401, not 400.
- ✓
The command is not allowed via NX-API
Why this is correct
Some commands are restricted in NX-API. The error 'Invalid command' suggests a disallowed command.
- ✗
The switch is in maintenance mode
Why it's wrong here
Maintenance mode would not cause this specific error.
Go deeper
Related to this question
About these practice questions
Courseiva writes every 350-601 question from scratch — 984 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 350-601 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 350-601 exam.