- Git
- Maven 3.0+
- JDK 8+
- Docker 1.13.0+
- Docker Compose 1.23.1+
To get started you can simply clone this repository using git:
git clone https://github.com/codenation-dev/squad-2-ad-java-e-vue-presencial-ca-back.git
cd squad-2-ad-java-e-vue-presencial-ca-back
Run the application from the command line using:
mvn spring-boot:run
The H2 database will start running at http://localhost:8080/h2-console The app will start running at http://localhost:8080
Run the postgres database from the command line using:
docker run -d --network=host \
--name logstack-db \
-e POSTGRES_DB=logstack \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
postgres:10.4
Run the application from the command line using:
mvn spring-boot:run -Dspring-boot.run.profiles=test
To Stop the postgres database from the command line using:
docker stop logstack-db
To Start again the postgres database from the command line using:
docker start logstack-db
The app will start running at http://localhost:8080
Execute docker compose
docker-compose up
The app will start running at http://localhost:8080
https://logstack-api.herokuapp.com/swagger-ui.html
Namespace | URL | HTTP Verb | Result |
---|---|---|---|
Logs | /api/v1/logs | POST | Add log |
Logs | /api/v1/logs | GET | Return all logs |
Logs | /api/v1/logs/:id | GET | Return log by ID |
Logs | /api/v1//logs/export | GET | Export logs to .csv |
Logs | /api/v1/logs/:id/archive | PUT | Archive log by ID |
Logs | /api/v1/logs/:id/archive | DELETE | Unarchive log by ID |
Triggers | /api/v1/triggers | POST | Add Triggers |
Triggers | /api/v1/triggers | GET | Return all triggers |
Triggers | /api/v1/triggers/:id | GET | Return trigger by ID |
Triggers | /api/v1/triggers/:id | PUT | Update trigger by ID |
Triggers | /api/v1/triggers/:id/active | PUT | Active trigger by ID |
Triggers | /api/v1/triggers/:id/active | DELETE | Desactive trigger by ID |
Triggers | /api/v1/triggers/:id/archive | PUT | Archive trigger by ID |
Triggers | /api/v1/triggers/:id/archive | DELETE | Unarchive trigger by ID |
Users | /api/v1/users | GET | Return all users |
Users | /api/v1/users/:id | GET | Return user by id |
Alerts | /api/v1/alerts | GET | Return alerts |
OAuth | /oauth/signup | POST | Add user |
OAuth | /oauth/self | GET | Return user authenticated |
Customer | /api/v1/customers/self | GET | Return customer authenticated |
You can test them using postman or any other rest client.