Skip to content

Simple REST API for notes management created as a challenge for the "Publicando Sua API REST na Nuvem Usando Spring Boot 3, Java 17 e Railway" course from DIO.

License

Notifications You must be signed in to change notification settings

lsmcodes/java-notes-api

Repository files navigation

Notes API

Overview

A notes API created as a challenge for the "Publicando Sua API REST na Nuvem Usando Spring Boot 3, Java 17 e Railway" course by DIO.

Endpoints

This API provides the following endpoints:

Authentication

URI Method Action Parameters Request Body
/notes-api/login POST Authenticates a user and generates a JWT token N/A Authentication Schema

Authentication schema

{
  "username": "user",
  "password": "1234567890"
}

User

URI Method Action Parameters Request Body
/notes-api/users POST Creates a user N/A User Schema
/notes-api/users GET Retrieves the authenticated user details N/A N/A
/notes-api/users PUT Updates the authenticated user details (invalidates the current JWT token, a new token must be issued, unless the details are reverted to their original values) N/A User Schema
/notes-api/users DELETE Deletes the authenticated user N/A N/A

User Schema

{
  "name": "Default User",
  "username": "user",
  "password": "1234567890"
}

Notes

URI Method Action Parameters Request Body
/notes-api/notes POST Creates a note N/A Note Schema
/notes-api/notes/{id} GET Retrieves a note by id id N/A
/notes-api/notes GET Retrieves all notes page, size, property, sortDirection N/A
/notes-api/notes/term GET Retrieves all notes containing a term whether in title or content term, page, size, property, sortDirection N/A
/notes-api/notes/tags GET Retrieves all notes containing at least one of the specified tags tags, page, size, property, sortDirection N/A
/notes-api/notes/{id} PUT Updates a note by id id Note Schema
/notes-api/notes/{id} DELETE Deletes a note by id id N/A
/notes-api/notes DELETE Deletes all notes N/A N/A

Note Schema

{
  "tags": [
    "tag1",
    "tagN"
  ],
  "title": "Untitled",
  "content": "Sample content"
}

Documention

Swagger available in the following URL, only with dev or test profile:

http://localhost:8080/swagger-ui/index.html

License

This project is under the MIT license.

About

Simple REST API for notes management created as a challenge for the "Publicando Sua API REST na Nuvem Usando Spring Boot 3, Java 17 e Railway" course from DIO.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published