API testing focuses on testing the business logic or the functionality of the application. Using API testing you are also validating the data responses, as well as ensuring whether your APIs are performant and secure.
So you are testing the core functionality of the application without touching the UI or worrying about the look and feel of the application. With API testing you can either test a single request or the integration between multiple requests and validate the response that's being returned by the server.

Validate an API response:

Let's say you are testing the 'users' API: https://jsonplaceholder.typicode.com/users.
You'll see a response similar to this on a GET call:
{
  id: 1,
  name: "Leanne Graham",
  username: "Bret",
  email: "[email protected]",
  ...
},
You can validate the following scenarios:
Similarly, you can create and verify many such scenarios per your business requirement.

Types of API Testing:

Advantages of API Testing:

Check out the video below to see how to perform API Testing using a REST API console:
Follow @automationbro on Twitter for latest updates
Subscribe to my YouTube channel to see more content like this