# REST API Analysis Examples

## Example 1: API Design Review

**Input:**
```
Review this endpoint: POST /getUserById?id=123
```

**Expected Output:**
Anti-pattern identified (should be GET /users/123), explanation of REST principles, proper method usage, URI design best practices.

## Example 2: Error Handling

**Input:**
```
What's the correct status code when a resource is not found vs when the user lacks permission?
```

**Expected Output:**
404 Not Found (resource doesn't exist) vs 403 Forbidden (exists but no access), proper error response bodies, security considerations.

## Example 3: Pagination Design

**Input:**
```
Design pagination for a large user collection endpoint.
```

**Expected Output:**
Cursor vs offset pagination, Link headers, response metadata, performance considerations, example implementation.

## Common Use Cases

- API design and review
- RESTful best practices
- Status code selection
- Authentication strategy
- Versioning decisions
- Documentation
