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.
| Method | Endpoint |
|---|---|
| WS | /api/events |
| GET | /api/events/{event_id} |
| DELETE | /api/events/{event_id} |
List all events
WS
/api/eventsThis 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
| Name | Type | Required | Description |
|---|---|---|---|
history | boolean | no | If set to true Gofer first exhausts events that have already passed before it starts to stream new events. |
reverse | boolean | no | Reverses 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
| Status | Body | Description |
|---|---|---|
101 | none | Negotiating protocol upgrade from HTTP/1.1 to WebSocket |
4XX | Error | Error |
5XX | Error | Error |
Get api event by id
GET
/api/events/{event_id}Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
event_id | string | yes | The unique identifier for the target event. |
Responses
| Status | Body | Description |
|---|---|---|
200 | GetEventResponse | successful operation |
4XX | Error | Error |
5XX | Error | Error |
Delete api event by id
DELETE
/api/events/{event_id}This route is only accessible by admin tokens.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
event_id | string | yes | The unique identifier for the target event. |
Responses