0
0
Postmantesting~20 mins

REST API fundamentals review in Postman - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
REST API Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding HTTP Methods in REST APIs

Which HTTP method is typically used to update an existing resource partially in a REST API?

APUT
BPOST
CPATCH
DGET
Attempts:
2 left
💡 Hint

Think about the method that allows partial updates without replacing the entire resource.

Predict Output
intermediate
1:30remaining
Response Status Code Interpretation

What is the expected HTTP status code returned by a REST API after successfully creating a new resource?

A201 Created
B200 OK
C204 No Content
D400 Bad Request
Attempts:
2 left
💡 Hint

It indicates that a new resource was successfully created.

assertion
advanced
2:00remaining
Validating JSON Response Structure

You receive this JSON response from a REST API call:

{"userId": 123, "name": "Alice", "email": "alice@example.com"}

Which Postman test script assertion correctly verifies the presence of the email field?

Apm.test('Email field exists', () => { pm.response.to.have.jsonBody('email'); });
Bpm.test('Email field exists', () => { pm.response.body.email !== null; });
Cpm.test('Email field exists', () => { pm.response.json().email !== undefined; });
Dpm.test('Email field exists', () => { pm.expect(pm.response.json()).to.have.property('email'); });
Attempts:
2 left
💡 Hint

Use Postman's pm.expect with to.have.property to check JSON keys.

🔧 Debug
advanced
1:30remaining
Identifying the Cause of a 401 Unauthorized Error

You send a GET request to a protected REST API endpoint using Postman but receive a 401 Unauthorized response. Which of the following is the most likely cause?

AAuthentication credentials are missing or invalid.
BThe server is down.
CThe request body is missing required fields.
DThe API endpoint URL is incorrect.
Attempts:
2 left
💡 Hint

401 status means the server refuses access due to authentication issues.

framework
expert
2:00remaining
Automating REST API Tests in Postman Collections

Which Postman feature allows you to run a series of API requests with tests automatically and generate a detailed report?

APostman Monitor
BPostman Collection Runner
CPostman Runner
DPostman Console
Attempts:
2 left
💡 Hint

It runs multiple requests in sequence and shows test results.