Creating Endpoints in Postman

Here, we are going to learn how to create endpoints in Postman?
Submitted by Radib Kar, on January 21, 2021

In our last tutorial, we discussed request, response & endpoints. Here we will see how to create endpoints in Postman.

First of all, if you don't have postman installed please have it installed before getting started & then sign up. It's a free software for personal usage.

After you have installed please launch the postman.

Let's have a walkthrough first.

Once you launch the postman, you should see something like this which is a kind of home page & we will be creating workspace first. Click on the workspace option & then create a new one. (Select personal while creating).

Postman | Creating Endpoints (1)

Postman | Creating Endpoints (2)

Once you have your workspace created, on the right-hand side you should see something like "no environment". An environment is static for a workspace. So say, you will be reusing something every time you can store that as a variable which will persist throughout the workspace. For example, the base_url will be the same for all of our requests (http://localhost:3333), so save that as an environment variable after creating an environment.

Postman | Creating Endpoints (3)

Postman | Creating Endpoints (4)

Postman | Creating Endpoints (5)

Now, on the left side, you can see a button to create a new collection. A collection is a collection of endpoints to send requests. Like, say for our project we will create a collection, similarly for task etc.

To create a collection, follow the below process,

Postman | Creating Endpoints (6)

Postman | Creating Endpoints (7)

Now in this collection, we can add endpoints for sending our requests (5 endpoints for project as per our last tutorial) in the following way,

Postman | Creating Endpoints (8)

Postman | Creating Endpoints (9)

Postman | Creating Endpoints (10)

Postman | Creating Endpoints (11)

In the above, you can see that we have used an environment variable which is base_url and an environment variable is used like below,

{{variable_name}} -> variable_name will be replaced by its current value.

In this way, build the other requests for project & save them.

Postman | Creating Endpoints (12)

Okay, this is all about postman. Please complete the endpoints as we discussed in our previous tutorial.



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.