This page is a work in progress.You can help improve it. →

Introduction to APIs

In this project, you will practice accessing an API. You'll see how an API request is made, and see how data is returned from an API

Objectives

  • Demonstrate usage of APIs
  • Understand how an API request is sent.
  • Understand the request and response for an API.

Explorer Mode

  • [] Choose one of the APIs from this list that does not request "AUTH" (Authorization) since an API that requires authorization is a little more difficult to use when first learning. I have also selected some sample APIs that will be good choices:
APIDocumentation
Dogshttps://dog.ceo/dog-api/
Studio Ghiblihttps://ghibliapi.herokuapp.com/#tag/Films
Open Breweryhttps://www.openbrewerydb.org/
Recipeshttp://www.recipepuppy.com/about/api/
Deck of Cards!http://deckofcardsapi.com/
Geocodehttps://geocode.xyz/api
Lyricshttps://lyricsovh.docs.apiary.io/#reference
Quoteshttps://pprathameshmore.github.io/QuoteGarden/
SpaceXhttps://docs.spacexdata.com/?version=latest
Jokeshttps://github.com/15Dkatz/official_joke_api
Star Wars APIhttps://swapi.dev
Harvard Art Museum API (this one requires an API key, but set up is very simple)https://www.harvardartmuseums.org/collections/api
  • After choosing your API read the documentation.
  • Use the Insomnia tool to make a few queries of the API.
  • Capture screenshots from Insomnia showing your request and the response output.
  • Attach those screenshots to your homework assignment.
  • For one response, show a screenshot with the "Header" tab displayed.
  • For this response, find a few headers and describe what they do. NOTE: If the header starts with X- it is a custom header and likely is documented by your API. Other headers are more standard and can be google searched.

Adventure Mode

Read the documentation on this API: https://one-list-api.herokuapp.com/

Choose your access token from your first and last name. For example jane-doe or ron-swanson.

  • Use Insomnia to insert 6 items in the list associated with your access token. Attach screenshots of the request and results screen.
  • Use Insomnia to mark 2 of these items complete. Attach screenshots of the request and result screen.
  • Use Insomnia to delete 1 of the non-complete items. Attach screenshots of the request and result screen.

Epic Mode

  • Investigate using C#'s HttpClient class to make requests to any of the APIs you used in Adventure mode.
  • Create a console app that makes requests and prints the results. Submit the URL to the Github repository of this console app.
© 2017 - 2022; Built with ♥ in St. Petersburg, Florida.