350-401 Automation Practice Question
A network automation team wants to programmatically configure a Cisco Catalyst 9300 switch using RESTCONF. The switch is running Cisco IOS XE 17.x. Which HTTP method should be used to create a new VLAN by sending a JSON payload to the RESTCONF URI /restconf/data/Cisco-IOS-XE-vlan:vlan?
⚠ Common exam trap
Test-takers frequently confuse POST with PUT; POST creates a subordinate resource in a collection, while PUT creates or replaces a resource at a specific URI.
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
RESTCONF maps CRUD operations to HTTP methods: POST creates a new resource within a collection. To add a new VLAN to the VLAN list, the correct method is POST to the list URI. PUT would require the full resource URI and replaces content, PATCH modifies existing resources, and GET only reads. Thus POST is the correct choice for creating a new VLAN.
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
Why it's wrong here
GET is a read-only method that retrieves data. It cannot create or modify configuration. Sending a JSON payload with GET is not supported for creation. The engineer needs a write method, so GET fails to accomplish the goal and would not change the device configuration.
- ✗
PUT
Why it's wrong here
PUT is used to create or replace a resource at a known URI. To create a VLAN with PUT, the URI must include the specific VLAN ID (e.g., .../vlan=100) and the body must match. Using PUT on the list URI would be invalid or replace the entire list, so it is not the intended method for adding a single new VLAN.
- ✗
PATCH
Why it's wrong here
PATCH is used to modify an existing resource by merging or replacing specific fields. It does not create a new list entry at the list URI. If the VLAN does not exist, PATCH typically returns an error. Therefore, PATCH is not appropriate for creating a new VLAN in this scenario.
- ✓
POST
Why this is correct
RESTCONF uses POST to create a new resource in a data tree. Sending a JSON body to the VLAN list URI creates the specified VLAN. The device responds with 201 Created and a Location header. This is the correct method when the target resource does not yet exist and you are adding a new list entry.
Visual reference
Go deeper
Related to this question
Learn chapter
SDN Controllers and Cisco ACI
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.
Key term
Cisco DNA Center Automation
Cisco DNA Center Automation is a centralized software platform that simplifies network management by automatically configuring, monitoring, and troubleshooting Cisco devices using policy-driven intent and software tools.
About these practice questions
Courseiva writes every 350-401 question from scratch — 1,923 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 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 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.