Simple REST Webservice using Dropwizard 4.0 beta and Cassandra Driver 4.15
###Requirements
- Cassandra
- Java 11
- Curl
Apply keyspace and table from cql folder.
./cqlsh -f src/main/resources/cql/db.cql
Build app via gradle
./gradlew clean build
Start service via the fat jar
java -jar build/libs/cass-dropwizard-all.jar server config.yml
Check health of the service
curl http://localhost:9000/health-check
Create data via curl
curl -v -XPOST "localhost:9000/person" -H "Content-Type: application/json" -d '{"id": "66992983-af17-43ad-9fc9-b9a654a42d36", "firstName": "how", "lastName": "Ilove", "email": "jss@test.de"}'
Query single person
curl -v "localhost:9000/person/66992983-af17-43ad-9fc9-b9a654a42d36"
Query all persons
curl -v "localhost:9000/person/all"
Query count
curl -v "localhost:9000/person/count"
DELETE data
curl -v -XDELETE "localhost:9000/person/66992983-af17-43ad-9fc9-b9a654a42d36"