Chapter 02 — Make your first API calls7 min read

Chapter quiz

Test yourself

Four lessons down. You know what an API is, how requests work, and you've sent real ones. Let's see what stuck.


The basics

In the restaurant analogy, what is the API?

What is an endpoint?

Your app sends data to Stripe to charge a customer. In this scenario, who is the client?


Requests

Which HTTP method would you use to create a new user?

What do query parameters do?

Which part of a request carries the data you're sending to the server?


Responses

You send a GET request and receive a 404 status code. What happened?

What does a 201 Created status code mean?

You get a 500 Internal Server Error. Whose fault is it?

You POST a user with 4 fields and get back 5 fields. Why?


Internal vs. external APIs

When the Airbnb app loads your bookings from Airbnb's own servers, what type of API call is that?

When Airbnb uses Stripe to charge your card, what type of API call is that?


You're done with Chapter 2. You can now explain what an API is, read a request and a response, and you've sent real API calls yourself. Next up: learning to read API documentation so you can figure this stuff out on your own.