Introduction

Postman is an API platform. It is an application with a wide variety of features relating to APIs. Some of these features include performing API calls, saving these calls to a profile, sharing your saved API calls within a team and using variables.

As a developer, you should be using Postman to test your API calls to ensure that the API calls are working.

We are going to install Postman and then look at the different features it has to offer.

API for testing

The API we will be using for testing is JSON Placeholder by Typicode.

This is a free API you can use for testing API calls.

Note: The data you send to the JSON Placeholder server is not actually stored on the server. The responses you receive will emulate the responses you’d typically expect to receive with a real server. However, your data is not going to be stored. For example, if you make a POST request you will get a 201 Created successful response, but it won’t actually have stored this data.

Postman video

In this video, we look at installing Postman, Collections, HTTP Requests, and environments and variables:

Link to video

Sign up and installation

Go to the Postman website and sign up. Remember these details as you will be using this to log into the Postman app.

Go to the Downloads section on the Postman website.

Download the operating system of your choice. When the download has finished, install the application.

Once the application is installed, open it.

Sign into your own account that you signed up with. This is so that your API calls can be saved to your account.

Collections

Collections are where we can store HTTP Requests that we have saved.

HTTP requests

We can make new HTTP requests in Postman and then save this to a collection.

Environments and variables

We can create environments, such as Development, Staging and Production. We can then add variables and switch values depending on these environments.

Lesson task

Knowing how to use Postman is very beneficial to you as a developer.

Goal

For you to be able to use Postman correctly.

Brief

Complete the Level 1 process.

NOTE: Lesson tasks do not get submitted on Moodle and are not assessed by tutors. They are mainly there for you to practise what you have learned in the lesson.

Level 1 process

  1. Create a new Collection, you can choose whatever name you would like.

  2. Create Developer and Production environments.

  3. Create a url variable.

  4. Make API calls to any resource you would like. Save these requests in the Collection you have created.

Additional resources

Typicode: JSON Placeholder

Tags: