The Brew Ha Ha API
Learn how I designed and documented a RESTful API using the Django REST Framework.
Length of project
July 2024 - current
Project overview
Last summer, I decided to learn how to build my own API. I’d had plenty of exposure to using APIs and writing how-to guides about APIs, but I wanted to build one myself. Having a deeper understanding of APIs would be an asset in any future technical writing role, and I always enjoy a good challenge. I understand how endpoints work, but how do developers actually build the endpoints? I know what JWT authentication is, but how is that implemented in the code? I wanted to get the answers to these questions.
I built the API with the Django REST framework. I picked this framework because I am most familiar with Python.
API overview
The Brew Ha Ha API is an API for managing snack and drink orders at a café-style establishment. It allows customers to:
- Browse available snacks and drinks
- Place orders containing one or more items
- Retrieve details of orders
The project is structured with separate Django apps for snacks, drinks, and orders. The API uses Django REST Framework serializers and views to handle data input and output.
There are some improvements I can make to the API to closely resemble an API I might use myself. I’m continuing to make those improvements and hope to deploy the API to the cloud at some point.
Tools I used
- Building the API: Django REST Framework
- Documenting the API: Astro
Work samples
You can view the code for the Brew Ha Ha API on my GitHub profile. The API documentation for the API is hosted on Netlify.