RESTful Design & Routes: Organizing Your API Like a Pro

Published: (February 19, 2026 at 03:34 PM EST)
1 min read
Source: Dev.to

Source: Dev.to

What is REST?

REST (Representational State Transfer) is a set of rules for designing APIs.

Bad API examples

  • /getUser
  • /fetchAllPosts
  • /doLogin

Good REST API examples

  • /users
  • /posts
  • /auth/login

Clean, predictable, and organized.

Structured Routes (Day 2 of the GDGoC Bowen 30‑Day Challenge)

RouteMethodDescription
/GETHome – Welcome message
/aboutGETAbout the API
/statusGETHealth check
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def home():
    return {
        "msg": "Welcome to my API",
        "version": "1.0",
        "track": "Backend Development"
    }

@app.get("/about")
def about():
    return {
        "name": "Fiyinfoluwa Ojo",
        "challenge": "GDGoC Bowen 30 Day Challenge",
        "track": "Backend Development",
        "day": 2
    }

@app.get("/status")
def status():
    return {
        "status": "up",
        "message": "Server is running smoothly"
    }

Live Response

Every production API has a health‑check endpoint.

Day 2 done. 28 more to go. 🔥

0 views
Back to Blog

Related posts

Read more »