专栏首页用户4822892的专栏What are APIs? Types of APIs

What are APIs? Types of APIs

APIs have been revolutionizing the world since the birth of first-generation computers but they were not coded in high-level languages as they are being done today. The APIs are core concepts of programming which every programmer has to learn for achieving working levels of proficiency. As of now, APIs have reached a high level of sophistication which needs to be classified into types of APIs to get a good level of understanding.

What are APIs? Types of APIs

APIs are an acronym for Application Programming Interface which means a set of functions and procedures allowing the creation of applications that access the features or data of other application, service or an operating system.

In layman terms, APIs are pipelines which connect applications these connections are done using the features of another application into the main application, In APIs types of messages, are defined which will be communicated through these APIs.

Read: "What is an API and How it works?"

For example, many websites show the live feed from twitter so they use APIs from twitter on their website to fetch and display the live feed.

Types of APIs

The classification of APIs can be done on three parameters which are listed as follows:

Ownership types of Web APIs

On Ownership level there are four main types of APIs:

  • Open APIs: These APIs are publicly available to use like Oauth APIs from Google and there is no restriction to use them. Hence, they are also known as Public APIs.
  • Partner APIs: Specific rights or licenses in order to access this type of API because they are not available to the public. Usually, these kinds of APIs are associated with paid services.
  • Internal APIs: The APIs that are developed by companies to use into their internal systems so that they can enhance the productivity of development teams where one team can use services from another project of the company is called Internal APIs. These APIs are also known as Private APIs.
  • Composite APIs: Both processes and composite APIS are a sequence of tasks but composite APIs combines different data and service APIs. It is a sequence of tasks that run synchronously as a result of the execution where the result of triggering of a Composite API is the result of the execution and not the request that will contain the result of the execution at the request of a task. Its main usage is to speed up the process of execution and improve the performance of the listeners in the web interfaces.

Communication level of APIs

  • High-Level APIs

High-level APIs are those that we use generally in REST form where programmers have a high level of abstraction and they are only concerned about performing a limited functionality.

  • Low-Level APIs

Low-level APIs have a lower level of abstraction hence they are most detailed, which allows the programmer to manipulate functions within an application module or within hardware at a granular level. Usually, Low-level APIs are used in sending the real-time video or media feed in response to a trigger like Vulkan APIs.

Web service APIs

In web service APIs the classification is done on the type of communication and behavioural approach used in building APIs:

  • SOAP
  • REST

Web service APIs are small applications that use URLs or web addresses on the internet to provide their services to desktop, mobile, web applications and others.

  • SOAP

SOAP (Simple Object Access Protocol) APIs are more complex than its peers. These APIs have their own communication protocol called Simple Object Access Protocol which makes them a bit more defining than REST in terms of the level of security and the approach to how messages are sent. SOAP offers comprehensive security, built-in ACID (Atomicity, Consistency, Isolation, Durability) compliance and retry logic for reliable messaging functionality which makes it a more suitable for enterprise application which deals with banking transactions, LDAP interaction and more.

Read: "Monolithic vs Microservice Architecture- Pros and Cons"

SOAP is a standardized protocol which uses only proprietary XML format for transferring structured information that’s more function-driven. The APIs are used to send payloads which is data, its type and communication preferences. Since SOAP uses XML to send payloads hence it requires more bandwidth. In addition to SSL support SOAP uses WS-Security, which is great at the transport level and a bit more comprehensive than SSL. Due high level of security SOAP-based calls cannot be cached. SOAP is closely coupled with the server, having a strict communication contract with it which makes it more difficult to make changes or updates. Interacting with a SOAP API needs knowledge about everything even before you can even initiate an interaction.

Read: "Top Web Development Technologies and Frameworks"

SOAP has built-in ACID compliance which reduces anomalies and protects the integrity of a database by prescribing exactly how transactions can interact with the database. ACID is much better than data consistency models. ACID is used in structural databases like Oracle’s SQL database to deal with banking transactions and inventory management in behemothic eCommerce platforms.

SOAP has successful/retry logic built-in and provides end-to-end reliability through SOAP intermediaries.

The use case where you want to use SOAP API in building an application is only the desire to achieve a high level of security.


XML-RPC (Extensible markup language – Remote Procedure Calls) is a protocol that uses a specific XML format to transfer data. XML-RPC uses minimum bandwidth and is much simpler and older than SOAP.


JSON-RPC (JavaScript Object Notation) is a protocol which uses JSON format to transfer data. The RPC calls are one of the methods that are used by services to communicate in a microservice architecture.

  • REST

REST (Representational State Transfer) is a more data-driven architectural style that we use in building REST APIs. REST APIs are based on URIs (Uniform Resource Identifier) HTTP protocol, and the use of JSON for a data format, which is super browser-compatible. REST APIs can be simple to build and scale as compared to other types of APIs.

  • REST APIs facilitates client-server communication with simplicity.
  • REST APIs uses SSL security which means it can use HTTPS.
  • REST APIs uses different data formats including plain text, HTML, XML, and JSON sending payload which is a great fit for data and yields more browser compatibility.
  • The usage of simpler data formats makes the payloads lighter which makes REST APIs be a better fit for a broader range of applications.
  • REST APIs use a single uniform interface. This simplifies how applications interact with the API by requiring they all interface in the same way, through the same portal. This has advantages and disadvantages.
  • REST calls can be cached.
  • REST APIs are best for reliability and scalability.

The reasons why you may want to build an API to be RESTful because it includes resource limitations, fewer security requirements, browser client compatibility, discoverability, data health, and scalability.

Read: "What is Serverless Web Application Development?"

Here’s some bonus info for reading the whole article

What does stateless mean in REST?

In REST (Representational “State” Transfer) architecture it is defined that the server does not store any state about the client session on the server-side. This restriction is called Statelessness. Each request from the client to server must contain all of the information necessary to understand the request and it cannot take advantage of any stored context on the server. The Session state is therefore kept entirely on the client. The client is responsible for storing and handling all application state-related information on client-side. It also means that the client is responsible for sending any state information to the server whenever it is needed. So, there should not be any session affinity or sticky sessions on the server.

本文转载自: https://www.decipherzone.com/blog-detail/Types-of-APIs复制
如有侵权,请联系 cloudcommunity@tencent.com 删除。
登录 后参与评论
0 条评论


  • Elasticsearch Search APIs


  • 初识--Web APIs

    API(Application Programming Interface,应用程序编程接口)是一些预先定义的函数,目的是提供应用程序与开发人员基于某软件或硬件...

  • Kubernetes Service APIs 介绍

    Kubernetes 服务 APIs(Service APIs)是由 SIG-NETWORK 社区管理的开源项目,项目地址:https://github.com...

  • Kafka-1.APIS


  • 理解 .NET 6 Minimal APIs

    .NET 6,微软称为“最快的.NET”,带有了许多令人兴奋的新功能、语言和性能改进。这是自 .NET Core 3.1 以来的第一个 LTS 版本,将支持三年...

  • 【译】gRPC vs HTTP APIs

    本文翻译自 ASP.NET Blog | gRPC vs HTTP APIs,作者 James,译者 Edison Zhou。

    Edison Zhou
  • PowerBI REST APIs好玩吗?

    最近几天一直在研究PowerBI REST APIs,调用API来做一些事情是非常有趣的。我呢,主要有两个目的:

  • RESTful Web APIs设计风格

    RESTful(Representational State Transfer,简称REST)是一种网络Web程序的设计风格和开发方式。

  • 怎样用Google APIs和Google的应用系统进行集成(1)—-Google APIs简介

    Google的应用系统提供了非常多的应用,比方 Google广告。Google 任务,Google 日历。Google blogger,Google Plus,...

  • What are the types of sampling in hive ?

    This recipe explains what are the types of sampling in hive.

  • O API - REST APIs的替代品


  • Pytest基础指南之APIs集


  • Earshot Builds with Watson APIs to Enhance its Marketing

    Social Media IS Big Data. On any given day more than 500 million tweets and 55 m...

  • Python 函数库 APIs 编写指南

           - 设置参数位置,将最常用的参数放在前面,将相似的放在一起。例如:JavaScript 的 history.pushState 函数的默认参数顺序...

  • Python 函数库 APIs 编写指南

  • 通过 Traefik 使用 Kubernetes Service APIs 进行流量路由

    前面我们已经介绍了 Kubernetes 社区内部为 Kubernetes 开发了一种改进的定义和管理入口流量的新接口,也就是新的 Kubernetes Ser...

  • What is API Testing, Types & Benefits?


  • What is API Testing, Types & Benefits?

    API Testing is basic for the product frameworks to perform at best quality. Here...