Skip to content

Endpoints

Raphaël Balet edited this page Jan 14, 2025 · 2 revisions

Rules: Always plural

  • GET /companies -> should get the list of all companies
  • GET /companies/34 -> get the details of company 34
  • DELETE /companies/34 -> delete company 34

Resources under a resource

  • GET /companies/3/employees -> get the list of all employees from company 3
  • GET /companies/3/employees/45 -> get the details of employee 45, who belongs to company 3
  • DELETE /companies/3/employees/45 -> delete employee 45, who belongs to company 3
  • POST /companies -> create a new company and return the details of the new company created

Writtings

  • Only use lowercase letters
  • White space use Kebab-case -> company-names
Clone this wiki locally