Giter Club home page Giter Club logo

fancy-kanban's Introduction

Kanban Server

Kanban Server endpoints


User endpoints


GET /register : register new user

Request Header

{
  not needed
}

Request Body

{
  "name": "<posted name>"
  "email": "<posted email>",
  "password": "<posted password>"
}

Response (201 - Created)

{
  "id": "<user id given by system>",
  "name": "<posted name>"
  "email": "<posted email>",
  "password": "<hashed posted password>",
  "createdAt": "<date given by system>",
  "updatedAt": "<date given by system>",
}

Response (400 - Bad Request)

{
  "message": "<first validation error caught>"
}

Response (500 - Internal Server Error)

{
  "message": "internal server error"
}

POST /login : user login using registered account

Request Header

not needed

Request Body

{
  "email": "<email post>",
  "password": "<password post>",
}

Response (200)

{
  "id": "<user id>",
  "name": "<user name>",
  "email": "<user email>",
  "access_token": "<user access_token>",
}

Response (400 - Bad Request)

{
  "message": "<first validation error caught>"
}

Response (404 - Not Found)

{
  "message": "<message email unregistered>"
}

Response (500 - Internal Server Error)

{
  "message": "internal server error"
}

Task endpoints


GET /tasks : show all task

Request Header

{
  "access_token": "<your access token>"
}

Request Body

not needed

Response (200)

[
  {
    "id": "<task id>",
    "title": "<task title>",
    "category": "<task category>",
    "UserId": "<creator id>",
    "createdAt": "<date task created>",
    "updatedAt": "<date last time task updated>"
  },
  {
    "id": "<task id>",
    "title": "<task title>",
    "category": "<task category>",
    "UserId": "<id creator>",
    "createdAt": "<date task created>",
    "updatedAt": "<date last time task updated>"
  },
]

Response (500 - Internal Server Error)

{
  "message": "internal server error"
}

POST /tasks : add new task

Request Header

{
  "access_token": "<your access token>"
}

Request Body

{
  "title": "<task title>",
  "category": "<task category>",
}

Response (201 - Created)

{
  "id": "<task id>",
  "title": "<task title>",
  "category": "<task category>",
  "UserId": "<id creator>"
  "createdAt": "<date given by system>",
  "updatedAt": "<date given by system>"
}

Response (400 - Bad Request)

{
  "message": "<first validation error caught>"
}

Response (500 - Internal Server Error)

{
  "message": "internal server error"
}

GET /tasks/:id : find task by id

Request Header

{
  "access_token": "<your access token>"
}

Request Body

not needed

Response (200)

{
  "id": "<id of found task>",
  "title": "<title of found task>",
  "category": "<category of found task>",
  "UserId": "<creator id of found task>"
  "createdAt": "<date created of found task>",
  "updatedAt": "<updateAt of found task>",
}

Response (401 - Unauthorized)

{
  "message": "<unauthorized message>"
}

Response (404 - Not Found)

{
  "message": "<message task not found>"
}

Response (500 - Internal Server Error)

{
  "message": "internal server error"
}

PATCH /tasks/:id : edit task

Request Header

{
  "access_token": "<your access token>"
}

Request Body

{
  "title": "<task title>",
  "category": "<task category>"
}

Response (200)

{
  "id": "<task id>",
  "title": "<task title>",
  "category": "<task category>",
  "UserId": "<id creator>",
  "createdAt": "<date given by system>",
  "updatedAt": "<date given by system>"
}

Response (400 - Bad Request)

{
  "message": "<first validation error caught>"
}

Response (401 - Unauthorized)

{
  "message": "<unauthorized message>"
}

Response (404 - Not Found)

{
  "message": "<task not found message>"
}

Response (500 - Internal Server Error)

{
  "message": "internal server error"
}

DELETE /tasks/:id : delete task

Request Header

{
  "access_token": "<your access token>"
}

Request Body

not needed

Response (200)

{
  "id": "<deleted task id>",
  "title": "<deleted task title>",
  "category": "<deleted task category>",
  "UserId": "<deleted task creator id>"
  "createdAt": "<deleted task date created>",
  "updatedAt": "<deleted task updateAt>"
}

Response (401 - Unauthorized)

{
  "message": "<unauthorized message>"
}

Response (404 - Not Found)

{
  "message": "<task not found message>"
}

Response (500 - Internal Server Error)

{
  "message": "internal server error"
}

fancy-kanban's People

Contributors

faturachmanyusup avatar sursev07 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.