Courseiva
Question 696 of 1,420
mediumMultiple ChoiceObjective-mapped

350-401 Practice Question: An engineer is using a Python script to retrieve…

An engineer is using a Python script to retrieve interface statistics from a Cisco IOS-XE device via the REST API. The script sends a GET request to 'https://device/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet1/statistics' and receives a 404 Not Found response. The interface exists and is operational. What is the most likely issue?

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 URI is incorrect; statistics are under 'interfaces-state' not 'interfaces'.

The 404 error indicates the resource was not found. In RESTCONF, the URI must use the correct encoding for interface names, especially if they contain special characters like a slash. The interface name 'GigabitEthernet1' should be URL-encoded as 'GigabitEthernet1' (no encoding needed here), but the issue is that the URI path must match the YANG module structure exactly. The statistics data is often under a separate container like 'interfaces-state' in the ietf-interfaces model, not directly under 'interface'. The correct URI for operational statistics is typically 'ietf-interfaces:interfaces-state/interface=GigabitEthernet1/statistics'.

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 interface name must be URL-encoded because it contains a slash.

    Why it's wrong here

    Incorrect because 'GigabitEthernet1' does not contain a slash; URL encoding is not the issue here.

  • The URI is incorrect; statistics are under 'interfaces-state' not 'interfaces'.

    Why this is correct

    Correct because operational state data like statistics is in the 'interfaces-state' container, while 'interfaces' contains configuration data.

  • The device requires authentication; the script must include a valid token.

    Why it's wrong here

    Incorrect because a 404 error indicates resource not found, not authentication failure (which would be 401).

  • The REST API is not enabled on the device; the engineer must enable it first.

    Why it's wrong here

    Incorrect because if the API were not enabled, the response would likely be a connection error or 403, not 404.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 18, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.