Courseiva
easyMultiple ChoiceObjective-mapped

200-901 Practice Question: An automation script needs to update the hostname…

An automation script needs to update the hostname of a Cisco IOS-XE device via RESTCONF. Which HTTP method is appropriate?

⚠ Common exam trap

The key trap is that candidates may assume PATCH is preferred for updates, but RESTCONF's PATCH (if implemented) is for partial updates using YANG Patch, not for simple leaf replacement. For updating a single leaf like hostname, a full replacement via PUT is the standard method. Many candidates overlook that PATCH is optional and often not used in Cisco implementations.

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

PUT

To update the hostname of a Cisco IOS-XE device via RESTCONF, the PUT HTTP method is appropriate because it performs a full replacement of the target resource. RESTCONF uses the YANG data model, and the hostname is a leaf node under the Cisco-IOS-XE-native YANG module. A PUT request with the complete updated hostname data replaces the existing configuration, aligning with RESTCONF's semantics for resource replacement.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • PUT

    Why this is correct

    PUT is used to replace the target resource with the request payload.

  • PATCH

    Why it's wrong here

    PATCH is for partial updates, but Cisco RESTCONF implementations may not support it as widely; PUT is the standard for full replacement.

  • GET

    Why it's wrong here

    GET is for retrieving data.

  • POST

    Why it's wrong here

    POST is for creating a new resource, not updating.

About these practice questions

Courseiva writes every 200-901 question from scratch — 989 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 →

How Courseiva writes practice questions · Editorial policy

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.