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.
This API provides the following endpoints:
URI | Method | Action | Parameters | Request Body |
---|---|---|---|---|
/notes-api/login |
POST | Authenticates a user and generates a JWT token | N/A | Authentication Schema |
{
"username": "user",
"password": "1234567890"
}
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 |
{
"name": "Default User",
"username": "user",
"password": "1234567890"
}
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 |
{
"tags": [
"tag1",
"tagN"
],
"title": "Untitled",
"content": "Sample content"
}
Swagger available in the following URL, only with dev
or test
profile:
http://localhost:8080/swagger-ui/index.html
This project is under the MIT license.