The World of REST APIs
The World of REST APIs
REST APIs introduce a lightweight, low-cost way to connect devices and exchange data between applications. Here we look at the history and future of web APIs.
Join the DZone community and get the full member experience.Join For Free
Continue to drive demand for API management solutions that address the entire API life cycle and bridge the gap to microservices adoption.
A new breed of web API has emerged, delivering a vision of a lightweight, low-cost approach to connect devices and allowing applications to exchange data efficiently.
First, let's check the history for APIs, then the usages today and see how are REST APIs are different and think about the future of REST APIs.
History of Web APIs
In 2013 the success of web APIs is not just technical. We can learn about many other, less-obvious aspects of web APIs by studying the past and looking at why some of the pioneers of web APIs were successful.
As soon as the first dot-com bubble burst, platforms were looking for innovative ways to syndicate products across eCommerce websites. Web APIs, built on the backs of existing HTTP infrastructure, proved the right tool for the job.
A handful of tech pioneers stepped up to define the earliest uses of web APIs for sales and commerce management, kicking off a 10-year evolution that we can now view as the early history of web APIs.
As API-driven commerce platforms were still getting their footing and understanding the best way to use APIs, a new breed of technology platforms emerged in the areas of content and messaging on the web in a way that was user-centric and socially enabling.
Publishing user-generated content and sharing web links, photos, and other media via APIs emerged with the birth of new social platforms between 2003 and 2006.
These new API-driven social platforms would take technology to new heights and ensure that applications from here on would always contain essential social features that were defined via their platform APIs.
This proved that social was the critical ingredient the API industry needed if it was to mature.
As APIs were generating social buzz across the internet, Amazon saw the potential for a RESTful approach to business, internalized. It gave birth to an API approach that was more than just eCommerce.
It would reinvent the way we compute.
Amazon transformed the way we think about building applications on the web. What we now know as cloud computing changed everything and made the mobile, tablet, sensor, and other emerging API-driven concepts a reality.
With the introduction of iPhone and Android smartphones, APIs would evolve from powering eCommerce, social, and the cloud to delivering valuable resources to the mobile phones that would rapidly become commonplace.
APIs make valuable resources modular, portable, and distributed — a perfect channel for developing mobile and tablet applications.
A wealth of mobile applications would emerge, focusing on delivering features that were unique to a mobile audience, pushing API usage to new levels.
Understanding history is critical to understanding where we are going, and there are many important lessons to be learned from the approach of web API pioneers.
If early technologists had had their way, APIs would have been solely successful in the period of commerce. But with the radical innovation of a handful of companies, we now understand that APIs needed several other essential ingredients to succeed: commerce, social, cloud, and mobile.
REST APIs are about delivering valuable, meaningful, scalable, and distributed resources across the world wide web, and these ingredients were necessary to fully deliver on this vision.
What are APIs Used for Today?
The many shapes and sizes of this new wave of web APIs allow them to be used in an increasing number of ways. APIs in their simplest form allow the transmission of data, much like you’d share data within a spreadsheet by emailing it to one or many co-workers.
But in this case, it’s for applications. In more advanced approaches you see APIs deployed to deliver video, audio, and telephony services via smartphones, televisions, or internet-enabled kiosks.
The most popular approach to APIs is the open-data movement. Using web APIs, data owners can easily expose information from data silos, allowing public or private access to large and small datasets.
This read and sometimes write access to data is a favorite among developers, providing them free or low-cost access to data that they don’t have to gather, curate, and organize.
Open data has picked up significant momentum within city, state, and federal governments. It provides access to public data assets ranging from census data to U.S. postal service zip codes.
APIs provide access to data and content, enabling a new, distributed approach to website development. Rather than hand coding websites and their content, developers can pull data and content via APIs, then mashup and publish across web pages and applications they author.
In 2003 much of the content on a web page likely came from a database source, but in 2013 a single web page will likely show content, advertising, links, and widgets that could be pulling the information from multiple API-driven sources.
APIs have allowed technology giants like Amazon and eBay to drive content on their own web properties as well as establish armies of affiliate and partner electronic storefronts that are updated through centralized API sources.
APIs have been a driving force in the expansion of the world wide web, but the introduction of the iPhone in 2007 and the resulting developer-and-application ecosystem proved that the power of APIs is not just to deliver data and content to websites. APIs could also provide the resources to drive the next generation of applications that would be consumed via a wave of smartphones and tablets.
Developers discovered that APIs were a perfect way to deliver the bits and bytes needed to craft the mobile-user experience but also sync users’ increasingly online experience via what was becoming known as the cloud.
As our lives become more internet-connected via our mobile devices, a parallel connectivity would naturally emerge via the other device that plays a leading role in our daily lives: the automobile. Major automakers like Ford, GM, and even newcomer Tesla have acknowledged the potential of internet enabled vehicles and the efficiency of using web APIs to deliver rich data, content, and media to drivers and passengers.
APIs provide a real-time, geo-aware experience in vehicles that allows users to navigate, listen to internet-streaming music, and even interact with the road, signs, and businesses around them
via an emerging ecosystem of API-driven networks, services, and resources.
Homes and Buildings
Originally the internet reached the world via desktop computers in homes and businesses. Migrating beyond those spaces via mobile devices, the internet is experiencing renewed growth. The internet is penetrating homes and offices via a wealth of internet-connected devices, known as the internet of things (IoT). The internet is being embedded in every aspect of technology in ways unimaginable just ten years ago.
Manufacturers are making thermostats, lighting, climate control, energy, entertainment, security, and every other aspect of residential and commercial infrastructure internet-enabled. IoT providers are taking advantage of existing approaches to web API, developer ecosystems, and the availability of smartphone devices to give the masses control over their homes and work environments in new and exciting ways.
Why are REST APIs Different?
Even with its 30-year history, something about the current approach of employing APIs over the world wide web is different.
Web APIs resemble their earlier incarnations, but they have escaped those earlier technology overlords that looked to keep them strictly as a programmatic interface. The latest generation
of mobile and web developers is accessing resources in ways that previous developers couldn’t imagine without the introduction of the internet, the cloud, and mobile devices.
They Build on Existing Web Architecture
Earlier APIs required custom technology, protocols, and often costly implementations to deploy, manage, and operate. Web APIs build on existing web technology, specifically the HTTP protocol that the world wide web employs to deliver content around the globe.
This reuse of existing architecture enables cost-effective and rapid deployment of API-driven platforms: no new technology investment is needed.
A particular methodology call REST, defined around 2000, provides a blueprint that is used as the current definition of web APIs.
This model is being iterated upon with new definitions like Hypermedia and using the latest HTML5 standards like WebSocket. By using existing web architecture to deploy APIs, businesses can focus on delivering the best resources to web and mobile applications, alongside existing investments they have made for earlier websites and applications.
APIs are meant to enable software applications to talk with one another, but ultimately humans must build these applications and define their interactions.
The recent explosion in the adoption of web APIs is because the latest generation of APIs can define data and resources in intuitive ways that humans can read and understand. Web users understand the concept of the URL and URI even without fully understanding the technology behind it.
Web APIs build on the same awareness to provide access to resources and data, creating a more intuitive approach to sharing and accessing information. In online ecosystems where developers have a wide range of choices, they are more inclined to select API resources that are intuitive and don’t require huge amounts of time and investment to understand.
In a world swimming in a sea of technology solutions, simplicity rules. Earlier incarnations of APIs were technical, often bloated interfaces that only the savviest of technologists could use. Web APIs, employing proven web patterns, are delivering extremely simple, lightweight approaches to data and resource sharing. Some API providers still employ complex technical interfaces, but web API providers, who go the extra mile to simplify interfaces and reduce friction in adoption, are emerging as the leaders in this fast-paced online environment.
Easy to Understand for Developers or Even Non-Developers
Developers are quickly becoming web and mobile literate, understanding software development in terms of the internet. Web APIs provide simple and intuitive access to resources developers need to solve the challenges they face.
Web APIs use intuitive URIs to access resources in ways that any web-literate user can take advantage of, making API-driven resources accessible to a wider developer audience and even a
non-developer audience. They bring valuable resources and assets closer to the owners seeking solutions.
APIs provide data and resources up to multiple channels including web, mobile, and other devices. They also provide easy access via known tools like spreadsheets and embeddable widgets, expanding the audience of API consumers beyond developer communities.
A common approach to delivering API resources is employing a self-service environment. While resources can still be secured as desired, APIs can be accessed 24/7 via a dedicated portal, allowing
consumers to register and gain access without the need to talk to sales or other onboarding teams.
When developing web and mobile applications, developers are finding success by quickly finding the resources they need to make their apps a reality — all without the bottleneck of requesting access or purchasing licenses.
Self-service APIs have become the norm. Developers expect that resources ranging from data to compute to storage will be available at any time and in any volume they are willing to pay for.
The Future of Web APIs
The world of web APIs is evolving quickly. Emerging trends are rapidly shaping how APIs are provided and consumed. API usage is evolving, further connecting the data and resources we need to build the next generation of web and mobile apps. While all these are getting answers by the industry, the REST API Development itself should also be considered an evolving area, starting from mocking, documentation, client portals, and more.
Developers are depending on more APIs to drive web and mobile applications. Even with the simplicity of individual web APIs, developing an application around multiple APIs can be costly and time consuming.
In the course of developing a common mobile application a developer may end up using 10 to 15 APIs — for storage, images, email, SMS, voice, and so on — increasing development costs with each addition.
New approaches to the aggregation of multiple APIs into a single interface or stack for developers to use are addressing this problem by standardizing interfaces and objects across potentially disparate and numerous API platforms.
Technology has changed the pace of how markets operate. Real-time information has become the new default. We get push notifications when our friends post new tweets or Facebook wall posts. Our news, stock, and sports information streams to us in real time. With the internet available in anyone’s pocket, the opportunity for real-time interaction with what is important to everyone exponentially increases.
Real-time approaches to deploying APIs use technological building blocks like PubSubHubbub, WebSocket, and Webhooks, and they can be as simple as sending an SMS or email to signal an update.
Backend as a Service (BaaS)
Backend as a Service (BaaS), also known as Mobile Backend as a Service (MBaaS), is an emerging trend in mobile application development.
With the growth in the number of mobile devices, BaaS providers are
emerging to meet demands by efficiently building, deploying, and managing the mobile app lifecycle.
This new breed of BaaS services is provided via custom software development kits (SDK) and application programming interfaces (APIs), resulting in a global market that is estimated to grow from $216.5 million in 2012 to $7.7 billion in 2017, according to a report published by MarketsandMarkets.
Businesses and individuals moving more of their lives into the cloud require more automation of the tasks that keep these disparate worlds connected.
Users don’t just need to sync the individual information silos. They need to automate the transfer of information and resources. Many of the common cloud platforms have RSS and APIs that allow a new type of automation platform to emerge, providing new ways to extract, transform, and publish information and data across the web and devices.
We remain a verbal society. Even though the keyboard and mouse are the default input for the online world, many people now have an internet-connected device in their pockets, so the opportunity for voice search and other audio-based online interactions has grown significantly.
Voice is nothing new as a computer interface. But the pieces were not in place for success until Apple’s Siri ushered in an approach for using voice as a tool not only for searching but also for interacting with the online world in real time.
APIs will be the channel in which voice finds the data and information it needs to fulfill requests made by mobile and web users around the globe.
Internet of Things
While web APIs are transforming many industries, many opportunities are also emerging within the internet of things (IoT): internet connectivity applied to everyday objects. This new area of connected devices has an immense opportunity to impact our lives via automobiles, homes, and building connections, but it is also expanding to manufacturing with 3D printing and to health and fitness through the quantified-self movement.
APIs will play a central role in connecting common objects to the internet, a territory that is largely unexplored.
Published at DZone with permission of Guy Levin , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.