APIs



What is an API?



• API stands for Application Programming Interface
• API is a way for two pieces of software to talk to each other

images/105-1.png

• API is the user interface for software systems
• APIs are sets of requirements that govern how one application can talk to another (machine-to-machine)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Analogy: An API is like an electrical outlet



What would it be like to power an hair dryer without an outlet?



• Open wall
• Strip wires
• Splice wires together
• Understand all the wires in the wall

The outlet is the service that conforms to specifications



• Socket deliver 120V of AC operated at 60Hz
• Sets expectation on behalf of consumer devices

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

APIs -- You already use them



• An API help developers to develop apps that benefit the end users
◇ Yelp asks for Map data
◇ Google Maps returns map data via API

images/105-2.png

• APIs are often referred to as “an engine of innovation”

Command Line Interface (CLI)



• Designed for humans .. so more a UI than API but ...
• Network Management Systems
• Scripts
• Paramiko / Netmiko
• NAPALM

Simple Network Management Protocol (SNMP)



• “desgined as a programmatic interface between management applications and devices”
• Widely used for monitoring
• Limited use for configuration
• Network Management Systems primary consumer

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Other APIs Out There



Simple Object Access Protocols (SOAP)



• Mature standard designed by Microsoft
• Used to build “Web Services” (software available over the Internet)
• Typically uses HTTP and dependent on XML
• Sometimes considered complex and rigid

Representational State Transfer (REST)



• API framework intended to build simpler web services than SOAP
• Another use for the HTTP protocol
• Popular due to performance, scale, simplicity and reliability
• Technically an API framework
◇ More detailed coverage later

XML-RPC and JSON-RPC



• Simple framework for communicating over HTTP
• RPC = Remote Procedural Call
◇ When one system requests another system to execute code
• Offer XML and JSON data format respectively

NETCONF



• Designed as a replacement for SNMP
• Standardized in 2006 / Updated 2011
• Leverage SSH and XML
• Defines transport and communication
◇ Titled coupled to YANG for data
▪ More detailed coverage later

RESTCONF Protocol



• Provide REST API like interaface to network
• Standardized in 2017
• Support XML and JSON
• Defines transport and communication
◇ Titled coupled to YANG for data
▪ More detailed coverage later


Index