What is an API

Application Programming Interfaces (API)

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

The API enforces the terms and conditions for API consumption defined by the API owner which for example could be AWS, Oracle, MS or any number of software and services providers.

APIs allow developers to save time by taking advantage of a platform’s implementation to reduce work required to connect to the cloud service.

 The use of APIs helps reduce the amount of code developers need to create, and also helps create more consistency across apps for the same platform. APIs can control access to hardware and software resources.

For example, each time you use a web application such as LinkedIn you’re essentially sending an instant message which will validate your application is available.

Figure 1 shows a high-level workflow of how an API is interfaced.

Application Programming Interfaces (API) Gateway/Proxy

API gateway is really a programming capability that sits in front of an application programming interface (API) and acts as a single point of entry for a defined group of microservices.

You can also think of an API gateway as the conductor that organizes the requests being processed by the microservices architecture to create simplified experience for the user.

Or you can think of it as a translator, taking a client’s many requests and turning them into just one, to reduce the number of round trips between the client and application.

An API gateway is set up in front of the microservices and becomes the entry point for every new request being executed by the app. It simplifies both the client implementations and the microservices app.

Figure 2 shows how API connection work with Google Cloud Endpoints. 

GCP API Gateway/ Endpoint

The proxy functionality is also built into the Endpoints API Frameworks for use on App Engine standard environment.

Application Programming Interfaces (API) Requests

API gateway requests communication in HTTP (Hyper Text Transfer Protocol) center around a concept called the Request-Response Cycle

For a “client” to make a valid request the following needs to include in the request.

  • GET — Request sent to the server to retrieve a resource.
  • POST — Request sent to the server to create a new resource.
  • PUT — Request sent to the server to edit/update an existing resource.
  • DELETE — Request sent to the server to delete a resource.

The request body contains the data the client wants to send the server.

Figure 6.19 shows the structure an API Request.

There are several techniques APIs use to authenticate a client. These are called authentication schemes. For the purposes of this exam we will not cover the security aspects of APIs.

The two most common architectures for web-based APIs are SOAP, which is an XML-based design that has a standardized structures for requests and responses and REST (Representation State Transfer), is a more open approach, providing lots of conventions, but leaving many decisions to the person designing the API.

Application Programming Interfaces (API) Integration

API Integration

API integration refers to how two or more applications can be connected to each other via their APIs to perform some common function jointly using the API layer of two or more applications to make them talk to each other.

For example, you may be using AWS EC2 for your cloud based virtual machines.  However, even though AWS does have a monitoring solution you may not want to use the solution which is called CloudWatch.   Instead you choose to transfer your monitoring metrics from your EC2 VMs to Datadog.  To do this with ease there are APIs that can help alleviate this and integrate with Datadog and EC2

Benefits of Application Programming Interfaces (API) Integration

API Integration Benefits

API integration has of course some really great benefits when integrated with the appropriate solutions. APIs are everywhere in modern life just as in cloud computing.

These APIs are facilitating many services we use on our mobile devices, laptops and tablets.  Once an API is in place, developers generally have more of an incentive to use the service because it’s typically easier to integrate into their own product than a service without an API.  An API is intended to help make the interaction between the provider and consumer more efficient and user-friendly.

Below are some of the benefits of APIS and reasons to build them as well as integrate them into your business processes.

  • Creating a mobile application that builds user loyalty
  • Responding to customer requests for an API
  • Making data available to queries from a customer
  • Keeping up with competitors that utilize APIs
  • Integrating with vendors or other third-party providers in a more efficient manner
  • Letting potential vendors and other third-party providers test the web-based services

APIS are very powerful because of the specialized use cases, flexible options of deployment and the ease of integration to the cloud service. The ecosystem of APIS is ever expanding and well into the thousands.

Joe Holbrook, The Cloud Tech Guy

Start Learning Today!

Leave a Reply