Introduction
In the previous lesson, you did a rapid run-through of creating a full Postman collection, setting up an environment, and adding all the necessary requests for your API. That was excellent, high-speed work.
Now, we'll take a moment to deliberately practice and solidify the patterns for creating each of the core CRUD (Create, Read, Update, Delete) requests. The goal here is to make these actions second nature. Under exam pressure, you need to be able to configure GET, POST, PUT, and DELETE requests quickly and without hesitation. This lesson is a focused drill to build that muscle memory.
We will systematically review how to configure each request type, paying close attention to when to use path variables (for targeting specific resources) and request bodies (for sending data).
Reviewing the CRUD Operations in Postman
You already have your collection and Local Development environment set up. Ensure your Node.js server is running so you can test the requests as we build them. We will review the pattern for each of the four main operations.
This short video from the Postman team provides a perfect visual summary of what we're about to practice.
REST API Fundamentals: Learn to Use GET, POST, PUT, & DELETE
Watch this quick video, 'REST API Fundamentals', to see a demonstration of how to construct GET, POST, PUT, and DELETE requests in Postman.
Watch from 01:15 to 04:18. Pay attention to how each HTTP method (GET, POST, PUT, DELETE) corresponds to a different action and how the request is configured in Postman (e.g., using parameters, setting the request body).
Now, let's break that down step-by-step for your API.
1. GET Requests (Read)
You have two primary GET requests: fetching all resources and fetching a single resource by its ID.
-
GET All: This is the simplest request.
- Method:
GET - URL:
{{baseUrl}}/api/products - No path variables or body are needed.
- Method:
-
GET by ID: This request uses a path variable to specify which resource to fetch.
- Method:
GET - URL:
{{baseUrl}}/api/products/:id - When you type
:idin the URL, Postman automatically creates a "Path Variables" section below the URL bar where you can paste the ID of an existing product.
- Method:

2. POST Request (Create)
A POST request creates a new resource. It requires a request body containing the data for the new item.
- Method:
POST - URL:
{{baseUrl}}/api/products - Body:
- Select the Body tab.
- Choose the raw option.
- Select JSON from the dropdown menu.
- Provide the data for your new product in valid JSON format.

3. PUT Request (Update)
A PUT request updates an existing resource. It combines the patterns from GET by ID and POST: it uses a path variable to identify the resource and a request body to provide the updated data.
- Method:
PUT - URL:
{{baseUrl}}/api/products/:id - Body: Configure the body with the updated fields, just like you did for the POST request.
4. DELETE Request (Delete)
A DELETE request removes a resource. It only needs to know which resource to remove, so it uses a path variable and does not require a body.
- Method:
DELETE - URL:
{{baseUrl}}/api/products/:id - No body is needed.
Practical Exercise: Verify Your Collection
Your task is to review the requests in your Postman collection to ensure they are all configured correctly. This will solidify your understanding and prepare you for the exam.
Action Steps:
- POST: Send your
Create New Productrequest. Copy the_idfrom the JSON response. - GET by ID: Go to your
Get Product by IDrequest. Paste the copied_idinto theidpath variable's value field. Send the request and verify you receive the correct product with a200 OKstatus. - PUT: Go to your
Update Productrequest. Use the same_id. Change a value in the JSON body (e.g., update the price). Send the request and verify you get the updated product back with a200 OKstatus. - DELETE: Go to your
Delete Productrequest. Use the same_id. Send the request. You should receive a204 No Contentstatus. - Confirm Deletion: Go back to the
Get Product by IDrequest and send it again with the same ID. Verify that you now receive a404 Not Founderror.
For a consolidated written reference of these steps, you can review the following guide.
API Testing with Postman — A Step-by-Step Guide
This article, 'API Testing with Postman — A Step-by-Step Guide', provides a clear, written summary of how to set up requests for all basic CRUD operations. It's a great reference to have.
Quickly read the section titled '2. Basic CRUD Operations: Testing the API Endpoints'. It covers GET, POST, PUT, and DELETE requests, reinforcing the patterns you just practiced.
Conclusion
Mastering these four request patterns in Postman is fundamental. By repeatedly and deliberately practicing their setup, you ensure that you can test and demonstrate your API's functionality under pressure.
Key Takeaways:
- GET by ID, PUT, and DELETE all use a path variable (e.g.,
/:id) to target a specific resource. - POST and PUT both require a request body, typically in raw JSON format, to send data to the server.
- The workflow of Create -> Read -> Update -> Delete is a common and effective way to test your entire API.
Next Up:
You've now thoroughly covered creating a Postman collection and adding all the necessary requests. The next lesson will have you formalize the use of the {{baseUrl}} environment variable, a key professional practice we've already started using. After that, we'll cover the final step in the Postman workflow: exporting your collection for submission.