Courseiva
mediumMultiple Choice

CCNP 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

Switch VLAN 10 Sales (192.168.10.0/24) PC-A PC-B VLAN 20 HR (192.168.20.0/24) PC-C PC-D Router VLANs isolate traffic — inter-VLAN routing requires a Layer 3 device

Quick reference

Access Control Model Comparison

ModelAcronymWho Controls Access?Best For
Discretionary Access ControlDACResource ownerSmall teams, file shares
Mandatory Access ControlMACSystem / security labelsClassified govt / military
Role-Based Access ControlRBACAdministrator (via roles)Enterprise environments
Attribute-Based Access ControlABACPolicy engine (user + resource attributes)Fine-grained, dynamic policies
Rule-Based Access ControlRuBACSystem rules / ACLsFirewall rules, network ACLs

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 →

How Courseiva writes practice questions · Editorial policy

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.