Skip to content

Rename API routes to follow REST plural conventions #46

Description

@soumyaray

Summary

All API routes currently use singular resource names (e.g., /api/course/:id, /api/account/:id). The broader REST convention is to use plural nouns for resource collections (e.g., /api/courses/:id, /api/accounts/:id).

Current routes (singular)

  • /api/account
  • /api/course
  • /api/course/:id/event
  • /api/course/:id/location
  • /api/course/:id/attendance
  • /api/course/:id/enroll

Proposed routes (plural)

  • /api/accounts
  • /api/courses
  • /api/courses/:id/events
  • /api/courses/:id/locations
  • /api/courses/:id/attendance (mass noun — plural may not apply)
  • /api/courses/:id/enrollments

Scope

  • Backend: Roda route definitions in app/application/controllers/
  • Frontend: API calls in frontend_app/
  • New feature branches (e.g., assignments) should adopt plural conventions from the start

Notes

  • This is a refactor — no behavior change
  • Frontend API calls must be updated to match
  • Could be done incrementally per resource or all at once

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions