Need cloud computing? Get started now

How Do APIs Work?

What is an API?

API is an abbreviation of application programming interface, a set of protocols and definitions that allow different software components or programs to communicate with each other and share data.

APIs determine how one application can access the data or functions offered by another software program. For example, to include weather information on a website, programmers may use an API to communicate with a site that provides real-time weather reports rather than needing to build their own program to collect and interpret weather data. In today’s digital world, APIs are involved in almost every action you take and transaction you make online, including making a mobile payment or browsing an ecommerce site.

You can think of an API somewhat like a takeout menu that lets you order different meals at any time without having to prepare the food yourself. When you’re building an application or website, you can use APIs to pull data without having to build and manage your own database, or offer fingerprint authentication without having to create your own authentication software. APIs use a request-response model of communication, in which a client sends a request or API call to an API that processes the request and returns a response. APIs typically use standard data formats like JSON (JavaScript Object Notation) or XML (eXtensible Markup Language) to exchange data.

What are examples of API use cases?

APIs allow software development teams to integrate applications created in different programming languages and to make data and functions easily available between applications. For example, a rideshare application might use a maps API to incorporate mapping functions from another application that let users view the location of the arriving driver. APIs are important for managing multiple social media accounts from one dashboard, or for connecting Internet of Things (IoT) devices like smart watches, digital assistants, and smart home appliances. Stockbrokers rely on applications that use APIs to access real-time information about financial markets and stock prices, and smartphone apps use APIs to capture photos and videos from the built-in camera. APIs may also enable organizations to take advantage of cloud-based solutions for a DNS firewall or DNS proxy.

What are the types of APIs?

There are many kinds of APIs:

  • Web APIs are used for building web and mobile applications and are accessed over the web using standard protocols such as HTTP.
  • Library APIs allow programmers to access libraries of code that can provide specific functionality as they build new applications.
  • Operating system APIs make it possible for software to interact with an underlying operating system.
  • Open APIs, or public APIs, are created by third-party developers and enable anyone to access and use a website or app.
  • Partner APIs allow communication between systems within companies and business partners that have a distinct relationship.
  • Private or internal APIs enable users within a company to move data between teams or to connect various internal apps and systems.
  • Composite APIs combine several APIs from multiple servers or sources to build a unified connection to a single system.
  • Web service APIs are interfaces between web browsers and web servers.
  • Cloud APIs allow cloud applications to communicate with one another.
  • Remote APIs enable applications running on different machines to interact by communicating remotely.

What is an API architecture or protocol?

APIs may be built with different protocols and architectural styles.

  • REST APIs, or APIs built on Representational State Transfer architecture, can scale easily and transfer data securely by managing requests through HTTP and by relying on statelessness, where no client content is stored on servers between requests.
  • SOAP, or Simple Object Access Protocol, makes it easier for apps in different environments or apps written in different languages to share data. SOAP APIs determine how data can be transmitted across networks, how messages can be sent, and what messages should include.
  • RPC APIs use Remote Procedure Call to execute code on remote networks.
  • GraphQL is an open-source query language that minimizes the number of round trips between clients and servers, which can be helpful for applications that run on slow or unreliable connections. GraphQL APIs allow clients to get the data they need by engaging a single API endpoint, rather than chaining multiple requests together.
  • Webhooks are involved in implementing event-driven architectures, where requests are automatically sent as a response to event-based triggers..

What are the benefits of APIs?

For many companies, APIs are business-critical assets that help to digitize processes, enable automation, accelerate workflows, connect people and applications, and innovate new products and services. APIs can help deliver exceptional customer experiences and enhance operational agility.

What is an API gateway?

An API gateway is an application that receives requests, processes them, delivers them to the appropriate server, and returns data back to the user or application that requested it. API gateways provide a centralized point for managing, securing, and optimizing API calls/requests and responses.

What are threats to APIs?

APIs are attractive to attackers because they often contain the keys to valuable information. When not adequately secured, APIs can potentially expose a great deal of sensitive data. Hackers often look to target APIs that are built and deployed without sufficient security measures, as well as legacy APIs that are not regularly updated. Malicious actors may use APIs to gain access to sensitive data, to disrupt services, or to hijack systems.

What is API sprawl?

As digital technologies like cloud computing and microservices continue to expand, the rapid growth of applications has resulted in API sprawl — where the number of APIs is increasing exponentially, and inconsistencies in design and API documentation standards make API management more difficult. API sprawl makes it more difficult for security teams to properly implement and manage security policies, resulting in greater risk to the organization.

What is API discovery?

API discovery is the process of identifying and cataloging all the APIs within an organization’s digital footprint along with their associated endpoints, functions, and data structures. API discovery is essential to avoiding redundancy, identifying security risk, documenting APIs, and ensuring integration and interoperability.

What is API security?

API security practices involve discovering and tracking all APIs within a digital ecosystem, identifying vulnerabilities that exist within each API, leveraging existing security solutions, and establishing a blanket set of security policies that govern and protect all APIs. API protection solutions may include API testing, a web application firewall, encryption, Zero Trust architecture, behavioral analytics, solutions for API gateway security, OpenAPI security, and managed threat hunting.

Why customers choose Akamai

Akamai is the cybersecurity and cloud computing company that powers and protects business online. Our market-leading security solutions, superior threat intelligence, and global operations team provide defense in depth to safeguard enterprise data and applications everywhere. Akamai’s full-stack cloud computing solutions deliver performance and affordability on the world’s most distributed platform. Global enterprises trust Akamai to provide the industry-leading reliability, scale, and expertise they need to grow their business with confidence.

Explore all Akamai security solutions