RESTCONF Request Construction for VLAN Creation
Short answer
Construct the RESTCONF request by first specifying the URL endpoint, then adding the authentication header, and finally including the JSON payload with the VLAN configuration data.
Question
Drag and drop the code snippets from the bottom onto the boxes in the code to construct a RESTCONF request that creates two access VLANs on a Cisco IOS XE device. Not all options are used.

Key Takeaways
The trap lies in confusing the placement of the payload versus the authentication header; the correct order is always Endpoint -> Auth -> Payload.
Learn how to correctly order URL, authentication, and payload when building a RESTCONF POST request to create VLANs on Cisco IOS XE devices using Python or CLI tools.
Common mistake: Placing the payload before the authentication header, which causes the request to fail due to missing credentials or incorrect HTTP structure.
Expert Analysis
RESTCONF POST Structure and Body
To construct a RESTCONF request that creates resources (such as VLANs) on a Cisco IOS XE device, you must use the HTTP POST method. The critical aspect of this question is understanding the standard structure of an HTTP RESTful API request, which consists of three main components: the endpoint URL, authentication headers, and the request body containing the payload.
Ordering the Snippets
The correct logical flow for constructing the code snippet involves:
- URL Endpoint: The base URL where the resource will be created (e.g.,
https://<device>/restconf/data/). - Authentication: Headers required to authorize the request (e.g.,
Authorization: Basic...orBearer...). - Data/Payload: The actual content being sent to the server, formatted according to YANG models (usually JSON or XML), which defines the new VLAN configurations.
Common Misconceptions
Learners often confuse the order of these elements or misidentify the "payload" vs. "data." In RESTCONF, the "data" typically refers to the configuration content within the payload, while the "payload" is the entire body of the HTTP message. The comments indicate some confusion about whether "data" and "payload" are reversed, but in standard coding constructs for such questions, the sequence is generally: Endpoint -> Authentication -> Payload/Data. The key insight is that without the correct URL and auth, the payload cannot be processed; thus, they must precede it.
Operational Consequence
Getting this wrong results in a syntax error or an unauthorized access error (401/403). It is crucial to remember that RESTCONF uses standard HTTP methods, so POST is for creation, GET for retrieval, PUT for full replacement, and DELETE for removal.
Official Reference
This link opens the official vendor documentation in a new tab.
Exam Strategy
When facing drag-and-drop questions involving API calls, always visualize the HTTP request structure: Method + URL + Headers + Body. Prioritize identifying the unique identifiers (URLs) and security tokens (Auth) before the variable content (Payload). This mental model applies to NETCONF, RESTCONF, and any RESTful API scenario.
Frequently Asked Questions
What HTTP method is used to create new resources via RESTCONF?
Does the payload format matter for VLAN creation?
Discussion 4 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 4
-
Zangi 👍 1 Answered AWithout a doubt, it's A. This came up in a recent lab I did.
-
jchutch2 👍 1Answer has data and payload reversed but otherwise correct.
-
jchutch2 👍 1Answer has payload and data reversed but otherwise correct.
-
Dominican_Beard 👍 1right order of answer is: data post auth payload
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All 300-435 Questions
Access 150 questions with complete answers and detailed explanations.
View Full 300-435 Practice Test →