API Redux: Practical HTTP API Design Guide with Rails Examples

Status: Maintained reference guide with versioned Rails examples. Last reviewed:

API Redux is a practical reference for designing and operating HTTP APIs. It covers resource and URL design, error formats, pagination, versioning, authentication, retries, idempotency, caching, conditional requests, concurrency, long-running operations and webhook security, with Rails examples.

Use this guide when

Use it when designing or reviewing an API, standardizing errors and pagination, defining retries and idempotency, preventing stale writes, specifying asynchronous operations, or designing signed webhooks.

Topic map

| Area | Contract questions |
|---|---|
| Resources and payloads | Are collections, names, timestamps, links and metadata consistent? |
| Errors and pagination | Can clients recover and traverse changing collections safely? |
| Authentication and versioning | Are identity, permission, deprecation and removal distinct? |
| Reliability | What can be retried, cached or made idempotent? |
| Concurrency and long-running work | How are stale writes rejected and asynchronous operations observed? |
| Webhooks | How are authenticity, replay, ordering and delivery failures handled? |

The repository maps each topic to runnable Rails API-mode examples.

Status and limitations

API Redux is an opinionated design aid, not a universal standard. Domain constraints, clients, threat models, consistency needs and infrastructure determine which conventions apply. Evaluate Rails examples against the application version and current HTTP standards.

Related reading

Source

View API Redux on GitHub .