Giter Site home page Giter Site logo

node_rest_api's Introduction

node_rest_api

This is an API based on Node.js and the Express framework and uses the Sequelize library alongside a PostgreSQL database.

It has the following endpoints:

  • GET /API/users
  • GET /API/tasks
  • GET /API/projects
  • POST /API/users
  • POST /API/tasks
  • POST /API/projects

The database looks as follows:

database

GET /API/projects

This endpoint can be used to get and filter all the projects stored in the database.

It accepts the following query parameters:

  • name: Name of the project
  • body: Body of the project
  • score: Score of all tasks of the project
  • score_gt: Score of all tasks related to this project is greater than this number
  • score_lt: Score of all tasks related to this project is lesser than this number
  • assignee_name: Name of the assignee of the project
  • assignee_user_id: User ID of the assignee of the project
  • assignee_surname: Surname of the assignee of the project
  • assigner_name: Name of the assigner of the project
  • assigner_user_id: User ID of the assigner of the project
  • assigner_surname: Surname of the assigner of the project
  • status: Status of the project - active, inactive, declined, completed
  • page: The page number for pagination
  • limit: The number of records per page

GET /API/users

This endpoint can be used to get and filter all the users stored in the database.

It accepts the following query parameters:

  • email: The email address of the user
  • name: The name of the user
  • surname: The surname of the user
  • page: The page number for pagination
  • limit: The number of records per page

GET /API/tasks

This endpoint can be used to get and filter all the tasks stored in the database.

It accepts the following query parameters:

  • name: Name of the task
  • description: Description of the task
  • score: Score of the task
  • score_gt: Score of all tasks greater than this number
  • score_lt: Score of all tasks lesser than this number
  • assignee_name: Name of the assignee of the task
  • assignee_user_id: User ID of the assignee of the task
  • assignee_surname: Surname of the assignee of the task
  • assigner_name: Name of the assigner of the task
  • assigner_user_id: User ID of the assigner of the task
  • assigner_surname: Surname of the assigner of the task
  • status: Status of the task from - active, inactive, declined, completed
  • page: The page number for pagination
  • limit: The number of records per page

POST /API/projects

This endpoint can be used to add a project to the database.

It accepts a JSON object with the following keys:

  • name: Name of the project
  • body: Body of the project
  • status: Status of the project - active, inactive, declined, completed
  • user_id: User ID of assigner

POST /API/users

This endpoint can be used to add a user to the database.

It accepts a JSON object with the following keys:

  • name: Name of the user
  • email: Email of the user
  • surname: Surname of the user

POST /API/tasks

This endpoint can be used to add a task to the database.

It accepts a JSON object with the following keys:

  • name: Name of the task
  • description: description of the task
  • status: Status of the task - active, inactive, declined, completed
  • score: Score of the task
  • user_id: User ID of assigner
  • assignee_id: User ID of assignee_id
  • project_id: ID of project this task is associated with

node_rest_api's People

Contributors

sufian27 avatar

Watchers

James Cloos avatar  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.