Software Design Modules
Software Design Modules
COURSE INTENDED On the completion of the course, student is expected to be able to do the
LEARNING OUTCOMES: following:
II. OBJECTIVES: By the end of this module you should be able to:
APIs let your product or service communicate with other products and
services without having to know how they’re implemented. This can
simplify app development, saving time and money.
IV. CONTENTS:
Lesson Coverage:
Introduction to API
API stands for Application Programming Interface. In basic terms, APIs are a set of functions and procedures that
allow for the creation of applications that access data and features of other applications, services, or operating
systems.
The API is not the database or even the server, it is the code that governs the access point(s) for the server.
APIs are the little pieces of code that make it possible for digital devices, software applications, and data servers
to talk with each other, and they’re the essential backbone of so many services we now rely on.
Digging deeper, an easy way to understand the definition of an API is to think about the applications that you use
every day. In an internet-connected world, web and mobile applications are designed for humans to use, while
APIs are designed for other digital systems and applications to use.
Websites and APIs both do the same things, like return data, content, images, video, and other information. But
APIs don’t return all the details that are needed to make things look pretty for the human eye—you only get the
raw data and other machine-readable information needed behind the scenes to put the resources being delivered
to work, with very little assistance from a human.
“API integration” is a pretty common Google Search term, and we have good news. The whole reason APIs exist
is to support integration. API integration is simply the connection between two (or more) applications, programs,
services, or systems, using APIs. Applications use APIs to send and receive data and content between each other.
HISTORY
In order to understand why APIs are so important, we’ll need to take a look at how we got here. While web APIs
have a relatively brief history, it’s resulted in them being behind almost every aspect of how we do business
online. When you hear the acronym “API” or its expanded version “Application Programming Interface,” it is
almost always in reference to our modern approach, in that we use HTTP to provide access to machine readable
data in a JSON or XML format, often simply referred to as “web APIs.”
APIs have been around almost as long as computing, but modern web APIs began taking shape in the early 2000s.
A popular dissertation on REST by Roy Fielding and a handful of emerging technology companies including
Salesforce, eBay, and Amazon, led to the definition of web APIs we use today.
Commercialization of API
Web APIs got their start by putting the “commercial” in “.com”, powering the vision of emerging commerce
startups looking to change the way we do business on the web. They took advantage of this new medium to make
products and services available to customers via a single website, and ensure that partners and third-party resellers
could extend the reach of their platforms. And so, began the push to automate much of the commerce that was
powering the web.
The commerce age of web APIs was dominated by three companies: Salesforce, eBay, and Amazon. Twenty
years later, they remain commercial powerhouses and continue to shape the world of APIs.
Salesforce – Salesforce officially launched its API on February 7, 2000 at the IDG Demo conference. This
introduced an enterprise-class, web-based, Salesforce automation: “Internet as a Service.” XML APIs were a
fundamental part of how Salesforce did business from day one.
eBay – On November 20, 2000, eBay launched the eBay Application Program Interface (API) along with the
eBay Developers Program. These were originally rolled out to only a select number of licensed eBay partners and
developers, but ultimately shifted how goods are now sold on the web.
Amazon – On July 16, 2002, Amazon launched Amazon.com Web Services. This allowed developers to
incorporate Amazon.com content and features into their own websites, and let third party sites search and display
products from Amazon.com in an XML format.
These three companies forever changed how we do business online. In 2019, they still dominate the API playing
field and impact the commercial landscape. They’ve evolved their businesses while simultaneously transforming
the commercial landscape by being more organized, agile, and efficient when it comes to APIs. They’ve made
them available to partners and third-party providers, who have in turn enabled them to grow, evolve, and lead the
conversation in the industries they’ve come to dominate.
In 2004, a shift in the API landscape began to emerge. Salesforce, eBay, and Amazon continued to iterate and
evolve their own API efforts, but a new breed of API providers started to pop up. This new group changed how
we use the web and share information with the people around us, both in the real world and virtually. These new
APIs weren’t as directly linked to commercial value as their counterparts, but they provided value to their
organizations, and became lucrative platforms down the road.
Around this time there were four major developments that set the stage for the incredible growth that happened
from 2006 through 2012.
Delicious – In 2003, a new service for storing, sharing, and discovering web bookmarks emerged called
del.icio.us. It allowed you to view them via a web interface, but if you changed the extension from “.html” to
“.xml” you’d receive a machine-readable list of your bookmarks. Developers took advantage of this by building
widgets and other embeddable features fit for the budding field of social media.
Flickr – In February 2004, the popular photo sharing site Flickr launched. Six months later they produced their
now infamous API, which allowed users to easily embed their photos on web pages and social media. Flickr
quickly became the image platform of choice for the emerging social media movement.
Facebook – In August 2006, Facebook launched its long-awaited development platform and API. Version 1.0
allowed developers to access Facebook users’ friends, photos, events, and profile information, and helped
Facebook become of the most popular social networks to date.
Twitter – In September 2006, Twitter introduced its own API in response to developers increasingly scraping
content and data from the platform. Twitter incorporated APIs into almost every feature of the product we know
today, from its mobile application to the share button.
It took another couple of years, but by 2010, social media had overtaken the population, and APIs formed the
backbone. APIs became how we connected with friends and developed business networks, shared images and
video, and relayed stories from our personal and professional lives. Facebook and Twitter dominated, all while
relying heavily on their communities, third party developers, and advocates to expand their reach, grow their
audience, and set the stage for a new generation of social influence powered by APIs.
In 2007, Apple launched the iPhone. It radically changed not only how we engaged with our mobile phones, but
how we engaged with the online world. In that same year, Google responded by launching Android: an open
source mobile platform. These developments spurred a massive investment in new startups looking to provide
much-needed resources and applications to meet the growing public demand. A few of these API-first startups
became the blueprint for how APIs are delivered today.
Google Maps – In 2006, Google launched a new mapping solution called Google Maps. Six months later, the
Google Maps API was made available in direct response to the number of rogue applications that were built by
reverse engineering and hacking the JavaScript application. Location became a major topic of the API
conversation that we were about to have on every mobile device sold in the next couple of years.
Foursquare – In March 2009, foursquare launched at the SXSW interactive festival in Austin, TX. Foursquare
was a location-based mobile platform that made cities more interesting to explore. Users collect points and virtual
badges in return for checking in and sharing their location with friends. This was a brand-new type of mobile app,
utilizing APIs to deliver a new generation of location-aware, API-driven applications.
Instagram – The mobile evolution of the Internet was underway when on October 6, 2010, Instagram launched
its photo-sharing iPhone application. Less than three months later, it had one million users. Instagram focused on
delivering a powerful but simple iPhone app that solved common problems with the quality of mobile photos as
well as user frustration around sharing them.
Immediately, many users complained about the lack of an Instagram API. One developer took it upon himself to
reverse engineer how the iPhone app worked, and built his own unofficial Instagram API on top of private
Instagram APIs in December. By January, Instagram had shut down the rogue API, but had also announced that
it was building one of its own.
Twilio – In 2007, a new API-as-a-product platform launched called Twilio. This introduced a voice API, which
allowed developers to make and receive phone calls via any cloud application, and capitalized on the growing
need for voice-enabled apps. Over the next decade,
Twilio became synonymous with the essential resources we need on our phones like voice, SMS, email, and other
messaging and communication applications.
The mobile evolution of the web made APIs what they are today. Commerce, social, and the Cloud laid the
foundation, but mobile put the web in our pockets. Our phones enabled us to take more photos, record new videos,
and share more stories. API-powered mobile applications have led to waves of evolution not just in mobile
phones, but in any object that can be connected to the Internet. They’ve opened up entirely new frontiers when it
comes to how we create, transmit, store, and share data online.
An API is a set of defined rules that explain how computers or applications communicate with one another. APIs
sit between an application and the web server, acting as an intermediary layer that processes data transfer between
systems.
A client application initiates an API call to retrieve information—also known as a request. This request is
processed from an application to the web server via the API’s Uniform Resource Identifier (URI) and includes a
request verb, headers, and sometimes, a request body.
After receiving a valid request, the API makes a call to the external program or web server.
The server sends a response to the API with the requested information.
While the data transfer will differ depending on the web service being used, this process of requests and response
all happens through an API. Whereas a user interface is designed for use by humans, APIs are designed for use
by a computer or application.
APIs offer security by design because their position as middleman facilitates the abstraction of functionality
between two systems—the API endpoint decouples the consuming application from the infrastructure providing
the service. API calls usually include authorization credentials to reduce the risk of attacks on the server, and an
API gateway can limit access to minimize security threats. Also, during the exchange, HTTP headers, cookies, or
query string parameters provide additional security layers to the data.
For example, consider an API offered by a payment processing service. Customers can enter their card details on
the frontend of an application for an ecommerce store. The payment processor doesn’t require access to the user’s
bank account; the API creates a unique token for this transaction and includes it in the API call to the server. This
ensures a higher level of security against potential hacking threats.
Whether you’re managing existing tools or designing new ones, you can use an application programming interface
to simplify the process. Some of the main benefits of APIs include the following:
Improved collaboration: The average enterprise uses almost 1,200 cloud applications (link resides outside of
IBM), many of which are disconnected. APIs enable integration so that these platforms and apps can seamlessly
communicate with one another.
Through this integration, companies can automate workflows and improve workplace collaboration. Without
APIs, many enterprises would lack connectivity and would suffer from informational silos that compromise
productivity and performance.
Easier innovation: APIs offer flexibility, allowing companies to make connections with new business partners,
offer new services to their existing market, and, ultimately, access new markets that can generate massive returns
and drive digital transformation.
For example, the company Stripe began as an API with just seven lines of code. The company has since partnered
with many of the biggest enterprises in the world, diversified to offer loans and corporate cards, and was recently
valued at USD 36 billion (link resides outside of IBM).
Data monetization: Many companies choose to offer APIs for free, at least initially, so that they can build an
audience of developers around their brand and forge relationships with potential business partners. However, if
the API grants access to valuable digital assets, you can monetize it by selling access (this is referred to as the
API economy).
When AccuWeather (link resides outside of IBM) launched its self-service developer portal to sell a wide range
of API packages, it took just 10 months to attract 24,000 developers, selling 11,000 API keys and building a
thriving community in the process.
Added security: As noted above, APIs create an added layer of protection between your data and a server.
Developers can further strengthen API security by using tokens, signatures, and Transport Layer Security (TLS)
encryption; by implementing API gateways to manage and authenticate traffic; and by practicing effective API
management.
Types of APIs
Nowadays, most application programming interfaces are web APIs that expose an application's data and
functionality over the internet. Here are the four main types of web API:
Open APIs are open source application programming interfaces you can access with the HTTP protocol. Also
known as public APIs, they have defined API endpoints and request and response formats.
Partner APIs are application programming interfaces exposed to or by strategic business partners. Typically,
developers can access these APIs in self-service mode through a public API developer portal. Still, they will need
to complete an onboarding process and get login credentials to access partner APIs.
Internal APIs are application programming interfaces that remain hidden from external users. These private APIs
aren't available for users outside of the company and are instead intended to improve productivity and
communication across different internal development teams.
Composite APIs combine multiple data or service APIs. These services allow developers to access several
endpoints in a single call. Composite APIs are useful in microservices architecture where performing a single task
may require information from several sources.
Karyavin B (2015). Signal and image processing for remote sensing. USA: Pearson
Education Inc.
DISCLAIMER
Every reasonable effort is made to ensure the accuracy of the information used in the creation of this
reference material, without prejudice to the existing copyrights of the authors. As an off-shoot of the innumerable
difficulties encountered during these trying times, the authors endeavored to ensure proper attribution of the
esteemed original works, by way of footnotes or bibliography, to their best abilities and based on available
resources, despite the limited access and mobility due to quarantine restrictions imposed by the duly constituted
authorities.
COPYRIGHT NOTICE
Materials contained in the learning packets have been copied and conveyed to you by or on behalf of
Pamantasan ng Cabuyao pursuant to Section IV - The Copyright Act (RA) 8293 of the Intellectual Property Code
of the Philippines.
You are not allowed by the Pamantasan ng Cabuyao to reproduce or convey these materials. The content
may contain works which are protected by copyright under RA 8293. You may be liable to copyright infringement
for any copying and/ or distribution of the content and the copyright owners have the right to take legal action
against such infringement.