About Network APIs (Application Programming Interfaces)

APIs open up the world of computer networks to software developers

Programming Flat Design Concept

DavidGoh / Getty Images

An Application Programming Interface (API) allows computer programmers to access the functionality of published software modules and services on the web. APIs play an important role in app development and network programming. Learn more about what an API is and why developers use them.

What is an API?

An API defines data structures and subroutine calls that extend existing applications with new features. They are also used to build new applications on top of other software components. On the web, APIs make it possible to integrate apps with services such as Google Maps and Facebook.

Some APIs specifically support network programming. Network programming is a type of software development for applications that connect and communicate over computer networks including the internet. Network APIs provide entry points to protocols and reusable software libraries. Network APIs support web browsers, web databases, and many mobile apps. They are widely supported across many programming languages and operating systems.

APIs and Socket Programming

Traditional network programming followed a client-server model. The primary APIs used for client-server networking were implemented in socket libraries built into operating systems. For example, Berkeley sockets and Windows Sockets (Winsock) APIs were the two primary standards for socket programming for many years.

Remote Procedure Calls 

RPC APIs extend basic network programming techniques by adding the capability for applications to invoke functions on remote devices instead of just sending messages to them. With the explosion of growth on the web, XML-RPC has emerged as a popular mechanism for RPC.

Simple Object Access Protocol (SOAP)

SOAP was developed in the late 1990s as a network protocol using XML as its message format and HyperText Transfer Protocol (HTTP) as its transport. SOAP generated a loyal following of web services programmers and became widely used for enterprise applications.

Representational State Transfer (REST)

REST is another programming model that also supports web services. Like SOAP, REST APIs use HTTP, but instead of XML, REST applications often use a Javascript Object Notation (JSON) instead. REST and SOAP differ greatly in their approaches to state management and security, both key considerations for network programmers. Mobile apps may or may not utilize network APIs, but ones that do often use REST.

The Future of APIs

Both SOAP and REST continue to be actively used for the development of new web services. Being a much newer technology than SOAP, REST is more likely to evolve and produce other offshoots of API development.

Operating systems have also evolved to support the many new Network API technologies. In modern operating systems such as Windows 10, for example, sockets continue to be a core API, with HTTP and other additional support layered on top for RESTful style network programming.

As is often the case in computer fields, newer technologies tend to roll out much faster than old ones become obsolete. Look for interesting new API developments to happen especially in the areas of cloud computing and the Internet of Things (IoT), where the characteristics of devices and their usage models is different from traditional network programming environments.