Skip to content
Codeloom

Topics / REST APIs

REST APIs

Building and consuming REST APIs the right way.

Why learn REST APIs?

  • The lingua franca of web services.

  • Every backend role expects fluency here.

  • Once you know REST, GraphQL and RPC concepts come quickly.

  • Cleanly separates frontend, backend, and third-party integrations.

What you can build with REST APIs

Public and internal APIs Mobile app backends Service-to-service communication Third-party integrations

REST APIs tutorials

24 articles · page 1 of 2

Hand-written tutorials, ordered as a recommended learning path.

  1. 01 What Is REST? A clear introduction to REST — resources, URIs, HTTP verbs, statelessness, status codes, JSON conventions, and how REST compares to RPC and GraphQL.
  2. 02 REST API Design Field-tested REST API design — resource naming, versioning, pagination, filtering, sorting, idempotency, and consistent error envelopes. Conventions that age well in production.
  3. 03 Status Codes A practical tour of HTTP status codes — 2xx success, 3xx redirects, 4xx client errors, 5xx server errors. Which to return when, and the common mistakes to avoid.
  4. 04 HTTP Methods A practical walkthrough of HTTP methods — semantics, safety, idempotency, body conventions, and the differences between POST, PUT, and PATCH. Plus OPTIONS and HEAD.
  5. 05 OpenAPI Documentation Write machine-readable API documentation with OpenAPI 3.1. Learn the spec structure, Swagger UI setup, code generation, and best practices for keeping docs in sync.
  6. 06 Error Handling Standards Design consistent, machine-readable error responses using RFC 7807 Problem Details, custom error codes, and structured error envelopes that clients can actually parse.
  7. 07 Hypermedia & HATEOAS Implement HATEOAS in your REST API using HAL, JSON:API, and custom link formats. Learn when hypermedia helps, when it hurts, and how to add it incrementally.
  8. 08 Pagination Best Practices Choose the right pagination strategy for your REST API. Compare offset, cursor, and keyset pagination with real examples, HATEOAS links, and performance trade-offs.
  9. 09 Rate Limiting Protect your REST API from abuse with rate limiting. Learn token bucket, sliding window, and fixed window algorithms with real implementation examples and standard headers.
  10. 10 Security Checklist A practical security checklist for REST APIs covering OWASP API Top 10, authentication, authorization, input validation, CORS, and common vulnerabilities with fixes.
  11. 11 Webhooks Design Design reliable webhooks for your REST API. Learn delivery patterns, retry logic with exponential backoff, HMAC signature verification, and idempotent event handling.
  12. 12 API Authentication Learn the three most common REST API authentication methods. Compare API keys, JWT tokens, and OAuth 2.0 with working code examples and security best practices.
  13. 13 API Caching Master HTTP caching for REST APIs. Learn ETags, Cache-Control headers, conditional requests, and CDN integration patterns with practical examples.
  14. 14 API Testing Learn to test REST APIs manually with Postman and curl, then automate with Jest and Supertest. Covers status codes, response validation, and CI integration.
  15. 15 REST vs GraphQL vs gRPC Compare REST, GraphQL, and gRPC for API design. Understand tradeoffs in performance, flexibility, and developer experience to pick the right API style.
  16. 16 REST Best Apply REST design best practices for resources, naming, status codes, pagination, and versioning to build clean, durable APIs.
  17. 17 API Errors Design clear, consistent error responses for REST APIs using HTTP status codes, problem details, and error envelopes that clients can actually handle.
  18. 18 HATEOAS Understand Hypermedia as the Engine of Application State, why most REST APIs skip it, and when adding hypermedia links actually pays off.
  19. 19 Pagination Compare offset, cursor, and keyset pagination for REST APIs. Pick the right pattern for your data, scale, and client experience.
  20. 20 Rate Limits Protect your API from abuse and accidental overload using token buckets, leaky buckets, and standard rate-limit headers that clients can actually respect.