APIs and HTTP

14 min read

An API is how one program asks another program for something. HTTP is the set of rules they use to talk. In this lesson you learn methods, paths, status codes and JSON, and you try them in a small playground.

New words

API
A way for one program to ask another program for data or work.
HTTP method
A word like GET or POST that says what you want to do.
Status code
A number in the reply that tells you if the request worked.
JSON
A simple text format for data, made of names and values.
Header
Extra information sent with a request, such as an API key.
API key
A secret code that shows who is calling the API.
REST
A common style for APIs, built around things like orders and users.

What you will learn

  1. The problem: the kitchen is behind a wall
  2. HTTP methods: what do you want to do?
  3. URLs and paths: which thing?
  4. Status codes: did it work?
  5. JSON and headers: what is inside?
  6. Try it: an API playground
  7. What does REST mean?
  8. Trade-offs
  9. In a real system
  10. Key takeaways

10 quiz questions at the end.

Start this lesson

The full lesson, with interactive demos and the quiz, opens after you sign in with Google. It is free.

All lessons · Back to the roadmap