200-901 Cisco Platforms and Development Practice Question
An administrator needs to retrieve the hostname of an IOS XE device using RESTCONF. Which URL and data path should they use?
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
✓
GET /restconf/data/Cisco-IOS-XE-native:native/hostname
RESTCONF on IOS XE uses the native YANG model; the hostname is under /Cisco-IOS-XE-native:native/hostname.
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 /restconf/data/Cisco-IOS-XE-native:native/hostname
Why this is correct
RESTCONF exposes IOS XE configuration through the Cisco-IOS-XE-native YANG model, so the hostname leaf sits under the native container. The GET request targets that data path, satisfying the requirement to retrieve the device hostname via RESTCONF.
- ✗
GET /api/v1/device/hostname
Why it's wrong here
RESTCONF exposes YANG-modelled data under /restconf/data with module-qualified paths; /api/v1/device/hostname is a vendor REST API convention, not RESTCONF. It tempts because custom REST APIs use such versioned URLs, but RESTCONF requires the ietf-yang-library discovery and standard data resource naming.
- ✗
POST /restconf/data/Cisco-IOS-XE-native:native/hostname
Why it's wrong here
Retrieving data requires GET; POST creates or invokes a resource, so this method cannot read the hostname. It tempts because the path correctly targets Cisco-IOS-XE-native:native/hostname, but POST would attempt to configure or replace that leaf rather than return its current value.
- ✗
GET /restconf/data/ietf-interfaces:interfaces
Why it's wrong here
This path returns interface configuration and state from the ietf-interfaces YANG module, not the device hostname. It tempts because interfaces are a common RESTCONF target, but the hostname resides in Cisco-IOS-XE-native:native/hostname, so the requested leaf is absent from this subtree.
Go deeper
Related to this question
About these practice questions
One of 975 original 200-901 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 200-901 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 200-901 exam.