This tutorial will guide you step-by-step through understanding REST APIs and how to use tools like Postman, Curl, and Insomnia.
Helpful Material:
What is an API? | MuleSoft
(video)
APIs for
Beginners
Helpful Material:
REST API concepts explained
RESTful web services explained with examples
Helpful Material:
What are APIs and why are they everywhere | Dev.to
https://api.example.com/usersGET: Read data (e.g., get a user list)POST: Create data (add a new user)PUT: Update data (change user info)DELETE: Remove data (delete a user)Helpful Material:
HTTP methods
explained
200 OK: Success201 Created: Data created successfully400 Bad Request: Invalid input404 Not Found: Resource doesn’t exist500 Server Error: Problem on the server sideHelpful Material:
HTTP status codes explained
Helpful Material:
How Rest APIs work: A simple explanation | DevMagz.com
Helpful Material:
Postman: Getting Started
Using Curl
Insomnia: Getting Started
GET request to:https://postman-echo.com/get?sample=test
POST request to:https://postman-echo.com/post
{
"message": "Hello, Postman!"
}
GET request for all posts:https://jsonplaceholder.typicode.com/posts
GET request for a single post:https://jsonplaceholder.typicode.com/posts/1
POST request:https://jsonplaceholder.typicode.com/posts
{
"title": "foo",
"body": "bar",
"userId": 1
}
Get with Curl using Postman Echo:
curl "https://postman-echo.com/get?sample=test"
Post JSON with Curl:
curl -X POST -H "Content-Type: application/json" -d "{\"message\":\"Hello, Curl!\"}" https://postman-echo.com/post
Get posts with Curl using JSONPlaceholder:
curl "https://jsonplaceholder.typicode.com/posts"
Post new post with Curl:
curl -X POST -H "Content-Type: application/json" -d "{\"title\":\"foo\",\"body\":\"bar\",\"userId\":1}" https://jsonplaceholder.typicode.com/posts
Helpful Material:
Curl official documentation
Helpful Material:
JSON syntax overview
JSON Introduction
Common Postman Troubleshooting Scenarios | Guru99.com
Helpful Material:
Public APIs list | GitHub
Congratulations on completing the REST APIs self-guided tutorial.
Thank you for learning with us!