Courses / Web apps & analytics / REST API Design

Free courseSelf-paced

REST API Design

Design a REST API contract in OpenAPI, from resources and errors to versioning, and prove a reference service matches it with lint, diff and conformance checks.

  • Who it's for. Developers who can read HTTP traffic and want to design APIs that clients can rely on.
  • Before you start. Networking Fundamentals or equivalent: read raw HTTP, name method, status and headers, and run curl on loopback. Edit YAML and JSON. For the capstone, write a small HTTP service in a language you know.
  • 27 to 47 hours of study with practice
  • 9 modules, 50 lessons
  • 3 guided projects and a final project

What you'll learn

  • Derive resources, URIs and operations from requirements and record them in OpenAPI.
  • Select methods, statuses and headers by their defined semantics, including idempotency.
  • Design an error contract with RFC 9457 problem documents.
  • Prevent lost updates with ETag and If-Match and set caching policies.
  • Classify breaking changes with a contract diff tool and verify a service against its contract.

Skills you'll gain

  • Resources
  • operations
  • HTTP semantics
  • Representations
  • schemas
  • Status
  • error contracts
  • Pagination
  • filtering
  • sorting
  • Concurrency control
  • caching headers
  • Versioning
  • evolution

Tools you'll use

  • OpenAPI
  • YAML and JSON
  • curl
  • oasdiff
  • RFC 9457 problem details

Details to know

  • Certificate on completionIssued after your final project is reviewed
  • 9 module checkpointsA quiz and a practical task close each module
  • Self-pacedStudy any time; your progress is saved

How every lesson works

Each lesson follows the same four steps, so you always know what comes next.

  1. 01

    Watch & Learn

    A short animated video explains one idea at a time.

  2. 02

    Guided Practice

    Work through an example step by step and check the result.

  3. 03

    Quiz & Challenge

    Short questions check the idea has landed before you move on.

  4. 04

    Mini Project

    Build something useful from a project brief.

Learn at your own pace

This is a self-paced course. There are no live classes and no fixed timetable.

  • Start any timeStudy when it suits you. Lessons are short, so they fit around work or college.
  • Pick up where you left offYour progress is saved to your account.
  • Ask when you're stuckUse Ask Mentor inside the learning platform.

Your path in 3 phases

Each phase ends with something you have built and checked.

  1. 01

    Modules 1 to 3

    Resources and HTTP semantics

    Turn requirements into resources and operations, apply HTTP semantics and model schemas.

    You build: Tool-lending contract draft that lints without errors.

  2. 02

    Modules 4 to 6

    Errors, lists and concurrency

    Design error contracts, paginated lists and concurrency and caching headers.

    You build: Errors, lists and concurrency in the contract.

  3. 03

    Modules 7 to 9

    Security, evolution and verification

    State auth boundaries, version and document the API, and verify it against a reference service.

    You build: Secured, versioned and verified contract with a reference service.

Full curriculum

9 modules and 50 lessons, 27 to 47 hours of study

01Resources and operations6 lessons, 2 to 4 hours

Lessons

  • Finding resources in a requirement list
  • Collection and item URIs
  • Nesting and references between resources
  • Modelling actions that are not plain create or update
  • Identifiers that survive change
  • Drafting the first OpenAPI paths skeleton

After this module you can

  • Extract resource nouns from a list of user needs and discard verbs, screens and database tables that are not resources.
  • Write collection and item URI templates with plural nouns, stable path parameters and no verbs, and justify each choice.
  • Write a valid OpenAPI document with info, servers, tags and paths containing unique operationIds and summaries, and lint it with Spectral.
02HTTP semantics6 lessons, 2 to 4 hours

Lessons

  • Safe and idempotent methods as a retry contract
  • Creating resources with POST and PUT
  • Partial updates: PUT, PATCH and JSON Patch
  • DELETE and what a repeat means
  • Making POST safe to retry with idempotency keys
  • Content negotiation and media types

After this module you can

  • Classify GET, HEAD, OPTIONS, PUT, DELETE, POST and PATCH as safe and or idempotent from RFC 9110 and state the retry advice each classification gives a client.
  • Decide between POST to a collection and PUT to a client-chosen URI for creation, and specify 201, Location and the response body for each.
  • Declare request and response media types per operation and specify the responses for an unsupported Content-Type or unavailable Accept value.
03Representations and schemas5 lessons, 2 to 3 hours

Lessons

  • Separating input shape from stored shape
  • Choosing types for money, time and enumerations
  • Required, optional, nullable and absent
  • Reuse with $ref and composition
  • Examples that validate against their schema

After this module you can

  • Define distinct create-input and stored-resource schemas so server-set fields such as id and timestamps never appear as client-writable.
  • Pick wire types for money, instants, durations and fixed vocabularies so that no precision, time zone or spelling ambiguity enters the contract.
  • Attach examples to request and response media types and make them pass Spectral's example-validation rules so documentation cannot drift from schemas.
04Status and error contracts6 lessons, 2 to 4 hours

Lessons

  • Choosing status codes by outcome
  • The problem details document
  • Reporting validation errors as an extension member
  • Problem types as a stable catalogue
  • Documenting error responses in OpenAPI
  • Server failures, rate limits and what errors must not reveal

After this module you can

  • Map each outcome of an operation to one status code from the 2xx, 3xx, 4xx and 5xx families and justify the choice between near neighbours such as 400 and 422, 401 and 403, 404 and 409.
  • Write an RFC 9457 application/problem+json body with type, title, status, detail and instance and say what each member is for and who reads it.
  • Specify 5xx and 429 behaviour, including retry guidance, and set rules so error responses do not leak internals or the existence of protected resources.
05Pagination, filtering and sorting5 lessons, 2 to 3 hours

Lessons

  • Offset and limit pagination and where it breaks
  • Cursor pagination and opaque tokens
  • Page links and list envelopes
  • Filtering and sorting parameters
  • Documenting list endpoints once with shared parameters

After this module you can

  • Specify offset and limit parameters with defaults and caps, and demonstrate with a concrete example how concurrent inserts make offset pages skip or repeat items.
  • Design a cursor-based list with an opaque token, a stable sort order and defined behaviour for expired or malformed cursors.
  • Move pagination, filter and sort definitions into components/parameters and reuse them across list operations with consistent names and limits.
06Concurrency control and caching headers6 lessons, 2 to 4 hours

Lessons

  • The lost update problem
  • Entity tags and If-Match preconditions
  • Requiring conditional requests: 428 and choosing 409 or 412
  • Cache-Control freshness for GET responses
  • Conditional GET with If-None-Match and 304
  • Vary, invalidation and a per-endpoint cache policy

After this module you can

  • Trace a read-modify-write race between two clients and show which update is silently lost without any version check.
  • Specify ETag in responses and If-Match in updates, with 412 Precondition Failed when the stored version differs.
  • Complete a cache policy table that sets Vary headers, explains invalidation after unsafe methods and records every GET, PUT, PATCH, POST and DELETE decision.
07Authentication boundaries in the contract4 lessons, 2 to 3 hours

Lessons

  • 401, 403 and 404 as a denial vocabulary
  • Declaring security schemes and requirements in OpenAPI
  • Ownership and role boundaries in resource design
  • Keeping credentials out of URLs, logs and examples

After this module you can

  • Choose between 401, 403 and 404 for denied requests and document what each tells the caller and what it hides.
  • Declare a security scheme under components and apply it globally and per operation, including operations that explicitly require no authentication.
  • Write a credential-handling checklist for the contract covering where credentials may travel, what error bodies may echo and how examples and logs stay clean.
08Versioning, evolution and documentation6 lessons, 2 to 4 hours

Lessons

  • Comparing versioning strategies
  • Additive evolution and the tolerant client
  • Detecting breaking changes with oasdiff
  • Deprecation, Sunset and retirement timetables
  • Documentation quality inside the spec
  • Changelogs and migration guides

After this module you can

  • Compare path, header and media-type versioning and the option of evolving without explicit versions, and record a justified choice for the course API.
  • List the changes that can be made to a contract without breaking existing clients and state the rules clients must follow so those changes stay safe.
  • Turn oasdiff changelog output into a reader-friendly changelog and write a migration guide for the breaking change, with before and after requests.
09Contract verification6 lessons, 2 to 4 hours

Lessons

  • A lint gate with a ruleset and failure threshold
  • Writing custom lint rules for house style
  • Validating real responses against the schemas
  • A contract diff gate against the released baseline
  • An independent conformance table
  • Assembling the verification evidence pack

After this module you can

  • Configure Spectral with a ruleset file that extends spectral:oas, choose a fail-severity, and read exit status and JSON output to decide pass or fail.
  • Write two Spectral rules in the ruleset with given, then, function and severity that enforce the course's own conventions, and test them on passing and failing documents.
  • Compile lint, response validation, diff and conformance results into one dated pack with a pass or fail verdict per gate and a release checklist.

What you'll build

3 guided projects along the way, then a final project.

  • Tool-lending contract draft

    after module 3
  • Errors, lists and concurrency in the contract

    after module 6
  • Secured, versioned and verified contract with a reference service

    after module 9

Final project

Choose one domain: a community tool-lending library, a film-club equipment rental or a fictional clinic appointment desk; contract plus a persisted reference service.

What you submit

openapi.yaml and v2 file, ruleset, reference service source, recorded requests and a verification evidence pack.

How it's reviewed

Weighted rubric on resource design, HTTP semantics, schemas and errors and more; at least twelve operations over four resources must pass a hidden trainer set; trainer-reviewed demonstration.

Where you'll use it

  • Review a proposed endpoint for correct status codes and a consistent error body.
  • Check whether a contract change will break existing clients before release.

Roles that use these skills

  • API designer
  • Backend developer
  • Solutions architect (junior)

Earn the certificate by building, not watching

  1. Complete the lessons and pass each module checkpoint.
  2. Build your final project and demonstrate it.
  3. OUTLEARN reviews your project and issues your certificate. It is not issued automatically.

Frequently asked questions

Does the course teach a web framework?

No. It is a design course; for the capstone service you use a language you already know.

Do I design login flows?

No. You state authentication and ownership boundaries in the contract without designing credential flows.

Is the earlier course required?

No. Node.js and Express API Development is one route to the service skills, not a requirement.

Be first in when REST API Design opens

Email us and we will tell you as soon as enrolment opens.

Notify me when it opens
FreeOpens soon
Notify me