NANOG 72 Talk: “The API is the New CLI”
When discussing new trends in networking, you’ve probably heard the claim API is the new CLI.
At NANOG 72, Chris Grundemann, Principal Security Architect at Myriad, investigates this claim by first explaining the importance of understanding the differences between the two interfaces. Command Line Interface (CLI) is set up specifically for people to interact with machines, while Application Programming Interface (API) is set up specifically for programs to talk to programs.
When discussing APIs specifically when it comes to networking, there are three to pay attention to: NETCONF (Network Configuration Protocol), REST (Representational State Transfer), and RESTCONF (a combination of the two). For each, Chris breaks down its definition, when it was defined, how it works, what it interacts with, what software is used to support it, the flow of data through the API and how it is encoded, its unique features, and how the API can be used in conjunction with other features on a network.
Chris also describes YANG, which is not an API, but rather the data model for formatting data. One can then use NETCONF or RESTCONF to encode the data and send to (or receive from) network devices.
APIs are powerful tools used to allow programs to communicate reliably with network devices, whether it be scripts talking to devices you could write yourself or more complex, intent-based systems where you are interacting with a system that’s been interacting with the devices through an API. Chris closes by giving insight into which interface is more appropriate for day-to-day operations and growing networks, in addition to describing what situations would require CLI, API, or both.