nerdexam
CiscoCisco

200-901 · Question #450

200-901 Question #450: Real Exam Question with Answer & Explanation

The correct answer is B: invalid URL. A RESTCONF API request for IOS-XE-native model data fails because the URL does not correctly reference the YANG module path and RESTCONF base URI required by the IOS-XE device.

Understanding and Using APIs

Question

Refer to the exhibit. A developer is trying to collect data over RESTCONF API and prepares the request. The developer wants to get data in JSON format and with the IOS-XE-native model, but the request fails. Which HTTP part causes the failure?

Options

  • Aapplication value
  • Binvalid URL
  • Cmissing URI header path
  • Dincorrect request type

Explanation

A RESTCONF API request for IOS-XE-native model data fails because the URL does not correctly reference the YANG module path and RESTCONF base URI required by the IOS-XE device.

Common mistakes.

  • A. The Accept header value (application/yang-data+json) correctly requests JSON-formatted YANG data and is not the cause of the failure when the URL is malformed.
  • C. RESTCONF does not use a separate 'URI header path' - the resource path is part of the URL itself, and this is not a recognized HTTP or RESTCONF failure category.
  • D. GET is the correct HTTP method for retrieving RESTCONF data resources and is not the source of failure when the URL itself is invalid.

Concept tested. RESTCONF API URL structure for Cisco IOS-XE YANG model

Reference. https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/166/b_166_programmability_cg/restconf_programmable_interface.html

Topics

#RESTCONF#YANG models#API requests#URL structure

Community Discussion

No community discussion yet for this question.

Full 200-901 PracticeBrowse All 200-901 Questions