---
description: Application Programming Interfaces
---

# API

An API, or _application programming interface_, is a set of rules that define how applications or devices can connect to and communicate with each other.

APIs are a simplified way to connect your own infrastructure through cloud-native app development, but they also allow you to share your data with customers and other external users. Public APIs represent unique business value because they can simplify and expand how you connect with your partners, as well as potentially monetize your data (the Google Maps API is a popular example).

APIs are sometimes thought of as contracts, with documentation that represents an agreement between parties: If party 1 sends a remote request structured a particular way, this is how party 2’s software will respond.

In short, APIs let you open up access to your resources while maintaining security and control.

**REST** and **SOAP** are 2 different approaches to online data transmission. Specifically, both define how to build APIs, which allow data to be communicated between web applications.&#x20;

### SOAP

Simple object access protocol (SOAP) is an official protocol [maintained by the World Wide Web Consortium (W3C)](https://www.w3.org/TR/soap12/).

### REST

Representational state transfer (REST) is a set of architectural principles.

### GraphQL

A query language and server-side runtime that’s an alternative to REST.

* GraphQL prioritizes giving clients exactly the data they request and no more.&#x20;
* GraphQL lets developers construct requests that pull data from multiple data sources in a single API call.

|                                                                                                                          SOAP vs REST                                                                                                                         |
| :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|                                                     <p>SOAP is a protocol with specific requirements like XML messaging, whereas <br>REST is a set of guidelines that offers flexible implementation.</p>                                                     |
|                                                         SOAP web services offer built-in security and transaction compliance that align with many enterprise needs, but that also makes them heavier.                                                         |
| <p>REST APIs are lightweight, making them ideal for newer contexts like the Internet of Things (IoT), mobile application development, and serverless computing. <br>Additionally, many public APIs, like the Google Maps API, follow the REST guidelines.</p> |

Typically, an API will adhere to either REST or SOAP, depending on the use case and preferences of the developer.
