Skip to main content
Postman Testing
CHAPTER 05 Beginner

Sending Your First API Request

Updated: May 13, 2026
15 min read

# CHAPTER 5

Sending Your First API Request

1. Introduction

Enough theory and interface tours—it is time to test an API! In this chapter, we will send our very first live API request using Postman. We will use a free, public API specifically designed for testing purposes. We will walk through configuring the Request Builder, clicking Send, and analyzing the data returned in the Response Viewer. This is the foundational workflow of all API testing.

2. Learning Objectives

By the end of this chapter, you will be able to:
  • Construct a basic GET request in Postman.
  • Identify the components needed for a simple API call.
  • Execute the request and read the server's response.
  • Analyze the JSON payload returned by the server.
  • Verify the HTTP status code and response time.

3. Beginner-Friendly Explanation

Think of sending an API request like looking up a word in a dictionary. The Method is your action: "Look up". The URL is the specific dictionary and the word you want: "The English Dictionary -> 'Apple'". When you hit Send, you flip to the page. The Response is the definition of the word written on the page.

In this chapter, we are going to "look up" a specific user profile from a public database. We will ask the server for "User Number 1", and the server will return User 1's name, email, and company details.

4. Real-World Examples

  • Checking Server Health: A DevOps engineer sends a simple GET request to api.company.com/health. If the response returns {"status": "OK"}, they know the servers are online and functioning properly.
  • Fetching a Blog Post: When you visit a blog, the frontend code sends a GET request to api.blog.com/posts/10. The API returns the title, author, and content of the post, which the browser then renders on your screen.

5. Step-by-Step Tutorials (Your First Request)

For this tutorial, we will use JSONPlaceholder (jsonplaceholder.typicode.com), a free fake API for testing and prototyping.

Step 1: Open a New Request Tab

  1. 1. Click the + button near the top of the screen to open a new tab.

Step 2: Set the Method

  1. 1. Look at the dropdown menu on the left side of the URL bar.
  1. 2. Ensure it is set to GET. (GET means we want to retrieve or "read" data).

Step 3: Enter the URL

  1. 1. Click inside the URL bar (where it says "Enter request URL").
  1. 2. Type or paste the following exact address:
https://jsonplaceholder.typicode.com/users/1

Step 4: Send the Request

  1. 1. Click the big blue Send button on the right.

Step 5: View the Response

  1. 1. Look at the bottom half of the screen (the Response Viewer).
  1. 2. You should see a block of formatted JSON text containing data about a user named "Leanne Graham".

6. API Request Examples (What happened?)

When you clicked Send, Postman generated and sent the following raw HTTP request over the internet:
http
1234
GET /users/1 HTTP/1.1
Host: jsonplaceholder.typicode.com
Accept: */*
User-Agent: PostmanRuntime/7.x.x

*Note: Postman automatically added the Accept and User-Agent headers behind the scenes!*

7. Response Examples (Analyzing the Output)

Look closely at the Response Viewer. You need to check three things:
  1. 1. Status: Look at the top right of the response pane. It should say 200 OK in green. This means success.
  1. 2. Time: Next to the status, it shows the latency (e.g., 145 ms). This is how fast the server replied.
  1. 3. Size: Next to time, it shows the size of the downloaded data (e.g., 1.04 KB).

8. JSON Examples (The Payload)

In the Body tab of the Response Viewer, ensure "Pretty" is selected. You will see the JSON payload:
json
123456789101112131415161718192021
{
    "id": 1,
    "name": "Leanne Graham",
    "username": "Bret",
    "email": "Sincere@april.biz",
    "address": {
        "street": "Kulas Light",
        "suite": "Apt. 556",
        "city": "Gwenborough",
        "zipcode": "92998-3874",
        "geo": {
            "lat": "-37.3159",
            "lng": "81.1496"
        }
    },
    "phone": "1-770-736-8031 x56442",
    "website": "hildegard.org",
    "company": {
        "name": "Romaguera-Crona"
    }
}

Congratulations! You have successfully requested and received data from a REST API.

9. Testing Examples (Mental Verification)

Even without writing automated scripts yet, you just performed manual API testing.
  • *Did it return 200 OK?* Yes.
  • *Is the ID equal to 1?* Yes.
  • *Is the format valid JSON?* Yes.
If any of these were false, the API test would have failed.

10. Best Practices

  • Save Your Requests: Don't lose your work! Click the "Save" button (or Ctrl+S). Name the request "Get User 1" and save it into a new Collection named "JSONPlaceholder Tests".
  • Inspect the Data: Don't just glance at the 200 OK status. Always scroll through the JSON body to ensure the actual data makes sense. An API might return 200 OK but give you the wrong user's data!

11. Common Mistakes

  • Typing the URL wrong: HTTP vs HTTPS matters. Missing a forward slash matters. If you type jsonplaceholder.typicode.com/user/1 (user instead of users), the server will return a 404 Not Found error. Precision is key.
  • Spaces in the URL: Avoid accidental spaces at the end of your URL (e.g., .../users/1 ). Postman usually handles this gracefully, but strict servers might reject it.

12. Mini Exercises

  1. 1. Change the URL to https://jsonplaceholder.typicode.com/users/2 and hit Send. What is the name of the second user?
  1. 2. Change the URL to https://jsonplaceholder.typicode.com/users/999 and hit Send. What happens? What is the Status Code?

13. Coding/Testing Challenges

Challenge 1: JSONPlaceholder also has an endpoint for "posts". Construct a GET request to fetch the blog post with ID number 5. *(Hint: Replace the word users with posts in the URL).* What is the title of post 5?

14. MCQs with Answers

Question 1

What HTTP Method is used by default when you open a new tab in Postman to fetch data?

Question 2

If an API request is perfectly successful, what Status Code is typically displayed in green in the Response Viewer?

Question 3

What format does JSONPlaceholder (and most modern REST APIs) use to return data?

15. Interview Questions

  • Q: Walk me through the exact steps you take in Postman to manually verify that a specific endpoint is returning the correct user profile.
  • Q: When you view the results of an API call in Postman, besides the JSON body, what two other metrics are crucial to observe? *(Answer: Status Code and Response Time).*

16. FAQs

Q: Why didn't I need a password to access this data? A: JSONPlaceholder is a public, open API designed for learning. It has no authentication. Real-world APIs (like your bank or Facebook) require you to attach secure tokens to your request, which we will learn in Chapter 12.

17. Summary

In this chapter, we executed our first manual API test. We learned how to select the GET method, enter an endpoint URL, execute the request, and analyze the response. We located the HTTP status code, verified the response time, and inspected the JSON payload. We also saw firsthand how precise URLs must be; a slight typo will result in a 404 error.

18. Next Chapter Recommendation

We just learned how to "read" data using GET. But how do we "create", "update", or "delete" data? Proceed to Chapter 6: Understanding HTTP Methods in Postman to explore the full spectrum of REST API operations.

Finish this Chapter

Save your progress on your learning path and prepare for coding interview challenges.

Discussion

Join the discussion

Log in or create a free account to participate.

Sort: ·