QuestionQ430

Using APIs

Refer to the exhibit.

Question Image

An engineer needs to update a static route on several Cisco IOS XE routers by using RESTCONF and a Python script. Which code snippet must be inserted in the blank?

  • A requests.patch
  • B add_static_route
  • C requests.put
  • D uri.config.post
Explanation

RESTCONF uses the HTTP PATCH method to update an existing configuration resource. In Python’s Requests library, requests.patch sends that PATCH request with the supplied RESTCONF URI, headers, JSON configuration payload, and authentication. Cisco documents PATCH as the RESTCONF operation for updates, whereas PUT creates or replaces a resource.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!