Skip to content

Commit ce6c863

Browse files
committed
REST API: Add event ID to list of chaos events
In order to get the IDs of terminated EC2 instances after the fact. With this change, both `POST` and `GET` will return the same JSON fields for each event. For some reason, `eventID` (the EC2 instance ID) was missing when retrieving events via the REST API.
1 parent 79f5263 commit ce6c863

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/com/netflix/simianarmy/resources/chaos/ChaosMonkeyResource.java

+1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ public Response getChaosEvents(@Context UriInfo uriInfo) throws IOException {
137137
for (Event evt : evts) {
138138
gen.writeStartObject();
139139
gen.writeStringField("monkeyType", evt.monkeyType().name());
140+
gen.writeStringField("eventId", evt.id());
140141
gen.writeStringField("eventType", evt.eventType().name());
141142
gen.writeNumberField("eventTime", evt.eventTime().getTime());
142143
gen.writeStringField("region", evt.region());

0 commit comments

Comments
 (0)