chapter forty seven

47 REST APIs

 

This chapter covers

  • How applications communicate and share data
  • HTTP requests and responses
  • REST API architecture
  • Making REST API calls to Cisco DNAC

Programming and automating networks requires seamless communication between software running on various devices—from network equipment like routers and switches to servers, controllers in an SDN architecture, and the network administrator or engineer’s own PC. There are two essential elements that facilitate communication between these software applications: an interface that opens up each application’s data to external applications, and standard data formats for exchanging information efficiently.

In this chapter, we’ll cover the first piece of the puzzle: application programming interfaces (APIs). APIs are software interfaces that enable two or more software applications to communicate with each other. Specifically, we will examine representational state transfer (REST) APIs, which are commonly used in network automation contexts, such as the northbound interface (NBI) of an SDN controller. Specifically, we will cover CCNA exam topic 6.5, Describe characteristics of REST-based APIs (CRUD, HTTP verbs, and data encoding).

47.1 The purpose of APIs

47.2 HTTP

47.2.1 HTTP requests

47.2.2 HTTP responses

47.3 REST APIs

47.3.1 REST architecture

47.3.2 Making REST API calls to DNAC

47.4 Summary