Portfolioβ€ΊSoftware Developmentβ€ΊAPI Design
Topic

API Design

Design a small, minimal REST API for a real scenario. Tests resource modelling, scope judgment, and how you handle edge cases.

API designSystem thinkingTechnical writingProduct scoping

Choose Your Level

Pick the difficulty that matches where you are. You can come back and try a harder level later.

Topic Execution Guide

REST API Design & OpenAPI 3.0 Specification

RESTful API design is a foundational backend software engineering skill. Tech leads evaluate software engineers on URI resource modeling, HTTP status semantics (201 Created vs 200 OK, 400 vs 422), versioning strategy, error payload standardization (RFC 7807), and Postman test assertions.

1. OpenAPI 3.0 API Specification

OpenAPI 3.0 YAML/JSON specification detailing request/response schemas, query parameters, and status codes.

2. REST API Architecture Reference Doc

Documentation explaining URI resource naming conventions, versioning rules (/v1/), and authentication headers.

3. Postman Collection & Automated Tests

Exported Postman test collection validating success payloads and edge-case error assertions.

Frequently Asked Questions (API Design)

What is the difference between URI versioning and header versioning?

URI versioning (/v1/users) includes the API version explicitly in the path URL, making it visible and easy to route. Header versioning (Accept: application/vnd.company.v1+json) keeps URLs clean but complicates caching.

When should you return HTTP 400 versus HTTP 422?

HTTP 400 Bad Request indicates malformed request syntax or invalid JSON parsing errors. HTTP 422 Unprocessable Entity indicates syntactically correct JSON that violates semantic domain validation rules.

Why is the RFC 7807 Problem Details format recommended for API errors?

RFC 7807 provides a standardized machine-readable JSON format for API errors (type, title, status, detail, instance), preventing custom inconsistent error objects across endpoints.

Explore Software Development Career Paths

Build proof of work across other topics or view full career roadmaps mapping technical skills to hiring expectations.