Learn REST APIs: 20 free interactive lessons
Short lessons where you write real HTTP requests to a live café API and read every response: status, headers and JSON. Change any line and send it again.
Do it in the browser: a real REST APIs tool, a short mission and instant feedback. No install. Optional certificate at the end of the course.
Open the courseLessons
- What is an API?A program asks, another program answers: the request and the response.
- Anatomy of a requestMethod, path, headers and body: the four parts of every HTTP request.
- Status codesThree digits that say how the request went, before you read any body.
- JSONThe text format most APIs use to send data back and forth.
- Resources and URLsREST names things with nouns: a collection and the items inside it.
- CRUD with HTTP methodsCreate, read, update and delete map to POST, GET, PATCH and DELETE.
- PUT versus PATCHReplace the whole resource or change only some fields.
- Safe retriesNetworks fail: which requests can you safely send twice?
- Query parametersFilter, search and sort a collection with ?key=value.
- PaginationBig collections arrive in pages: limit, page and the next link.
- Caching with ETagsAsk "has it changed?" and get a tiny 304 when it has not.
- API versionsChange an API without breaking the apps that already use it.
- API keysIdentify the app that is calling, with a secret in a header.
- Login and tokensLog in once, then prove who you are with a bearer token.
- CORSWhy a browser may refuse to show your page an API response.
- Rate limitsAPIs ration requests so one client cannot overload everyone.
- Errors and retriesError bodies a program can read, and when to try again.
- WebhooksInstead of asking again and again, let the API call you.
- Docs with OpenAPIA machine-readable description of every route, used for docs, tests and code generation.
- Project: order flowLog in, browse, order safely and track: everything together.