Skip to content

Backend Routes

Randy Hac edited this page Aug 16, 2023 · 4 revisions

AUTHENTICATION

GET THE CURRENT USER

  • Method: "GET"
  • URL: "api/auth"

LOGIN A USER

  • Method: "POST"
  • URL: "api/auth/login"

SIGNUP A USER

  • Method: "POST"
  • URL: "api/auth/signup"

LOG OUT A USER

  • Method: ”DELETE”
  • URL: “api/auth/logout”

Projects

GET ALL PROJECTS OF A USER

Returns all servers by user ID

  • Method: “GET”
  • URL: “api/users/projects”

GET DETAILS OF A PROJECT SPECIFIED BY ITS ID

Returns the details of a project by its ID

  • Method: “GET”
  • URL: “api/projects/int:id”

CREATE A SERVER

Creates and returns a new project

  • Method: “POST”
  • URL: “api/projects”

EDIT A PROJECTS

Updates and returns an existing project

  • Method: “PUT”
  • URL: “api/projects/int:id”

DELETE A SERVER

Deletes an existing project

  • Method: “DELETE”
  • URL: “api/projects/int:id”

SECTIONS

GET ALL PROJECT SECTIONS BY PROJECT ID

Returns all project’s sections

  • Method: “GET”
  • URL: “api/projects/int:id/section”

GET A PROJECT SECTION DETAILS BY ITS ID

Returns the details of a section by its ID

  • Method: “GET”
  • URL: “api/section/int:id”

CREATE A PROJECT SECTION

Creates and returns a new section

  • Method: “POST”
  • URL: “api/projects/int:id/sections”

EDIT A PROJECT SECTION

Updates and returns an existing project section

  • Method: “PUT”
  • URL: “api/section/int:id”

DELETE A PROJECT SECTION

Deletes an existing project section

  • Method: “DELETE”
  • URL: “api/sections/int:id”

CARDS

GET ALL SECTION CARD BY SECTION ID

Returns all section cards

  • Method: “GET”
  • URL: “api/sections/int:id/card”

GET A SECTION CARD DETAILS BY ITS ID

Returns the details of a card by its ID

  • Method: “GET”
  • URL: “api/cards/int:id”

CREATE A CARD

Creates and returns a new card

  • Method: “POST”
  • URL: “api/sections/int:id/cards”

EDIT A CARD

Updates and returns an existing card

  • Method: “PUT”
  • URL: “api/cards/int:id”

DELETE A CARD

Deletes an existing card

  • Method: “DELETE”
  • URL: “api/cards/int:id”

Comments

GET All COMMENTS

Returns comments

  • Method: “GET”
  • URL: “api/cards//comments”

GET A COMMENT BY ITS ID

Returns the details of a comment by its ID

  • Method: “GET”
  • URL: “api/comments/id”

CREATE A COMMENT

Creates and returns a comment

  • Method: “POST”
  • URL: “api/cards/int:id/comment”

EDIT A COMMENT

Updates and returns a comment

  • Method: “PUT”
  • URL: “api/comments/id”

DELETE A COMMENT

Deletes an existing comment

  • Method: “DELETE”
  • URL: “api/comments/int:id”