Events

Gofer emits events for actions that happen within it's purview. You can use the event api to get a list of all events or request specific events.


List all events

WS/api/events

This endpoint upgrades the connection to a websocket: after the 101 response the server streams data over the socket instead of returning a body.

Query parameters

NameTypeRequiredDescription
historybooleannoIf set to true Gofer first exhausts events that have already passed before it starts to stream new events.
reversebooleannoReverses the order of events by the time they were emitted. By default Gofer lists events in ascending order; setting reverse to true causes events to be in descending order.

Responses

StatusBodyDescription
101noneNegotiating protocol upgrade from HTTP/1.1 to WebSocket
4XXErrorError
5XXErrorError

Get api event by id

GET/api/events/{event_id}

Path parameters

NameTypeRequiredDescription
event_idstringyesThe unique identifier for the target event.

Responses

StatusBodyDescription
200GetEventResponsesuccessful operation
4XXErrorError
5XXErrorError

Delete api event by id

DELETE/api/events/{event_id}

This route is only accessible by admin tokens.

Path parameters

NameTypeRequiredDescription
event_idstringyesThe unique identifier for the target event.

Responses

StatusBodyDescription
204nonesuccessful deletion
4XXErrorError
5XXErrorError