6 min read

APIs and Blockchain: Friend or Foe

Aug 9, 2021 8:00:00 AM

The emergence of blockchain has been synonymous with the rise of crypto. However, blockchain is revolutionizing many aspects of technology, such as supply chains, data management, and security. It operates in similar areas to APIs – which commands the question, can APIs and blockchain work together, or do they clash? 

Before we get into that question, we need to understand the two concepts and how they work:

Definition of APIs 

In a previous post on API integration, we defined APIs as: 

“API stands for Application Programming Interface. At DiCentral, we define API as the bridge connecting and integrating all of the data, applications, and devices used by a company’s employees, partners, and customers. 

“While APIs may be invisible to most of us, they serve as an essential cog in the mechanism that allows companies to communicate efficiently with customers. This is illustrated by the fact 75% of individuals believe their company’s API has significantly enhanced the customer experience.” 

In essence, APIs serve as an advanced data management solution for businesses working with multiple applications and programs. In the digital era, where cloud technology is increasingly pre-eminent, companies need to be able to integrate different platforms to complete processes.  

APIs have served a pivotal role in the digital transformation of companies, enabling them to transition from expensive on-premise software to more cost-effective cloud solutions. 

Definition of Blockchain 

Blockchain is a means of storing and managing data in a different way. An excel document, for example, is suitable for handling a limited amount of data for an individual or small group of people. Larger databases tend to be held on cloud platforms that can be accessed by a larger group of people and be managed more dynamically - SAP, Oracle, and Microsoft Azure are all examples of advanced data management systems. 

Blockchain works by breaking up this data into blocks. Each block contains a limited amount of data, and when it becomes full, another block is created, forming a chain. As Investopedia explains: 

“A database structures its data into tables whereas a blockchain, like its name implies, structures its data into chunks (blocks) that are chained together. This makes it so that all blockchains are databases, but not all databases are blockchains. This system also inherently makes an irreversible timeline of data when implemented in a decentralized nature. When a block is filled, it is set in stone and becomes a part of this timeline. Each block in the chain is given an exact timestamp when it is added to the chain.” 

The other aspect is the decentralized approach of blockchain. Where most data management platforms have an element of centralization - funneling the data to one place - blockchain is entirely decentralized. 

The best way to explain this is to use the most famous application of blockchain - cryptocurrency. One of the features of crypto, like bitcoin, is they are supported by thousands of computers across multiple locations. The computers are managed by different individuals across the network and are called nodes.  

The idea is that not one person, or entity, can control the crypto - instead, being managed by thousands of “nodes” across the world who each have a stake in the decision-making and development of the crypto network.  

Are Blockchains and APIs Compatible? 

In short, yes.  

APIs and blockchains are forms of data management, allowing data to be organized and processed so that applications can use them. There are some key differences which we’ve covered already, but in essence, it is this: 

  • APIs have historically centralized data: The purpose of APIs is to collect data in different formats and deliver it to applications in a way they can be used. This involves funneling the data to a central point before being processed. Blockchain is entirely decentralized, with data being placed into blocks from the get-go.  
  • Blockchain is a democratic network: This is not an ideal or head in the clouds thinking. Blockchain operates with computers driving the network worldwide, with each person running that computer (nodes) having an equal vote. There is no central entity controlling the network, unlike APIs. 

However, the advance of blockchain has revolutionized the way APIs can be utilized. In the last five years, API networks like Aragon, Kyber, and Civic have been used to support blockchain projects, improving blockchain interoperability. 

For instance, because blockchain is decentralized, it can be challenging to track, monetize, and control the data. APIs can be used to process certain functions like transactions, governance, and security. These APIs can be “plugged” into specific blocks of the chain to facilitate those key processes. 

Driving the API Economy 

Blockchain technology is transforming the world we live in and will continue to do so. However, it’s not perfect. 

In its pure form, blockchain is a very inefficient way of managing data. It requires thousands of computers around the world, draining human and environmental resources. Bitcoin alone uses more power than countries like Argentina, Malaysia, and Sweden due to its blockchain network.  

The democratic nature of blockchain, widely regarded as one of its strengths, is also a weakness. Many networks have long development times because it needs to gain the approval of nodes before it can move ahead. In turn, this leads to mistakes taking a long time to be rectified. 

APIs can serve as a counter-balance to blockchain networks. It will not resolve all of its flaws, but APIs can play a pivotal role in the monetizing of blockchain, processing transactions, carrying out security checks, and enabling integration with other networks. 

The API economy is still very much alive and kicking. Blockchain has given APIs a platform for a new wave of innovation and growth. 

Peter Edlund

Written by Peter Edlund