A REST API is a standardized way to build web APIs that uses HTTP methods (GET, POST, PUT, DELETE) to perform operations on resources. It's the most common API architecture for web applications — when AI generates a backend for your vibe-coded app, it almost always creates REST endpoints.
REST is the default language for building APIs. It maps naturally to CRUD operations, making it the pattern AI reaches for first when generating backend code.
REST uses HTTP methods to perform actions on resources:
| HTTP Method | CRUD Operation | Example |
|---|---|---|
| GET | Read | Fetch all users |
| POST | Create | Add a new user |
| PUT/PATCH | Update | Modify user profile |
| DELETE | Delete | Remove a user |
GET /api/users → List all users
GET /api/users/123 → Get user 123
POST /api/users → Create a user
PUT /api/users/123 → Update user 123
DELETE /api/users/123 → Delete user 123
The URL identifies the resource, the HTTP method identifies the action.
Next.js makes REST APIs easy with API routes:
// app/api/users/route.ts
export async function GET() {
// Return all users
}
export async function POST(request) {
// Create a new user
}
Be specific about your resources:
AI excels at generating REST endpoints because the pattern is so well-established.