Bird
Raised Fist0
Postmantesting~20 mins

First API request in Postman - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
API Testing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate
1:30remaining
What is the response status code of this GET request?
You send a GET request to https://jsonplaceholder.typicode.com/posts/1 using Postman. What is the expected HTTP status code in the response?
Postman
GET https://jsonplaceholder.typicode.com/posts/1
A404
B500
C200
D301
Attempts:
2 left
💡 Hint
A successful GET request to a valid resource usually returns this status code.
❓ assertion
intermediate
2:00remaining
Which assertion correctly verifies the response body contains userId 1?
You receive this JSON response body from the API: {"userId": 1, "id": 1, "title": "...", "body": "..."}. Which Postman test script assertion correctly checks that userId equals 1?
Postman
pm.test("User ID is 1", function () {
    // assertion here
});
Apm.expect(pm.response.json().userId).to.eql(1);
Bpm.expect(pm.response.json().userId).to.be.undefined;
Cpm.expect(pm.response.json().userId).to.be.null;
Dpm.expect(pm.response.json().userId).to.be.above(1);
Attempts:
2 left
💡 Hint
Check for exact equality of userId to 1.
❓ locator
advanced
1:30remaining
Which JSON path correctly locates the title in the response?
Given the JSON response: {"userId": 1, "id": 1, "title": "foo", "body": "bar"}, which JSON path expression correctly selects the title value?
A$.title
B$.id.title
C$.userId.title
D$.body.title
Attempts:
2 left
💡 Hint
The title is a top-level key in the JSON object.
🔧 Debug
advanced
2:00remaining
Why does this Postman test script fail?
Test script: pm.test("Check status", () => { pm.expect(pm.response.code).to.equal(200); }); Why does this test always fail even if the response status is 200?
Postman
pm.test("Check status", () => {
    pm.expect(pm.response.code).to.equal(200);
});
AThe test name string must be outside pm.test parentheses
Bpm.expect syntax is incorrect; should be pm.assert
CThe arrow function syntax is invalid in Postman tests
Dpm.response.code is undefined; correct property is pm.response.status
Attempts:
2 left
💡 Hint
Check the correct property name for response status code in Postman scripts.
❓ framework
expert
2:00remaining
Which Postman feature allows running tests automatically after each request?
You want to automate running your test scripts every time you send a request in Postman. Which feature should you use?
APre-request scripts
BTests tab scripts
CCollection Runner
DMonitor
Attempts:
2 left
💡 Hint
Tests tab scripts run after the response is received.

Practice

(1/5)
1. What is the main purpose of making a GET request in Postman?
easy
A. To delete data from the server
B. To retrieve data from a server without changing it
C. To send new data to the server
D. To update existing data on the server

Solution

  1. Step 1: Understand HTTP methods

    GET is used to request data from a server without modifying it.
  2. Step 2: Match method to purpose

    Since GET retrieves data, it does not change or delete anything on the server.
  3. Final Answer:

    To retrieve data from a server without changing it -> Option B
  4. Quick Check:

    GET = retrieve data [OK]
Hint: GET means get data without changing it [OK]
Common Mistakes:
  • Confusing GET with POST or DELETE methods
  • Thinking GET changes data on the server
  • Assuming GET sends data to the server
2. Which of the following is the correct way to set the HTTP method to GET in Postman?
easy
A. Select GET from the dropdown next to the URL input
B. Type GET in the URL field
C. Add a header named GET
D. Write GET in the request body

Solution

  1. Step 1: Locate HTTP method selector in Postman

    Postman has a dropdown menu next to the URL field to choose the HTTP method.
  2. Step 2: Choose GET method correctly

    Selecting GET from this dropdown sets the request method properly.
  3. Final Answer:

    Select GET from the dropdown next to the URL input -> Option A
  4. Quick Check:

    Method dropdown = GET selection [OK]
Hint: Use dropdown near URL to pick GET method [OK]
Common Mistakes:
  • Typing GET inside the URL field
  • Adding GET as a header instead of method
  • Putting GET in the request body
3. You send a GET request to https://api.example.com/users/1 in Postman. The response body is {"id":1,"name":"Alice"} and status code is 200. What does this mean?
medium
A. The request was unauthorized
B. The user with ID 1 was not found
C. There was a server error processing the request
D. The user with ID 1 was found and data returned successfully

Solution

  1. Step 1: Interpret status code 200

    Status code 200 means the request was successful and the server returned data.
  2. Step 2: Analyze response body content

    The JSON shows user data with id 1 and name Alice, confirming the user was found.
  3. Final Answer:

    The user with ID 1 was found and data returned successfully -> Option D
  4. Quick Check:

    Status 200 + data = success [OK]
Hint: Status 200 means success with data returned [OK]
Common Mistakes:
  • Confusing 200 with error codes like 404 or 500
  • Ignoring the response body content
  • Assuming 200 means unauthorized access
4. You made a GET request in Postman but got a 404 status code. What is the most likely cause?
medium
A. The server is down
B. You forgot to set the request method to GET
C. The URL endpoint is incorrect or does not exist
D. You sent data in the request body

Solution

  1. Step 1: Understand status code 404

    404 means the requested resource was not found on the server.
  2. Step 2: Identify common reasons for 404

    Usually caused by wrong URL or endpoint that does not exist.
  3. Final Answer:

    The URL endpoint is incorrect or does not exist -> Option C
  4. Quick Check:

    404 = resource not found [OK]
Hint: 404 means URL or endpoint is wrong [OK]
Common Mistakes:
  • Thinking 404 means server is down
  • Assuming method mismatch causes 404
  • Believing sending data in GET body causes 404
5. You want to test an API that returns a list of products. Which steps should you follow in Postman to make your first GET request and verify success?
hard
A. Set method to GET, enter the products URL, send request, check status 200 and response data
B. Set method to POST, enter the products URL, add product data in body, send request
C. Set method to DELETE, enter the products URL, send request, check status 204
D. Set method to PUT, enter the products URL, add updated data, send request

Solution

  1. Step 1: Choose correct HTTP method for retrieving data

    GET is used to retrieve data like a list of products without changing anything.
  2. Step 2: Enter URL and send request

    Input the API endpoint URL for products and send the GET request in Postman.
  3. Step 3: Verify response status and data

    Check that status code is 200 (success) and response contains the product list.
  4. Final Answer:

    Set method to GET, enter the products URL, send request, check status 200 and response data -> Option A
  5. Quick Check:

    GET + URL + 200 status = success [OK]
Hint: GET + URL + check 200 status = first API test [OK]
Common Mistakes:
  • Using POST or DELETE instead of GET for retrieval
  • Not checking the status code after sending request
  • Sending data in GET request body
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard