There are many ways to build an API. If you were to consider all of the possible approaches, you would never build anything. There are a couple of key principles you have to keep in mind.

Before I say to much, I want to try and explain what we are doing. We are basically storing data in a relational database in tables. Tables are not initiative, and we need a way to connect multiple tables together. The basic steps we follow are:

  1. Define our objects in software with an ORM framework

  2. Create the database structure to match our software

  3. Build API calls to set retrieving the data

api_assumptions.txt

This file stores key values that will make the API construction much easier.

[api_assumptions.txt]

DOMAIN_BASE=yellowstone.com/api/v1/

PROGRAMMING_LANGUAGE=[Ruby v3.2.2](https://www.ruby-lang.org/en/news/2023/03/30/ruby-3-2-2-released/)

PROGRAMMING_FRAMEWORK= [Rails 8.0.1](https://rubyonrails.org/2024/12/13/Rails-Version-8-0-1-has-been-released)

ORM_Framework=Active Record

DATABASE_TYPE=PostGreSQL v17.2

API_SWAGGER=[Swagger 2.0](https://github.com/rswag/rswag)

OPENAPI=[OpenApi 3.0 ](https://spec.openapis.org/oas/v3.1.0.html)

LOGGING=[Sentry.io](Sentry.io)

ALERTING=[Slack Webhook](https://hooks.slack.com/services/T04R116SG12/B086S9A3UKT/qjr5hfYsY1R9]

SLACK_INFO=https://api.slack.com/apps/A06H1UEGEKG/incoming-webhooks?success=1