Introduction to APIs

Introduction to APIs

What is an API?

API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other.

Application Programming Interfaces hide complexity from developers, extend systems to partners, organise code and make components reusable.

APIs are sometimes thought of as contracts, with documentation that represents an agreement between parties: if one party sends a remote request structured a particular way, this is how the second party’s software will respond.

Brief history

APIs emerged in the early days of computing, well before the personal computer. At the time, an API was typically used as a library for operating systems. The API was almost always local to the systems on which it operated, although it sometimes passed messages between mainframes.

After nearly 30 years, APIs broke out of their local environments. By the early 2000s, they were becoming an important technology for the remote integration of data.

Advantages of APIs

APIs let a product/service communicate with other products/services without having to know how they are implemented. This can simplify app development, saving time and money.
  • Since APIs simplify how developers integrate new application components into an existing architecture, they help business and IT teams collaborate
  • When designing new tools and products (or managing existing ones), APIs give flexibility and provide opportunities for innovation
  • They also simplify design, administration and use
  • APIs have become so valuable that they comprise a large part of many business’ revenue. Major companies like Google, eBay, Salesforce.com, Amazon, and Expedia are just a few of the companies that make money from their APIs. The ‘API economy’ refers to this marketplace of APIs

How do APIs work?

  • APIs are a simplified way to connect infrastructure through cloud-native app development, but they also allow data to be shared with customers and other external users
  • When you use an application on a mobile phone, the application connects to the internet and sends data to a server
  • The server then retrieves that data, interprets it, performs the necessary actions and sends it back to your phone
  • Your phone’s data is never fully exposed to the server, and likewise the server is never fully exposed to your phone. Instead, each communicates with small packets of data, sharing only what is necessary
  • The application then interprets that data and presents you with the information you wanted in a readable way. This is what an API is – all of this happens via API
How APIs work

Real-life API example

  • When you search flights online, you have a variety of options to choose from, including different cities, and departure and return dates
  • Once you’ve made your choices, in order to book your flight, you interact with the airline’s website to access their database and see if any seats are available on those dates and what the costs might be
  • However, you may not be using the airline’s website. You may be using a channel that has direct access to the information, for example, online travel service Expedia, which aggregates information from a number of airline databases
  • The travel service, in this case, interacts with the airline’s API. The API is the interface that can be asked by that online travel service to get information from the airline’s database to book seats and baggage options
  • The API then takes the airline’s response to your request and delivers it right back to the online travel service, which then shows the most updated, relevant information

API use case

Example scenario: your small business’ website has a form used to sign clients up for appointments. You want to give clients the ability to automatically create a Google calendar event with the details for that appointment.

API use: the idea is to have your website’s server talk directly to Google’s server with a request to create an event with the given details. The server then receives Google’s response, processes it, and sends back relevant information to the browser, such as a confirmation message to the user. Alternatively, the browser can often send an API request directly to Google’s server, bypassing your server.

How is this Google Calendar’s API different from the API of any other remote server out there? In technical terms, the difference is the format of the request and the response. To render the whole webpage, your browser expects a response in HTML that contains presentational code, while Google Calendar’s API call would just return the data (likely in a format like JSON). If your website’s server is making the API request, then your website’s server is the client (similar to your browser being the client when you use it to navigate to a website). From your users’ perspective, APIs allow them to complete the action without leaving your website.

Approaches to API release policies

  • Private: the API is only for use internally. This gives companies the most control over their API.
  • Partner: the API is shared with specific business partners. This can provide additional revenue streams without compromising quality.
  • Public: the API is available to everyone. This allows third-parties to develop apps that interact with your API and can be a source for innovation.

Public APIs and API integration

APIs are a longstanding concept in computer programming and they have been part of developers’ toolsets for years. Traditionally, APIs were used to connect code components running on the same machine. With the rise of ubiquitous networking, more and more public APIs (sometimes called open APIs) have become available.

Public APIs are outward facing and accessible over the internet, allowing you to write code that interacts with other vendors’ code online; this process is known as API integration. These kinds of code mashups allow users to mix and match functionality from different vendors on their own systems. For instance, if you use the marketing automation software Marketo, you can sync your data there with Salesforce CRM functionality.

‘Open’ or ‘public’ should not be interpreted as meaning ‘free of charge’ in this context. You still need to be a Marketo and Salesforce customer for this to work. However, the availability of these APIs makes integration a much simpler process than it otherwise would be.

Remote APIs

Remote APIs are designed to interact through a communications network. By ‘remote’, this means that the resources being manipulated by the API are somewhere outside the computer making the request.

Since the most widely used communications network is the internet, most APIs are designed based on web standards. Not all remote APIs are web APIs, but it’s fair to assume that web APIs are remote.

Web APIs typically use HTTP for request messages and provide a definition of the structure of response messages. These response messages usually take the form of an XML or JSON file. Both XML and JSON are preferred formats because they present data in a way that’s easy for other apps to manipulate.

The modern API

Over the years, what an ‘API’ is has often described any sort of generic connectivity interface to an application. However, more recently, the modern API has taken on some characteristics that make them valuable and useful:

  • Modern APIs adhere to standards (typically HTTP and REST) that are developer-friendly, easily accessible and understood broadly
  • They are treated more like products than code. They are designed for consumption by specific audiences (for example, mobile developers)
  • Modern APIs are documented, and they are versioned in a way that users can have certain expectations of their maintenance and lifecycle
  • Since they are much more standardised, they have a much stronger discipline for security and governance
  • The modern API has its own software development lifecycle (SDLC) of designing, testing, building, managing and versioning

Sources

???? ?? Fernando Nikoli?

Marketing & Communications Director at Blockstream

3 年

Thanks for sharing this, interesting point!

回复
Sushil Kedia

Founder & CEO at KEDIANOMICS

3 年

Excellent!

回复
Geoff Blades

The Transformer | 4x Author, "Do What You Want" | Advisor to CEOs and Wall Street pros

3 年

Thanks for sharing Kristen!

回复
Mark Forster

Merchant services for Business Consultants , Coaches, and Small Business Owners

3 年

What a great post Kristen!

回复
Tanya Gandhi

Corporate Media| Public Relations| Strategy| Branding|Management consulting. A global perspective and ambition to transform the future with the right innovation and communication.

3 年

Well said Kristen - thx for sharing this post!

回复

要查看或添加评论,请登录

Kristen Joseph的更多文章

  • How to Create a GDPR Compliant Landing Page

    How to Create a GDPR Compliant Landing Page

    Lawful bases Before collecting an individual’s data, GDPR states that you must have a legal basis for doing so. There…

  • 10 Tips to Improve Email Deliverability

    10 Tips to Improve Email Deliverability

    450bn emails are sent every day but over 85% of them are considered spam. 1/4 emails sent by brands never even arrive…

  • Font Size Units in Responsive Web Design

    Font Size Units in Responsive Web Design

    There are four different font size units: pixels, points, ems and percents. However, which unit is best suited for the…

  • Eight Rules for When to Spell Out Numbers

    Eight Rules for When to Spell Out Numbers

    Numbers don't just show up in mathematics, they also appear in everyday writing. Like many facets of the English…

    4 条评论
  • How to Create In-depth Buyer Personas

    How to Create In-depth Buyer Personas

    What are buyer personas? Buyer personas are semi-fictional representations of ideal customers based on data and…

    1 条评论
  • Should Marketers Resend Emails?

    Should Marketers Resend Emails?

    To resend It presents a second chance to engage contacts Some contacts who missed the email or were too busy the first…

  • How to Extend the Life of Webinars

    How to Extend the Life of Webinars

    A webinar’s lifecycle should not be cut short after it’s presented to an audience. However, many marketers are not…

  • 12 Web Form Best Practices

    12 Web Form Best Practices

    What are web forms? A web form (or HTML form) is a place where users enter data or personal information that’s then…

  • How to Run Focused and Productive Stand-up Meetings

    How to Run Focused and Productive Stand-up Meetings

    What are stand-up meetings? In Agile, a stand-up is a short daily meeting that includes the members of a team working…

    3 条评论
  • A/B Testing to Enhance Your Email Marketing

    A/B Testing to Enhance Your Email Marketing

    What is A/B testing? A/B testing, in the context of email, is the process of sending one variation of a campaign to a…

社区洞察

其他会员也浏览了