Requirements: mvn
, gloud
cli (logged in to Project EPIC GCloud project).
make run
- To check that your application is running enter url
http://localhost:8080
Requirements: mvn
, docker
make build
Requirements: mvn
, docker
, access to cloud.docker.com/u/projectepic/ from your dockerhub account.
- Edit
Makefile
and updateTAG_CLIENT
variable to new version make push
List all events from Database.
Response
[
{
"name": "bombcyclone2019",
"keywords": [
"snow",
"cyclone",
"#bombcyclone",
"colorado",
"floods"
],
"description": "Tracking bomb cyclone from Colorado happened March 13th",
"normalized_name": "bombcyclone2019",
"status": "NOT_ACTIVE",
"created_at": 1552643251592,
"created_at_str": "2019-03-15 03:47:31.592"
},
{
"name": "name 2",
"keywords": [
"kasdas1",
"kasdasd2"
],
"description": "d2",
"normalized_name": "name-2",
"status": "NOT_ACTIVE",
"created_at": 1552884762193,
"created_at_str": "2019-03-17 22:52:42.193"
}
]
Status code
200
: Events returned correctly in GET body500
: Issue connecting with database
Create new event.
POST body
{
"name": "bombcyclone2019",
"description": "Tracking bomb cyclone from Colorado happened March 13th",
"keywords": ["floods", "snow","colorado", "#bombcyclone","cyclone"]
}
Response
{
"name": "bombcyclone2019",
"keywords": [
"snow",
"cyclone",
"#bombcyclone",
"colorado",
"floods"
],
"description": "Tracking bomb cyclone from Colorado happened March 13th",
"normalized_name": "bombcyclone2019",
"status": "ACTIVE",
"created_at": 1552643251592,
"created_at_str": "2019-03-15 03:47:31.592"
}
Status code
201
: Event created and started on database. Includes link to event unique URL in header.409
: Conflict. There's already another event with the same name.500
: Issue connecting with database.503
: Kubernetes error. Issue syncing the infrastructure. Event will be created but marked as failed if it failed to start it.
Retrieve information for event identified by normalizedName
.
Response (GET /events/bombcyclone2019
)
{
"name": "bombcyclone2019",
"keywords": [
"snow",
"cyclone",
"#bombcyclone",
"colorado",
"floods"
],
"description": "Tracking bomb cyclone from Colorado happened March 13th",
"normalized_name": "bombcyclone2019",
"status": "NOT_ACTIVE",
"created_at": 1552643251592,
"created_at_str": "2019-03-15 03:47:31.592"
}
Status code
200
: Event returned correctly in GET body.404
: No event existing withnormalizedName
.500
: Issue connecting with database.
Set status for event identified by normalizedName
. Only status available:
ACTIVE
NOT_ACTIVE
FAILED
Response (PUT /events/bombcyclone2019/NOT_ACTIVE
)
{
"name": "bombcyclone2019",
"keywords": [
"snow",
"cyclone",
"#bombcyclone",
"colorado",
"floods"
],
"description": "Tracking bomb cyclone from Colorado happened March 13th",
"normalized_name": "bombcyclone2019",
"status": "NOT_ACTIVE",
"created_at": 1552643251592,
"created_at_str": "2019-03-15 03:47:31.592"
}
Status code
202
: Event status updated. Includes link to event unique URL in header.404
: No event existing withnormalizedName
.400
: Status has not been recognized. Make sure you are usingACTIVE
orNOT_ACTIVE
orFAILED
on the URL.500
: Issue connecting with database.503
: Kubernetes error. Issue syncing the infrastructure. Event will be created but marked as failed if it failed to start it.
You can execute tasks on admin port (8081).
Check Database and update Kubernetes deployments according to it.
Status code
200
: All synced.500
: Error syncing. Check response body.
To see your applications health enter url http://localhost:8081/healthcheck