Meet Postman: Who Else Can Be a Client

What an API and an endpoint are, why the client isn’t only the browser and why a tester needs Postman. Plus: how path parameters differ from query parameters, and what’s in the Postman window.

About the product

Alex, QA Team Lead

Hi! There’s a new task. The team is rebuilding the BB Food catalogue: the server with the new API is ready, but the frontend developers are still working on the catalogue page. The API needs testing right now.

Quick reference

API

The rules programs use to talk: which requests the server understands and what it answers. Like a shop counter with a price list: the customer asks for goods from the price list and never goes into the storeroom, and the client uses the API and never goes into the database.

Endpoint

One specific item of an API: a method together with a path, for example GET /api/v1/products. The full address is the base address (base URL) plus the path. The same path with different methods means different endpoints. They are all described in the API documentation, often in Swagger, which is usually generated automatically from the backend code.

Who can be the client

A client is any program that sends a request to a server: a browser, a mobile app or Postman. The server only sees the request and answers identical requests identically.

Postman

A program for sending requests to an API by hand. It shows the response as it is: the status code, time, size, headers and body. A browser, in contrast, draws a page from the response.

Why a tester bypasses the interface

To test the API before the page exists; to find out where a bug is — on the client or on the server; to send data the form won’t let through; to repeat checks faster.

Path and query parameters

A path parameter is part of the path and picks a specific resource: /api/v1/products/5. Query parameters come after ? as key=value pairs joined with & and refine the request: /api/v1/products?category=bread&sort=price.

The Postman window

The request line (method, address, Send), the Params, Authorization, Headers, Body and Scripts tabs, and the response panel. On the left are collections, environments and history.

Collections and environments

A collection is saved requests in folders that can be shared with the team. An environment keeps variables such as {{baseUrl}}: switch the environment and the requests go to a different server.