mediumMultiple Choice
350-401 Practice Question: An engineer is using a Python script to configure…
An engineer is using a Python script to configure a new VLAN on a Cisco Nexus 9000 switch using the NX-API REST API. The script sends a POST request to 'https://switch/api/mo/org.json' with a JSON payload containing the VLAN configuration. The switch responds with a 403 Forbidden error. What is the most likely cause?
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 user account does not have the required RBAC privileges to configure VLANs.
A 403 Forbidden error indicates that the server understood the request but refuses to authorize it. In NX-API, this often occurs when the user does not have sufficient privileges to perform the operation. The engineer should check that the user account used for authentication has the necessary RBAC roles to configure VLANs.
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 payload format is incorrect; the engineer must use XML instead of JSON.
Why it's wrong here
NX-API REST accepts JSON payloads, so switching to XML would not resolve a 403. The status code signals an authorisation failure, not a content-type mismatch. XML is valid for NX-API when a client specifically requires it, but the stem's error points to credentials or permissions, not serialisation format.
- ✓
The user account does not have the required RBAC privileges to configure VLANs.
Why this is correct
A 403 Forbidden response indicates the request was authenticated but the account lacks permission for the operation. NX-API REST enforces role-based access control, so configuring VLANs requires a role granting that privilege; insufficient RBAC rights produce exactly this rejection.
- ✗
The switch does not support NX-API; the engineer must use NETCONF instead.
Why it's wrong here
A 403 response proves NX-API is enabled and reachable, since an unsupported API would yield a connection failure or 404. The switch clearly parsed the request. NETCONF would be chosen when a device lacks NX-API or when model-driven configuration is mandated, neither of which applies here.
- ✗
The URI is incorrect; the correct URI should be 'https://switch/api/node/mo/org.json'.
Why it's wrong here
The URI 'https://switch/api/mo/org.json' is a valid NX-API REST endpoint; inserting '/node/' does not address a 403. Forbidden indicates the request was understood but rejected on authorisation grounds. The '/api/node/mo/' path is used for certain managed-object operations, but the stem's error is not a routing problem.
Visual reference
Quick reference
Access Control Model Comparison
| Model | Acronym | Who Controls Access? | Best For |
|---|---|---|---|
| Discretionary Access Control | DAC | Resource owner | Small teams, file shares |
| Mandatory Access Control | MAC | System / security labels | Classified govt / military |
| Role-Based Access Control | RBAC | Administrator (via roles) | Enterprise environments |
| Attribute-Based Access Control | ABAC | Policy engine (user + resource attributes) | Fine-grained, dynamic policies |
| Rule-Based Access Control | RuBAC | System rules / ACLs | Firewall rules, network ACLs |
Go deeper
Related to this question
Learn chapter
EIGRP: Basics and Advanced Configuration
Key term
REST API for Network Devices
A REST API for network devices is a set of rules that allows software applications to communicate with routers, switches, and firewalls using standard web methods like GET, POST, PUT, and DELETE over HTTP or HTTPS.
About these practice questions
This 350-401 question is part of Courseiva's 1,923-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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-401 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-401 exam.