Code Monkey home page Code Monkey logo

report-manage's Introduction

Report Manage API

The Report Management API is designed to manage reports and user authentication. This document provides an overview of the available endpoints and their functionalities.

Authentication

Register

  • Endpoint: /api/v1/auth/register
  • Method: POST
  • Description: Allows users to register by providing their information such as name, email, password, and isAdmin.
  • Authentication: Not required.

Login

  • Endpoint: /api/v1/auth/login
  • Method: POST
  • Description: Allows registered users to log in by providing their email and password.
  • Authentication: Not required.

Refresh Token

  • Endpoint: /api/v1/auth/refreshToken
  • Method: POST
  • Description: Refreshes the access token using a valid refresh token.
  • Authentication: Not required.

Reports

Get All Reports

  • Endpoint: /api/v1/reports
  • Method: GET
  • Description: Retrieves a list of all reports.
  • Authentication: Required.

Create a Report

  • Endpoint: /api/v1/reports
  • Method: POST
  • Description: Creates a new report by providing report details such as name, email, phone, address, profession, and favoriteColors.
  • Authentication: Required.
  • Authorization: Required (Admin only).

Update a Report

  • Endpoint: /api/v1/reports/:id
  • Method: PUT
  • Description: Updates an existing report by providing report details such as name, email, phone, address, profession, and favoriteColors. Requires the report's ID as a parameter.
  • Authentication: Required.
  • Authorization: Required (Admin only).

Delete a Report

  • Endpoint: /api/v1/reports/:id
  • Method: DELETE
  • Description: Deletes an existing report. Requires the report's ID as a parameter.
  • Authentication: Required.
  • Authorization: Required (Admin only).

Comments

Get All Comments on a specific report

  • Endpoint: /api/v1/reports/{id}/comments
  • Method: GET
  • Description: Retrieves a list of all comments.
  • Authentication: Required.

Post a Comment on a specific report

  • Endpoint: /api/v1/reports/{id}/comments
  • Method: POST
  • Description: Post a Comment on a specific report.
  • Authentication: Required.

Bookmarks

Bookmark a specific report

  • Endpoint: /api/v1/reports/{id}/bookmark
  • Method: PUT
  • Description: Bookmark a specific report.
  • Authentication: Required.

Get all bookmark reports on a verify user

  • Endpoint: /api/v1/users/bookmarks
  • Method: GET
  • Description: Retrive a report list along with user info.
  • Authentication: Required.

-- Before you begin, ensure you have met the following requirements:

Run this Project

git clone https://github.com/saifakib/report-manage.git
cd your-project-name
npm install
npm run dev

report-manage's People

Contributors

saifakib 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.