Web & Software

API Design roadmap

Design web APIs that other developers enjoy using: clear, consistent, safe and easy to change.

  • About 2 to 3 months
  • 5 to 7 hours a week
  • 5 stages

Tick each stage as you finish it. Your progress stays on this device.

Start stage 1

Time needed

About 2 to 3 months

5 to 7 hours a week. Best for people who have already used or built a small API.

Before you start

  • You have called or built at least one web API
  • You understand HTTP methods and status codes at a basic level
  • You can read JSON

Not covered here

Choosing a programming language or framework. The ideas here apply to all of them.

  1. Stage 12 weeks

    Think like an API user

    Design from the needs of the people who will call it.

    Learn

    • Who uses the API and for what
    • Resources, names and clear URLs
    • HTTP methods and status codes used correctly
    • Consistent field names and formats

    Tools

    • A notes document
    • Postman or a similar tool
    • Examples of good public APIs

    Build

    • Write the use cases and resource list for a small service
    • Review a public API and list three things it does well

    CheckpointA new developer can guess how to call a second endpoint after using the first.

  2. Stage 22 weeks

    Describe it with OpenAPI

    Write the contract before the code.

    Learn

    • The OpenAPI format
    • Request and response examples
    • Reusable schemas
    • Documentation generated from the contract

    Tools

    • OpenAPI editor
    • A documentation viewer
    • A mock server

    Build

    • A complete OpenAPI file for your service with examples
    • A mock server so a front-end developer can start before the code exists

    CheckpointSomeone else builds a working client from your contract alone.

  3. Stage 32 to 3 weeks

    Errors, lists and change

    Handle the awkward parts well.

    Learn

    • Helpful error messages and codes
    • Pagination, filtering and sorting
    • Idempotency and safe retries
    • Versioning and not breaking existing users

    Tools

    • A linter for API contracts
    • Contract tests
    • A changelog

    Build

    • Add pagination, filtering and a clear error format to your API
    • A plan for a breaking change with a deprecation notice

    CheckpointYou can change the API without breaking an existing client.

  4. Stage 42 weeks

    Protect the API

    Keep users and data safe.

    Learn

    • API keys, tokens and OAuth at a high level
    • Permissions: who may see or change what
    • Rate limits and abuse
    • Common weaknesses in the OWASP API list

    Tools

    • An OAuth provider
    • A gateway with rate limits
    • A security checklist

    Build

    • Add authentication and per-user permissions to your API
    • A test showing one user cannot read another user's data

    CheckpointYour API passes your own security checklist, and you can show the tests.

  5. Stage 5Ongoing

    Other styles and running it

    Know when REST is not the answer, and watch it in production.

    Learn

    • GraphQL and gRPC: when and why
    • Webhooks and events
    • Monitoring: speed, errors and usage
    • Writing guides and examples developers read

    Tools

    • A GraphQL or gRPC tutorial project
    • Monitoring dashboards
    • A documentation site

    Build

    • A short decision note: REST, GraphQL or gRPC for three scenarios
    • A getting-started guide with a working first call in five minutes

    CheckpointA developer can make a first successful call in five minutes from your guide.

Afterwards

Roles this prepares you for

All career paths

Tools and model names change quickly. Treat the names here as examples, and check each tool's own documentation for what is current.