API Basics - Using APIs in no-code tools

Understanding API Endpoints: The Building Blocks of APIs

This post is part of a series:
API Basics - Using APIs in no-code tools
If you haven't read the previous post
Introduction to APIs: Understanding the Basics
you should read that first.

In the last post, we introduced the basics of APIs and how they allow different software programs to communicate with each other. In this post, we will delve deeper into the building blocks of APIs: endpoints.

An endpoint is a specific URL (Uniform Resource Locator) that is designed to accept specific types of requests and return specific types of responses. When you send a request to an API, you are sending it to a specific endpoint. The endpoint then processes the request and returns a response.

For example, let's say you want to get the current weather conditions from a weather API. You would send a GET request to the endpoint "api.weather.com/current". The API would process the request and return a response in the form of JSON. JSON (JavaScript Object Notation) is a lightweight data format that is easy for humans to read and for machines to parse. 

A JSON response from our example weather API might look like this:

  "location": "New York City",
  "temperature": 72,
  "conditions": "Partly Cloudy",
  "wind_speed": 15

This response contains various pieces of information about the current weather in New York City, such as the location, temperature, conditions and wind speed. Each piece of information is represented as a key-value pair. The key represents the name of the information, and the value represents the actual data. For example, the key "location" has the value "New York City".

As you can see, JSON is very easy to read and understand. It's also easy to access specific pieces of information using a programming language. This makes it an ideal format for API responses.

Endpoints can also accept different types of requests. The most common types are:

  • GET: Retrieves information from the API
  • POST: Sends new information to the API
  • PUT: Updates existing information in the API
  • DELETE: Deletes information from the API

It's also common for endpoints to accept query parameters, which allow you to filter or sort the data returned by the API.

In addition to understanding endpoints, it's also important to be familiar with the response format of an API.

In the next post, we will discuss the different types of API endpoints and how to use the request body and query parameters.

Up next in this series:
Types of API Endpoints and Customizing a Request