Get startedGet started for free

Introduction to API management

1. Introduction to API management

In this video, we'll explore the basics of REST APIs and how Azure API Management can simplify working with them.

2. REST API overview

First, let's start with REST APIs. API stands for Application Programming Interface. It's an all-encompassing term that includes any interfaces that allow programs to communicate with each other without knowing each other's implementation details. REST stands for Representational State Transfer. It's a software architectural style used to create web services that enable communication between different systems over the internet. For example, this is how an app deployed on a mobile device or a PC can retrieve its data from a server hosted on the web. Not only can the app retrieve the data via a REST API, but also manipulate it. REST APIs use different HTTP methods for different operation types, such as GET, POST, DELETE, etc.

3. REST endpoint types

GET method is used for retrieving data, POST is used for creating data, PUT is used for updating data, and DELETE is used for removing data.

4. Endpoint types: weather app example

Let's go deeper by investigating the 4 methods. We've already seen the GET method in our first video, where the app sends a request to the server to pull the weather data for Paris. Consecutively the user stores Paris as their favorite city, which is an example of a POST request. Every time the user opens the app, a new GET request is send to the server to update the Paris weather data. The user returns from his trip, and wants to update the location to his homecity: London. This is an example of a PUT request. Two weeks later, the user realizes he's getting depressed from reading the bad London weather data, and decides to remove London as their favorite city.

5. REST principles

The key principles of REST include statelessness, meaning the server doesn't store client data between requests, and the use of standard, human-readable formats like JSON or XML for data exchange. When a web service adheres to these principles, it is said to adhere to the RESTful architecture. Let's go back to the weather app. The app makes a GET request to an API endpoint to get the weather data for your favorite city. The server responds with the requested weather data, typically in JSON format. The app doesn't actually store the weather data, but makes a new "GET" request to receive the updated data.

6. Hosting REST API in Azure

In Azure, there are several ways of hosting a REST API, including custom web apps hosted via App Services, Container App, Azure-specific Function Apps, and so on. Any of these APIs can be managed by a service called Azure API Management.

7. Azure API Management (APIM) overview

Managing APIs can get complex as our application scales. We might need to secure APIs, monitor their performance, or apply rate limits to prevent misuse. Azure API Management, or APIM, helps us do all of this effortlessly.

8. How APIM operates

Think of APIM as a gateway that sits between our APIs and the clients consuming them. It provides a centralized way to secure APIs using authentication and authorization, monitor API performance and usage, transform requests and responses, and enforce policies like rate limits or caching.

9. Setting up APIM

Setting up APIM in Azure is straightforward. We start by creating an API Management instance. Then, we import our APIs, whether they're hosted in Azure or elsewhere. We can define policies, such as requiring an API key for access or limiting the number of calls per minute.

10. APIs supported by APIM

APIM is not only limited to REST APIs. It also supports other types of APIs, such as WebSockets and gRPC. A powerful feature of APIM is that a single instance of it can manage multiple APIs of different types and from different sources.

11. Let's practice!

Let's practice by testing our knowledge of RESTful architecture.

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.