GithubHelp home page GithubHelp logo

nest-note-api's Introduction

Nest Note Rest API

Summary

api server for note application client web https://github.com/wiklapandu/-client-note-app.git

Features

  • Authorization
    • login
    • register
  • Note
    • get all note by author id
    • get detail note
    • create note
    • update note
    • delete note

API

Authorization

POST /auth/login (authorize user and return token)
Body
name type data type description
username required string username of user
password required string password of user
Responses
http code content-type response
200 application/json {"status":"success","message":"Welcome back", "token": "AUTHORIZATION_TOKEN"}
400 application/json {"status":"unauthorized","message":"ERROR_MESSAGE"}

POST /auth/register (register user)
Body
Name Type Data Type Description
username required string username of user
email email, required string email of user
password password, required string password of user
Responses
http code content-type response
201 application/json {"status":"success","message":"success register user", "data": <User>[]}
400 application/json {"status":"failed","message":"Failed Register user", "error": error}

Note

GET /note (Get all notes by author id)
Headers
Name Type Data Type Description
Authorization required string we can get the token from endpoint login
Query
Name Type Data Type Description
status N/A string status of note
search N/A string for search note by title, and content
Responses
http code content-type response
201 application/json {"status":"Success","data": <Note>[]}

GET /note/:id (get detail of note by id)
Headers
Name Type Data Type Description
Authorization required string we can get the token from endpoint login
Params
Name Type Data Type Description
id required, uuid string id of note
Responses
http code content-type response
201 application/json {"status":"success","data": <Note>}
400 application/json {"status":"failed","message":"Failed error","error":error}

POST /note (store note)
Headers
Name Type Data Type Description
Authorization required string we can get the token from endpoint login
Body
Name Type Data Type Description
title required string title of note
content required string content of note
color required string color of note
status required string status of note
Responses
http code content-type response
201 application/json {"status":"success","message":"created note","note": <Note>}
400 application/json {"status":"failed","message":"Failed error","error":error}

PUT /note/:id (store note)
Headers
Name Type Data Type Description
Authorization required string we can get the token from endpoint login
Params
Name Type Data Type Description
id required, uuid string id of note
Body
Name Type Data Type Description
title required string title of note
content required string content of note
color required string color of note
status required string status of note
Responses
http code content-type response
201 application/json {"status":"success","message":"success update note"}
400 application/json {"status":"failed","message":"Failed update error","error":error}

nest-note-api's People

Contributors

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