2018-11-20 20:34:42 +01:00
---
id: events
title: /api/admin/events
---
2022-07-01 13:51:26 +02:00
2022-06-07 12:33:30 +02:00
import ApiRequest from '@site/src/components/ApiRequest'
2018-11-20 20:34:42 +01:00
2022-07-01 13:51:26 +02:00
:::note In order to access the admin API endpoints you need to identify yourself. Unless you're using the `none` authentication method, you'll need to [create an ADMIN token ](/user_guide/api-token ) and add an Authorization header using the token. :::
2020-12-03 21:29:01 +01:00
2022-06-07 12:33:30 +02:00
The Events API lets you retrieve events from your Unleash instance.
2016-11-30 21:17:39 +01:00
2022-06-07 12:33:30 +02:00
## Event endpoints
2016-11-30 21:17:39 +01:00
2022-06-07 12:33:30 +02:00
### Get all events
2016-11-30 21:17:39 +01:00
2022-06-07 12:33:30 +02:00
< ApiRequest verb = "get" url = "api/admin/events" title = "Retrieve all events from the Unleash instance." / >
2016-11-30 21:17:39 +01:00
2022-06-07 12:33:30 +02:00
#### Query parameters
2022-07-01 13:51:26 +02:00
| Query parameter | Description | Required |
| --- | --- | --- |
| `project` | When applied, the endpoint will only return events from the given project. | No |
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
When called without any query parameters, the endpoint will return the **last 100 events** from the Unleash instance. When called with a `project` query parameter, it will return only events related to that project, but it will return **all the events** , and not just the last 100.
2022-06-07 12:33:30 +02:00
#### Get events by project
< ApiRequest verb = "get" url = "api/admin/events?project=<project-name>" title = "Retrieve all events belonging to the given project." / >
2022-07-01 13:51:26 +02:00
Use the `project` query parameter to make the API return _all_ events pertaining to the given project.
2022-06-07 12:33:30 +02:00
#### Responses
< details >
< summary > Responses< / summary >
##### 200 OK
The last 100 events from the Unleash server when called without a `project` query parameter.
When called with a `project` query parameter: all events related to that project.
2022-07-01 13:51:26 +02:00
```json title="Successful response; a list of events"
2022-06-07 12:33:30 +02:00
{
"version": 1,
"events": [
{
"id": 842,
"type": "feature-environment-enabled",
"createdBy": "user@company.com",
"createdAt": "2022-05-12T08:49:49.521Z",
"data": null,
"preData": null,
"tags": [],
"featureName": "my-constrained-toggle",
"project": "my-project",
"environment": "development"
},
{
"id": 841,
"type": "feature-environment-disabled",
"createdBy": "user@company.com",
"createdAt": "2022-05-12T08:49:45.986Z",
"data": null,
"preData": null,
"tags": [],
"featureName": "my-constrained-toggle",
"project": "my-project",
"environment": "development"
}
]
}
```
< / details >
### Get events for a specific toggle
< ApiRequest verb = "get" url = "api/admin/events/<toggle-name>" title = "Retrieve all events related to the given toggle." / >
Fetch all events related to a specified toggle.
#### Responses
< details >
< summary > Responses< / summary >
###### 200 OK
The list of events related to the given toggle.
2022-07-01 13:51:26 +02:00
```json title="Successful response; all events relating to the specified toggle"
2022-06-07 12:33:30 +02:00
{
"toggleName": "my-constrained-toggle",
"events": [
{
"id": 842,
"type": "feature-environment-enabled",
"createdBy": "user@company.com",
"createdAt": "2022-05-12T08:49:49.521Z",
"data": null,
"preData": null,
"tags": [],
"featureName": "my-constrained-toggle",
"project": "my-project",
"environment": "development"
},
{
"id": 841,
"type": "feature-environment-disabled",
"createdBy": "user@company.com",
"createdAt": "2022-05-12T08:49:45.986Z",
"data": null,
"preData": null,
"tags": [],
"featureName": "my-constrained-toggle",
"project": "my-project",
"environment": "development"
}
]
}
```
< / details >
## Event type description
Unleash emits a large number of different events (described in more detail in the next sections). The exact fields an event contains varies from event to event, but they all conform to the following TypeScript interface before being transformed to JSON:
```ts
2021-11-12 13:15:51 +01:00
interface IEvent {
2022-07-01 13:51:26 +02:00
id: number;
createdAt: Date;
type: string;
createdBy: string;
project?: string;
environment?: string;
featureName?: string;
data?: any;
preData?: any;
tags?: ITag[];
2021-11-12 13:15:51 +01:00
}
```
2022-06-07 12:33:30 +02:00
The event properties are described in short in the table below. For more info regarding specific event types, refer to the corresponding, following sections.
2022-07-01 13:51:26 +02:00
| Property | Description |
| --- | --- |
| `createdAt` | The time the event happened as a RFC 3339-conformant timestamp. |
| `data` | Extra associated data related to the event, such as feature toggle state, segment configuration, etc., if applicable. |
| `environment` | The feature toggle environment the event relates to, if applicable. |
| `featureName` | The name of the feature toggle the event relates to, if applicable. |
| `id` | The ID of the event. An increasing natural number. |
| `preData` | Data relating to the previous state of the event's subject. |
| `project` | The project the event relates to, if applicable. |
| `tags` | Any tags related to the event, if applicable. |
| `type` | The event type, as described in the rest of this section. |
2022-06-07 12:33:30 +02:00
## Feature toggle events
These events pertain to feature toggles and their life cycle.
### `feature-created`
This event fires when you create a feature. The `data` property contains the details for the new feature.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-created"
2022-06-07 12:33:30 +02:00
{
"id": 899,
"type": "feature-created",
"createdBy": "user@company.com",
"createdAt": "2022-05-31T13:32:20.560Z",
"data": {
"name": "new-feature",
"description": "Toggle description",
"type": "release",
"project": "my-project",
"stale": false,
"variants": [],
"createdAt": "2022-05-31T13:32:20.547Z",
"lastSeenAt": null,
"impressionData": true
},
"preData": null,
"tags": [],
"featureName": "new-feature",
"project": "my-project",
"environment": null
}
```
### `feature-updated`
2022-07-01 13:51:26 +02:00
:::caution Deprecation notice This event type was replaced by more granular event types in Unleash 4.3. From Unleash 4.3 onwards, you'll need to use the events listed later in this section instead. :::
2022-06-07 12:33:30 +02:00
This event fires when a feature gets updated in some way. The `data` property contains the new state of the toggle. This is a legacy event, so it does not populate `preData` property.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-updated"
2022-06-07 12:33:30 +02:00
{
"id": 899,
"type": "feature-updated",
"createdBy": "user@company.com",
"createdAt": "2022-05-31T13:32:20.560Z",
"data": {
"name": "new-feature",
"description": "Toggle description",
"type": "release",
"project": "my-project",
"stale": false,
"variants": [],
"createdAt": "2022-05-31T13:32:20.547Z",
"lastSeenAt": null,
"impressionData": true
},
"preData": null,
"tags": [],
"featureName": "new-feature",
"project": "my-project",
"environment": null
}
```
### `feature-deleted`
This event fires when you delete a feature toggle. The `preData` property contains the deleted toggle data.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-deleted"
2022-06-07 12:33:30 +02:00
{
"id": 903,
"type": "feature-deleted",
"createdBy": "admin-account",
"createdAt": "2022-05-31T14:06:14.574Z",
"data": null,
"preData": {
"name": "new-feature",
"type": "experiment",
"stale": false,
"project": "my-project",
"variants": [],
"createdAt": "2022-05-31T13:32:20.547Z",
"lastSeenAt": null,
"description": "Toggle description",
"impressionData": true
},
"tags": [],
"featureName": "new-feature",
"project": "my-project",
"environment": null
}
```
### `feature-archived`
This event fires when you archive a toggle.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-archived"
2022-06-07 12:33:30 +02:00
{
"id": 902,
"type": "feature-archived",
"createdBy": "user@company.com",
"createdAt": "2022-05-31T14:04:38.661Z",
"data": null,
"preData": null,
"tags": [],
"featureName": "new-feature",
"project": "my-project",
"environment": null
}
```
### `feature-revived`
This event fires when you revive an archived feature toggle (when you take a toggle out from the archive).
2022-07-01 13:51:26 +02:00
```json title="example-event: feature-revived"
2022-06-07 12:33:30 +02:00
{
"id": 914,
"type": "feature-revived",
"createdBy": "user@company.com",
"createdAt": "2022-06-01T09:57:10.719Z",
"data": null,
"preData": null,
"tags": [],
"featureName": "new-feature",
"project": "my-other-project",
"environment": null
}
```
### `feature-metadata-updated`
This event fires when a feature's metadata (its description, toggle type, or impression data settings) are changed. The `data` property contains the new toggle data. The `preData` property contains the toggle's previous data.
2022-07-01 13:51:26 +02:00
The below example changes the toggle's type from _release_ to _experiment_ .
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: feature-metadata-updated"
2022-06-07 12:33:30 +02:00
{
"id": 901,
"type": "feature-metadata-updated",
"createdBy": "user@company.com",
"createdAt": "2022-05-31T13:35:25.244Z",
"data": {
"name": "new-feature",
"description": "Toggle description",
"type": "experiment",
"project": "my-project",
"stale": false,
"variants": [],
"createdAt": "2022-05-31T13:32:20.547Z",
"lastSeenAt": null,
"impressionData": true
},
"preData": {
"name": "new-feature",
"type": "release",
"stale": false,
"project": "my-project",
"variants": [],
"createdAt": "2022-05-31T13:32:20.547Z",
"lastSeenAt": null,
"description": "Toggle description",
"impressionData": true
},
"tags": [],
"featureName": "new-feature",
"project": "my-project",
"environment": null
}
```
### `feature-project-change`
This event fires when you move a feature from one project to another. The `data` property contains the names of the old and the new project.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-project-change"
2022-06-07 12:33:30 +02:00
{
"id": 11,
"type": "feature-project-change",
"createdBy": "admin",
"createdAt": "2022-06-03T11:09:41.444Z",
"data": {
"newProject": "default",
"oldProject": "2"
},
"preData": null,
"tags": [],
"featureName": "feature",
"project": "default",
"environment": null
}
```
### `feature-import`
This event fires when you import a feature as part of an import process. The `data` property contains the feature data.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-import"
2022-06-07 12:33:30 +02:00
{
"id": 26,
"type": "feature-import",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.570Z",
"data": {
"name": "feature",
"description": "",
"type": "release",
"project": "default",
"stale": false,
"variants": [],
"impressionData": false,
"enabled": false,
"archived": false
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `feature-tagged`
This event fires when you add a tag to a feature. The `data` property contains the new tag.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-tagged"
2022-06-07 12:33:30 +02:00
{
"id": 897,
"type": "feature-tagged",
"createdBy": "user@company.com",
"createdAt": "2022-05-31T13:06:31.047Z",
"data": {
"type": "simple",
"value": "tag2"
},
"preData": null,
"tags": [],
"featureName": "example-feature-name",
"project": null,
"environment": null
}
```
### `feature-untagged`
This event fires when you remove a tag from a toggle. The `data` property contains the tag that was removed.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-untagged"
2022-06-07 12:33:30 +02:00
{
"id": 893,
"type": "feature-untagged",
"createdBy": "user@company.com",
"createdAt": "2022-05-31T12:58:10.241Z",
"data": {
"type": "simple",
"value": "thisisatag"
},
"preData": null,
"tags": [],
"featureName": "example-feature-name",
"project": null,
"environment": null
}
```
### `feature-tag-import`
This event fires when you import a tagged feature as part of an import job. The `data` property contains the name of the feature and the tag.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-tag-import"
2022-06-07 12:33:30 +02:00
{
"id": 43,
"type": "feature-tag-import",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.606Z",
"data": {
"featureName": "new-feature",
"tag": {
"type": "simple",
"value": "tag1"
}
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `feature-strategy-add`
This event fires when you add a strategy to a feature. The `data` property contains the configuration for the new strategy.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-strategy-add"
2022-06-07 12:33:30 +02:00
{
"id": 919,
"type": "feature-strategy-add",
"createdBy": "user@company.com",
"createdAt": "2022-06-01T10:03:08.290Z",
"data": {
"id": "3f4bf713-696c-43a4-8ce7-d6c607108858",
"name": "flexibleRollout",
"constraints": [],
"parameters": {
"groupId": "new-feature",
"rollout": "67",
"stickiness": "default"
}
},
"preData": null,
"tags": [],
"featureName": "new-feature",
"project": "my-other-project",
"environment": "default"
}
```
### `feature-strategy-update`
This event fires when you update a feature strategy. The `data` property contains the new strategy configuration. The `preData` property contains the previous strategy configuration.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-strategy-update"
2022-06-07 12:33:30 +02:00
{
"id": 920,
"type": "feature-strategy-update",
"createdBy": "user@company.com",
"createdAt": "2022-06-01T10:03:11.549Z",
"data": {
"id": "3f4bf713-696c-43a4-8ce7-d6c607108858",
"name": "flexibleRollout",
"constraints": [],
"parameters": {
"groupId": "new-feature",
"rollout": "32",
"stickiness": "default"
}
},
"preData": {
"id": "3f4bf713-696c-43a4-8ce7-d6c607108858",
"name": "flexibleRollout",
"parameters": {
"groupId": "new-feature",
"rollout": "67",
"stickiness": "default"
},
"constraints": []
},
"tags": [],
"featureName": "new-feature",
"project": "my-other-project",
"environment": "default"
}
```
### `feature-strategy-remove`
This event fires when you remove a strategy from a feature. The `preData` contains the configuration of the strategy that was removed.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-strategy-remove"
2022-06-07 12:33:30 +02:00
{
"id": 918,
"type": "feature-strategy-remove",
"createdBy": "user@company.com",
"createdAt": "2022-06-01T10:03:00.229Z",
"data": null,
"preData": {
"id": "9591090e-acb0-4088-8958-21faaeb7147d",
"name": "default",
"parameters": {},
"constraints": []
},
"tags": [],
"featureName": "new-feature",
"project": "my-other-project",
"environment": "default"
}
```
### `feature-stale-on`
This event fires when you mark a feature as stale.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-stale-on"
2022-06-07 12:33:30 +02:00
{
"id": 926,
"type": "feature-stale-on",
"createdBy": "user@company.com",
"createdAt": "2022-06-01T10:10:46.737Z",
"data": null,
"preData": null,
"tags": [
{
"value": "tag",
"type": "simple"
},
{
"value": "tog",
"type": "simple"
}
],
"featureName": "new-feature",
"project": "my-other-project",
"environment": null
}
```
### `feature-stale-off`
This event fires when you mark a stale feature as no longer being stale.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-stale-off"
2022-06-07 12:33:30 +02:00
{
"id": 928,
"type": "feature-stale-off",
"createdBy": "user@company.com",
"createdAt": "2022-06-01T10:10:52.790Z",
"data": null,
"preData": null,
"tags": [
{
"value": "tag",
"type": "simple"
},
{
"value": "tog",
"type": "simple"
}
],
"featureName": "new-feature",
"project": "my-other-project",
"environment": null
}
```
### `feature-environment-enabled`
This event fires when you enable an environment for a feature. The `environment` property contains the name of the environment.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-environment-enabled"
2022-06-07 12:33:30 +02:00
{
"id": 930,
"type": "feature-environment-enabled",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T12:09:03.045Z",
"data": null,
"preData": null,
"tags": [
{
"value": "tag",
"type": "simple"
},
{
"value": "tog",
"type": "simple"
}
],
"featureName": "new-feature",
"project": "my-other-project",
"environment": "development"
}
```
### `feature-environment-disabled`
This event fires when you disable an environment for a feature. The `environment` property contains the name of the environment.
2022-07-01 13:51:26 +02:00
```json title="example event: feature-environment-disabled"
2022-06-07 12:33:30 +02:00
{
"id": 931,
"type": "feature-environment-disabled",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T12:09:04.469Z",
"data": null,
"preData": null,
"tags": [
{
"value": "tag",
"type": "simple"
},
{
"value": "tog",
"type": "simple"
}
],
"featureName": "new-feature",
"project": "my-other-project",
"environment": "development"
}
```
### `drop-features`
2022-07-01 13:51:26 +02:00
This event fires when you delete existing features as part of an import job. The `data.name` property will always be `"all-features"` .
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: drop-features"
2022-06-07 12:33:30 +02:00
{
"id": 25,
"type": "drop-features",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.563Z",
"data": {
"name": "all-features"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `drop-feature-tags`
2022-07-01 13:51:26 +02:00
This event fires when you drop all existing tags as part of a configuration import. The `data.name` property will always be `"all-feature-tags"` .
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: drop-feature-tags"
2022-06-07 12:33:30 +02:00
{
"id": 36,
"type": "drop-feature-tags",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.596Z",
"data": {
"name": "all-feature-tags"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
## Strategy events
### `strategy-created`
This event fires when you create a strategy. The `data` property contains the strategy configuration.
2022-07-01 13:51:26 +02:00
```json title="example event: strategy-created"
2022-06-07 12:33:30 +02:00
{
"id": 932,
"type": "strategy-created",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T12:20:52.111Z",
"data": {
"name": "new-strategy",
"description": "this strategy does ...",
"parameters": [],
"editable": true,
"deprecated": false
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `strategy-updated`
2022-07-01 13:51:26 +02:00
This event fires when you change a strategy's configuration. The `data` property contains the new strategy configuration.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: strategy-updated"
2022-06-07 12:33:30 +02:00
{
"id": 933,
"type": "strategy-updated",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T12:21:23.741Z",
"data": {
"name": "new-strategy",
"description": "this strategy does something else!",
"parameters": [],
"editable": true,
"deprecated": false
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `strategy-deleted`
This event fires when you delete a strategy. The `data` property contains the name of the deleted strategy.
2022-07-01 13:51:26 +02:00
```json title="example event: strategy-deleted"
2022-06-07 12:33:30 +02:00
{
"id": 936,
"type": "strategy-deleted",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T12:22:01.302Z",
"data": {
"name": "new-strategy"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `strategy-deprecated`
This event fires when you deprecate a strategy. The `data` property contains the name of the deprecated strategy.
2022-07-01 13:51:26 +02:00
```json title="example event: strategy-deprecated"
2022-06-07 12:33:30 +02:00
{
"id": 934,
"type": "strategy-deprecated",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T12:21:45.041Z",
"data": {
"name": "new-strategy"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `strategy-reactivated`
2022-07-01 13:51:26 +02:00
This event fires when you bring reactivate a deprecated strategy. The `data` property contains the name of the reactivated strategy.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: strategy-reactivated"
2022-06-07 12:33:30 +02:00
{
"id": 935,
"type": "strategy-reactivated",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T12:21:49.010Z",
"data": {
"name": "new-strategy"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `strategy-import`
This event fires when you import a strategy as part of an import job. The `data` property contains the strategy's configuration.
2022-07-01 13:51:26 +02:00
```json title="example event: strategy-import"
2022-06-07 12:33:30 +02:00
{
"id": 29,
"type": "strategy-import",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.583Z",
"data": {
"name": "gradualRolloutSessionId",
"description": "Gradually activate feature toggle. Stickiness based on session id.",
"parameters": [
{
"name": "percentage",
"type": "percentage",
"description": "",
"required": false
},
{
"name": "groupId",
"type": "string",
"description": "Used to define a activation groups, which allows you to correlate across feature toggles.",
"required": true
}
],
"deprecated": true
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `drop-strategies`
2022-07-01 13:51:26 +02:00
This event fires when you delete existing strategies as part of an important job. The `data.name` property will always be `"all-strategies"` .
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: drop-strategies"
2022-06-07 12:33:30 +02:00
{
"id": 28,
"type": "drop-strategies",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.579Z",
"data": {
"name": "all-strategies"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
## Context field events
### `context-field-created`
2022-07-01 13:51:26 +02:00
This event fires when you create a context field. The `data` property contains the context field configuration.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: context-field-created"
2022-06-07 12:33:30 +02:00
{
"id": 937,
"type": "context-field-created",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T13:17:17.499Z",
"data": {
"name": "new-context-field",
"description": "this context field is for describing events",
"legalValues": [],
"stickiness": false
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `context-field-updated`
2022-07-01 13:51:26 +02:00
This event fires when you update a context field. The `data` property contains the new context field configuration.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: context-field-updated"
2022-06-07 12:33:30 +02:00
{
"id": 939,
"type": "context-field-updated",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T13:19:19.422Z",
"data": {
"name": "new-context-field",
"description": "this context field is for describing events",
"legalValues": [
{
"value": "0fcf7d07-276c-41e1-a207-e62876d9c949",
"description": "Red team"
},
{
"value": "176ab647-4d50-41bf-afe0-f8b856d9bbb9",
"description": "Blue team"
}
],
"stickiness": false
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `context-field-deleted`
2022-07-01 13:51:26 +02:00
This event fires when you delete a context field. The `data` property contains the name of the deleted context field.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: context-field-deleted"
2022-06-07 12:33:30 +02:00
{
"id": 940,
"type": "context-field-deleted",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T13:20:41.386Z",
"data": {
"name": "new-context-field"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
## Project events
### `project-created`
2022-07-01 13:51:26 +02:00
This event fires when you create a project. The `data` property contains the project configuration.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: project-created"
2022-06-07 12:33:30 +02:00
{
"id": 905,
"type": "project-created",
"createdBy": "user@company.com",
"createdAt": "2022-05-31T14:16:14.498Z",
"data": {
"id": "my-other-project",
"name": "my other project",
"description": "a project for important work"
},
"preData": null,
"tags": [],
"featureName": null,
"project": "my-other-project",
"environment": null
}
```
### `project-updated`
2022-07-01 13:51:26 +02:00
This event fires when you update a project's configuration. The `data` property contains the new project configuration. The `preData` property contains the previous project configuration.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: project-updated"
2022-06-07 12:33:30 +02:00
{
"id": 941,
"type": "project-updated",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T13:23:55.025Z",
"data": {
"id": "my-other-project",
"name": "my other project",
"description": "a project for important work!"
},
"preData": {
"id": "my-other-project",
"name": "my other project",
"health": 50,
"createdAt": "2022-05-31T14:16:14.483Z",
"updatedAt": "2022-06-02T12:30:48.095Z",
"description": "a project for important work"
},
"tags": [],
"featureName": null,
"project": "my-other-project",
"environment": null
}
```
### `project-deleted`
2022-07-01 13:51:26 +02:00
This event fires when you delete a project. The `project` property contains the name of the deleted project.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: project-deleted"
2022-06-07 12:33:30 +02:00
{
"id": 944,
"type": "project-deleted",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T13:25:53.820Z",
"data": null,
"preData": null,
"tags": [],
"featureName": null,
"project": "my-other-project",
"environment": null
}
```
### `project-import`
This event fires when you import a project. The `data` property contains the project's configuration details.
2022-07-01 13:51:26 +02:00
```json title="example event: project-import"
2022-06-07 12:33:30 +02:00
{
"id": 35,
"type": "project-import",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.591Z",
"data": {
"id": "default",
"name": "Default",
"description": "Default project",
"createdAt": "2022-06-03T09:30:40.587Z",
"health": 100,
"updatedAt": "2022-06-03T11:30:40.587Z"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `drop-projects`
2022-07-01 13:51:26 +02:00
This event fires when you delete existing projects as part of an import job. The `data.name` property will always be `"all-projects"` .
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: drop-projects"
2022-06-07 12:33:30 +02:00
{
"id": 33,
"type": "drop-projects",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.586Z",
"data": {
"name": "all-projects"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
## Tag events
### `tag-created`
This event fires when you create a new tag. The `data` property contains the tag that was created.
2022-07-01 13:51:26 +02:00
```json title="example event: tag-created"
2022-06-07 12:33:30 +02:00
{
"id": 959,
"type": "feature-tagged",
"createdBy": "user@company.com",
"createdAt": "2022-06-03T10:13:39.401Z",
"data": {
"type": "heartag",
"value": "tag-value"
},
"preData": null,
"tags": [],
"featureName": "new-feature",
"project": null,
"environment": null
}
```
### `tag-deleted`
This event fires when you delete a tag. The `data` property contains the tag that was deleted.
2022-07-01 13:51:26 +02:00
```json title="example event: tag-deleted"
2022-06-07 12:33:30 +02:00
{
"id": 957,
"type": "tag-deleted",
"createdBy": "user@company.com",
"createdAt": "2022-06-03T10:12:17.310Z",
"data": {
"type": "heartag",
"value": "tag-value"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `tag-import`
This event fires when you import a tag as part of an import job. The `data` property contains the imported tag.
2022-07-01 13:51:26 +02:00
```json title="example event: tag-import"
2022-06-07 12:33:30 +02:00
{
"id": 41,
"type": "tag-import",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.603Z",
"data": {
"type": "simple",
"value": "tag1"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `drop-tags`
2022-07-01 13:51:26 +02:00
This event fires when you delete existing tags as part of an import job. The `data.name` property will always be `"all-tags"` .
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: drop-tags"
2022-06-07 12:33:30 +02:00
{
"id": 37,
"type": "drop-tags",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.596Z",
"data": {
"name": "all-tags"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
## Tag type events
### `tag-type-created`
2022-07-01 13:51:26 +02:00
This event fires when you create a new tag type. The `data` property contains the tag type configuration.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: tag-type-created"
2022-06-07 12:33:30 +02:00
{
"id": 945,
"type": "tag-type-created",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T13:27:01.235Z",
"data": {
"name": "new-tag-type",
"description": "event testing"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `tag-type-updated`
2022-07-01 13:51:26 +02:00
This event fires when you update a tag type. The `data` property contains the new tag type configuration.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: tag-type-updated"
2022-06-07 12:33:30 +02:00
{
"id": 946,
"type": "tag-type-updated",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T13:27:31.126Z",
"data": {
"name": "new-tag-type",
"description": "This tag is for testing events."
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `tag-type-deleted`
2022-07-01 13:51:26 +02:00
This event fires when you delete a tag type. The `data` property contains the name of the deleted tag type.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: tag-type-deleted"
2022-06-07 12:33:30 +02:00
{
"id": 947,
"type": "tag-type-deleted",
"createdBy": "user@company.com",
"createdAt": "2022-06-02T13:27:37.277Z",
"data": {
"name": "new-tag-type"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `tag-type-import`
This event fires when you import a tag type as part of an import job. The `data` property contains the imported tag.
2022-07-01 13:51:26 +02:00
```json title="example event: tag-type-import"
2022-06-07 12:33:30 +02:00
{
"id": 40,
"type": "tag-type-import",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.599Z",
"data": {
"name": "custom-tag-type",
"description": "custom tag type",
"icon": null
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `drop-tag-types`
2022-07-01 13:51:26 +02:00
This event fires when you drop all existing tag types as part of a configuration import. The `data.name` property will always be `"all-tag-types"` .
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: drop-tag-types"
2022-06-07 12:33:30 +02:00
{
"id": 38,
"type": "drop-tag-types",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.596Z",
"data": {
"name": "all-tag-types"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
## Addon events
### `addon-config-created`
2022-07-01 13:51:26 +02:00
This event fires when you create an addon configuration. The `data` property contains the provider type.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: addon-config-created"
2022-06-07 12:33:30 +02:00
{
"id": 960,
"type": "addon-config-created",
"createdBy": "user@company.com",
"createdAt": "2022-06-03T10:15:45.040Z",
"data": {
"provider": "webhook"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `addon-config-updated`
2022-07-01 13:51:26 +02:00
This event fires when you update an addon configuration. The `data` property contains the addon's ID and provider type.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: addon-config-updated"
2022-06-07 12:33:30 +02:00
{
"id": 961,
"type": "addon-config-updated",
"createdBy": "user@company.com",
"createdAt": "2022-06-03T10:16:11.732Z",
"data": {
"id": "2",
"provider": "webhook"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `addon-config-deleted`
2022-07-01 13:51:26 +02:00
This event fires when you update an addon configuration. The `data` property contains the addon's ID.
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: addon-config-deleted"
2022-06-07 12:33:30 +02:00
{
"id": 964,
"type": "addon-config-deleted",
"createdBy": "user@company.com",
"createdAt": "2022-06-03T10:16:59.723Z",
"data": {
"id": "2"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
## User events
### `user-created`
This event fires when you create a new user. The `data` property contains the user's information.
2022-07-01 13:51:26 +02:00
```json title="example event: user-created"
2022-06-07 12:33:30 +02:00
{
"id": 965,
"type": "user-created",
"createdBy": "user@company.com",
"createdAt": "2022-06-03T10:23:47.713Z",
"data": {
"id": 44,
"name": "New User Name",
"email": "newuser@company.com"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `user-updated`
This event fires when you update a user. The `data` property contains the updated user information; the `preData` property contains the previous state of the user's information.
2022-07-01 13:51:26 +02:00
```json title="example event: user-updated"
2022-06-07 12:33:30 +02:00
{
"id": 967,
"type": "user-updated",
"createdBy": "user@company.com",
"createdAt": "2022-06-03T10:24:26.301Z",
"data": {
"id": 44,
"name": "New User's Name",
"email": "newuser@company.com"
},
"preData": {
"id": 44,
"name": "New User Name",
"email": "newuser@company.com"
},
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `user-deleted`
This event fires when you delete a user. The `preData` property contains the deleted user's information.
2022-07-01 13:51:26 +02:00
```json title="example event: user-deleted"
2022-06-07 12:33:30 +02:00
{
"id": 968,
"type": "user-deleted",
"createdBy": "user@company.com",
"createdAt": "2022-06-03T10:24:49.153Z",
"data": null,
"preData": {
"id": 44,
"name": "New User's Name",
"email": "newuser@company.com"
},
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
## Environment events
### `environment-import`
This event fires when you import an environment (custom or otherwise) as part of an import job. The `data` property contains the configuration of the imported environment.
2022-07-01 13:51:26 +02:00
```json title="example event: environment-import"
2022-06-07 12:33:30 +02:00
{
"id": 24,
"type": "environment-import",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.557Z",
"data": {
"name": "custom-environment",
"type": "test",
"sortOrder": 9999,
"enabled": true,
"protected": false
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `drop-environments`
2022-07-01 13:51:26 +02:00
This event fires when you delete existing environments as part of an import job. The `data.name` property will always be `"all-environments"` .
2022-06-07 12:33:30 +02:00
2022-07-01 13:51:26 +02:00
```json title="example event: drop-environments"
2022-06-07 12:33:30 +02:00
{
"id": 21,
"type": "drop-environments",
"createdBy": "import-API-token",
"createdAt": "2022-06-03T11:30:40.549Z",
"data": {
"name": "all-projects"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
## Segment events
### `segment-created`
This event fires when you create a segment. The `data` property contains the newly created segment.
2022-07-01 13:51:26 +02:00
```json title="example event: segment-created"
2022-06-07 12:33:30 +02:00
{
"id": 969,
"type": "segment-created",
"createdBy": "user@company.com",
"createdAt": "2022-06-03T10:29:43.977Z",
"data": {
"id": 5,
"name": "new segment",
"description": "this segment is for events",
"constraints": [
{
2022-07-01 13:51:26 +02:00
"values": ["appA", "appB", "appC"],
2022-06-07 12:33:30 +02:00
"inverted": false,
"operator": "IN",
"contextName": "appName",
"caseInsensitive": false
}
],
"createdBy": "user@company.com",
"createdAt": "2022-06-03T10:29:43.974Z"
},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `segment-updated`
This event fires when you update a segment's configuration. The `data` property contains the new segment configuration; the `preData` property contains the previous segment configuration.
2022-07-01 13:51:26 +02:00
```json title="example event: segment-updated"
2022-06-07 12:33:30 +02:00
{
"id": 970,
"type": "segment-updated",
"createdBy": "user@company.com",
"createdAt": "2022-06-03T10:29:59.892Z",
"data": {
"id": 5,
"name": "new segment",
"description": "this segment is for events",
"constraints": [],
"createdBy": "user@company.com",
"createdAt": "2022-06-03T10:29:43.974Z"
},
"preData": {
"id": 5,
"name": "new segment",
"createdAt": "2022-06-03T10:29:43.974Z",
"createdBy": "user@company.com",
"constraints": [
{
2022-07-01 13:51:26 +02:00
"values": ["appA", "appB", "appC"],
2022-06-07 12:33:30 +02:00
"inverted": false,
"operator": "IN",
"contextName": "appName",
"caseInsensitive": false
}
],
"description": "this segment is for events"
},
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```
### `segment-deleted`
This event fires when you delete a segment.
2022-07-01 13:51:26 +02:00
```json title="example event: segment-deleted"
2022-06-07 12:33:30 +02:00
{
"id": 971,
"type": "segment-deleted",
"createdBy": "user@company.com",
"createdAt": "2022-06-03T10:30:08.128Z",
"data": {},
"preData": null,
"tags": [],
"featureName": null,
"project": null,
"environment": null
}
```