Chapter 9. Building Network Web Services with Python
In the previous chapters, we were a consumer of the APIs provided by various tools. In chapter 3, API and Intent-Driven Networking, we saw we can use a HTTP POST
method to NX-API at the http://<your router ip>/ins
URL with the CLI
command embedded in the body to execute commands remotely on the Cisco Nexus device; the device then returns the command execution output in return. In chapter 8, Network Monitoring with Python - Part 2, we used the GET
method for our sFlow-RT at http://<your host ip>:8008/version
with an empty body to retrieve the version of the sFlow-RT software. These exchanges are examples of RESTful web services.
According to Wikipedia (https://en.wikipedia.org/wiki/Representational_state_transfer), Representational state transfer (REST) or RESTful web services are one way of providing interoperability between computer systems on the Internet. REST-compliant web services allow requesting systems to access and...