This project is an API built using Java, Java Spring, AWS Simple Queue Service, Mongo DB and AWS Simple Storage Service.
The Microservice was developed with Fernanda Kipper Youtube Channel, to demonstrate how to solve the AnotaAi Backend Challenge.
- Clone the repository:
git@github.com:PedroH183/ApiAnotaAiChallenge.git
-
Install dependencies with Maven
-
Create a configuration with your runtime environment variables with your AWS Credentials that are used in
application.properties
aws.region=us-east-1
aws.accessKeyId=${AWS_KEY_ID}
aws.secretKey=${AWS_SECRET}
Config Values
AWS_KEY_ID=VALUE;AWS_SECRET=VALUE2
- Start the application with Maven
- The API will be accessible at http://localhost:8080
The API provides the following endpoints:
API PRODUCT
POST /api/product - Create a new product
GET /api/product - Retrieve all products
PUT /api/product/{id} - Updates a product
DELETE /api/product/{id} - Delete a product
BODY
{
"title": "Produto para postar no tópico",
"description": "",
"ownerId": "4444444",
"categoryId": "659d558b0304df732ddd4587",
"price": 10000
}
API CATEGORY
POST /api/category - Create a new category
GET /api/category - Retrieve all categories
PUT /api/category/{id} - Updates a category
DELETE /api/category/{id} - Delete a category
BODY
{
"id": "393948882828",
"title": "Teste",
"description": "",
"ownerId": "4444444"
}