200-901 Cisco Platforms and Development Practice Question
A developer needs to retrieve the hostname of a Cisco IOS XE device using RESTCONF. Which URI path is correct?
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
✓
/restconf/data/Cisco-IOS-XE-native:native/hostname
RESTCONF uses the YANG module namespace. The native hostname is at /restconf/data/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.
- ✗
/restconf/data/Cisco-IOS-XE-native:hostname
Why it's wrong here
The hostname is a leaf within the native YANG model, so the correct path includes the data node and module-qualified container, such as /restconf/data/Cisco-IOS-XE-native:native/hostname. Omitting the native container and its module prefix means the URI addresses no valid YANG node, so RESTCONF returns an error.
- ✗
/api/v1/device/hostname
Why it's wrong here
RESTCONF exposes data through the standard /restconf/data/ path with YANG-modelled resource names; /api/v1/device/hostname is an arbitrary REST-style path that IOS XE does not implement. It is tempting because versioned REST APIs commonly use that pattern, but RESTCONF mandates the RFC 8040 structure, not custom endpoint naming.
- ✓
/restconf/data/Cisco-IOS-XE-native:native/hostname
Why this is correct
RESTCONF exposes YANG-modelled data beneath /restconf/data, followed by the module-qualified path. Cisco-IOS-XE-native:native is the module and container, and hostname is the leaf within it, so this URI returns the device hostname via a GET request.
- ✗
/restconf/data/hostname
Why it's wrong here
RESTCONF requires the data resource to be addressed through its YANG module and container hierarchy, so the hostname leaf must be qualified by its module path rather than placed directly under /data. The bare form is tempting because NETCONF filters and CLI output expose hostname as a simple leaf, but RESTCONF mandates the full schema path.
Go deeper
Related to this question
About these practice questions
Courseiva writes every 200-901 question from scratch — 975 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 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.