Intro to APIs Lab

Lab Objectives

  • Practice reading API documentation and making requests in Postman
  • Build an understanding of what makes good API documentation

Pokemon API

We will start by using the Pokemon API and make all requests using Postman.

  1. What API request returns the information about the Pokemon Bulbasaur? 🌶️ What’s a second API request that would return this same information?
  2. What API request returns all of the fire type Pokemon?
  3. What API request returns all of the green colored Pokemon?

✅ Send your pokemon requests to your instructors in a DM.

Pagination

Read this overview of API Pagination. Then work on the following questions.

  1. What API request returns the first 10 Pokemon?
  2. What API request returns the Pokemon with ids 11-20?
  3. How many Pokémon are there in total? What request returns this information?

✅ Send your pokemon requests to your instructors in a DM.

Cat Api

We will work with the Cat Api and make all requests using Postman.

  1. What API request returns a cat image?
  2. What API request returns 10 cat images?
  3. What API request returns all of the available cat breeds?
  4. What API request the cat image with id 7ok?
  5. What API request will return 5 images of Tonkenese cats? The breed_id for Tomkenese is tonk.

✅ Send your cat requests to your instructors in a DM.

🌶️ Try signing up for an API key. An API key is a string of characters that uniquely identifies you, and it should be treated like a password and kept secret. When you include your API key as a header, you should be able to retrieve 100 images instead of 10 and make requests to the premium jokes endpoint.

What Makes Good API Documentation?

Today you have seen 4 examples of API documentation:

Take another look at these four examples of documentation and reflect on the following questions:

  • What makes API documentation easy to understand?
  • What makes API documentation hard to understand?
  • What have you learned from these examples that you want to want to remember when you write your own API documentation?

✅ Send your reflections to your instructors in a DM.

Lesson Search Results

Showing top 10 results