350-401 Question 229
Single answerYou are tasked with configuring RESTCONF on a Cisco IOS XE device to enable network programmability. After enabling the RESTCONF feature, you attempt to retrieve the device's running configuration using a REST API client but receive an HTTP 401 Unauthorized error. Which step is MOST LIKELY missing from your configuration?
- A
Enable the HTTP/HTTPS server on the device.
- B
Create a username and password with appropriate privilege levels.
- C
Enable the NETCONF feature on the device.
- D
Configure a RESTCONF-specific access control list (ACL).
Show answer and explanation
Correct answer: B
Explanation
To retrieve data using RESTCONF, the device must authenticate the API client. This requires a username and password configured on the device. Without proper user credentials, the device will respond with an HTTP 401 Unauthorized error, indicating that authentication has failed.
- A. Incorrect.
While enabling the HTTP/HTTPS server is necessary for RESTCONF to function, it would not result in an HTTP 401 Unauthorized error if omitted. Instead, the REST API client would fail to connect altogether.
- B. Correct.
RESTCONF relies on basic authentication or tokens for user access. If a username and password are not configured, the device cannot authenticate the API client, resulting in an HTTP 401 Unauthorized error.
- C. Incorrect.
NETCONF is a separate protocol from RESTCONF. Enabling NETCONF is not required for RESTCONF functionality and does not relate to the HTTP 401 Unauthorized error.
- D. Incorrect.
While an ACL can be used to restrict RESTCONF access, the absence of an ACL would typically result in unrestricted access rather than an HTTP 401 Unauthorized error.