Build an API of Your Own

Your request line now does what Gloria asked, and you’ve explained it to the mentor and changed it to follow a rule you hadn’t seen. Gloria handed you a brief, though. The next API you build won’t come with one.

In this lesson, you’ll write that brief yourself for a small API from your own life, then build it with the method you used for the request line. You’ll end with a pitch, its resources and endpoints, and a mentor review once you’ve built some of it. Start with the pitch.

Write the Pitch Gloria Wrote for You

Gloria’s brief said who needs the API and what correct means, and you need both before any code. A pitch is one paragraph: who uses the API, how they manage without it now, and what changes once it exists. Then come the resources, the rules, the endpoints, and the checks, as Gloria’s brief had them.

Keep it small enough to finish. One or two resources and one or two rules are plenty. Store the data in a JSON file. Logins, a database, and putting the API online are out of scope here, so leave them out of the pitch. That’s for later.

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.