Chapter Exercise

Design and Build Great Web APIs — by Mike Amundsen (15 / 127)

The Pragmatic Programmers
The Pragmatic Programmers
2 min readApr 28, 2021

--

👈 What’s Next? | TOC | Chapter 2 Understanding HTTP, REST, and APIs 👉

For this exercise, you’ll extend the skills you learned in this chapter by curl-ing all three of the services you learned about in this chapter (Company, Account, and Activity) and storing the results in our services folder. You’ll then update your local repository and, finally, sync the remote GitHub repository with your local copy.

First, here are the URLs you can use to make API calls with curl to save in your services folder:

Use these URLs with the curl utility in the format curl <URL> > <filename> to save all seven responses to disk in the services subfolder of your project. We’ll use this services folder as the start of our API project and will start managing that project with Git in the next chapter.

See Appendix 2 (Solution for Chapter 1: Getting Started with API First) for the solution.

Footnotes

[7] https://www.programmableweb.com/api-university/understanding-api-first-design

[8] http://api-first.com

[9] http://asserttrue.blogspot.com/2009/04/api-first-design.html

[10] https://apievangelist.com/2014/08/11/what-is-an-api-first-strategy-adding-some-dimensions-to-this-new-question

[11] https://pragprog.com/titles/maapis/source_code

[12] https://github.com/kevinswiber/siren

[13] https://github.com/collection-json/spec

Copyright © 2020, The Pragmatic Bookshelf.

👈 What’s Next? | TOC | Chapter 2 Understanding HTTP, REST, and APIs 👉

Design and Build Great Web APIs by Mike Amundsen can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.

Unlisted

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.