Skip to content

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

URIMethodActionParametersRequest Body
/notes-api/loginPOSTAuthenticates a user and generates a JWT tokenN/AAuthentication Schema

Authentication schema

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

User

URIMethodActionParametersRequest Body
/notes-api/usersPOSTCreates a userN/AUser Schema
/notes-api/usersGETRetrieves the authenticated user detailsN/AN/A
/notes-api/usersPUTUpdates 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/AUser Schema
/notes-api/usersDELETEDeletes the authenticated userN/AN/A

User Schema

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

Notes

URIMethodActionParametersRequest Body
/notes-api/notesPOSTCreates a noteN/ANote Schema
/notes-api/notes/{id}GETRetrieves a note by ididN/A
/notes-api/notesGETRetrieves all notespage, size, property, sortDirectionN/A
/notes-api/notes/termGETRetrieves all notes containing a term whether in title or contentterm, page, size, property, sortDirectionN/A
/notes-api/notes/tagsGETRetrieves all notes containing at least one of the specified tagstags, page, size, property, sortDirectionN/A
/notes-api/notes/{id}PUTUpdates a note by ididNote Schema
/notes-api/notes/{id}DELETEDeletes a note by ididN/A
/notes-api/notesDELETEDeletes all notesN/AN/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

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages