1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/docs/api/admin/events-api.md
Christopher Kolstad c17a1980a2
Add service layer
This simplifies stores to just be storage interaction, they no longer react to events.

Controllers now call services and awaits the result from the call.

When the service calls are returned the database is updated.
This simplifies testing dramatically, cause you know that your state is
updated when returned from a call, rather than hoping the store has
picked up the event (which really was a command) and reacted to it.

Events are still emitted from eventStore, so other parts of the app can
react to events as they're being sent out.

As part of the move to services, we now also emit an application-created
event when we see a new client application.

Fixes: #685
Fixes: #595
2021-01-21 10:59:19 +01:00

52 lines
1.1 KiB
Markdown

---
id: events
title: /api/admin/events
---
> In order to access the admin api endpoints you need to identify yourself. If you are using the `unsecure` authententication method, you may use [basic authenticaion](https://en.wikipedia.org/wiki/Basic_access_authentication) to ientify yourself.
# Events API
`GET: http://unleash.host.com/api/admin/events`
Used to fetch all changes in the unleash system.
Defined event types:
- feature-created
- feature-updated
- feature-archived
- feature-revived
- strategy-created
- strategy-deleted
- tag-created
- tag-deleted
- tag-type-created
- tag-type-updated
- tag-type-deleted
- application-created
**Response**
```json
{
"version": 1,
"events": [
{
"id": 454,
"type": "feature-updated",
"createdBy": "unknown",
"createdAt": "2016-08-24T11:22:01.354Z",
"data": {
"name": "eid.bankid.mobile",
"description": "",
"strategy": "default",
"enabled": true,
"parameters": {}
},
"diffs": [{ "kind": "E", "path": ["enabled"], "lhs": false, "rhs": true }]
}
]
}
```