nerdexam
CiscoCisco

350-901 · Question #85

350-901 Question #85: Real Exam Question with Answer & Explanation

The correct answer is A: Change POST to PATCH.. To modify an existing configuration attribute like an IP address on an interface using RESTCONF, the HTTP PATCH method should be used to apply a partial update to the resource.

Understanding and Using APIs

Question

Refer to the exhibit. An engineer needs to change the IP address via RESTCONF on interface GigabitEthernet2. An error message is received when the script is run. Which amendment to the code will result in a successful RESTCONF action?

Options

  • AChange POST to PATCH.
  • BIssue a DELETE before PATCH.
  • CIssue a DELETE before POST.
  • DChange POST to GET

Explanation

To modify an existing configuration attribute like an IP address on an interface using RESTCONF, the HTTP PATCH method should be used to apply a partial update to the resource.

Common mistakes.

  • B. Issuing a DELETE before PATCH would remove the configuration entirely before attempting to modify it, which is not the intended action to simply change an IP address.
  • C. Issuing a DELETE before POST would remove and then attempt to create a new resource, but POST is for creation, not modification of an existing IP address.
  • D. GET is used to retrieve resource data and does not perform any modification to the configuration.

Concept tested. RESTCONF HTTP methods for configuration updates

Reference. https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/171/b_171_programmability_cg/restconf_support.html#C_RESTCONF_VERBS

Topics

#RESTCONF#HTTP Methods#API Interaction#Network Configuration

Community Discussion

No community discussion yet for this question.

Full 350-901 PracticeBrowse All 350-901 Questions