> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.getunleash.io/api/get-events/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server. # Get the most recent events from the Unleash instance or all events related to a project. GET https://app.unleash-instance.example.com/api/admin/events Returns **the last 100** events from the Unleash instance when called without a query parameter. When called with a `project` parameter, returns **all events** for the specified project. If the provided project does not exist, the list of events will be empty. Reference: https://docs.getunleash.io/api/get-events ## Authentication - `Authorization` header (required) — API key needed to access this API - `Authorization` header (bearer token, required) — API key needed to access this API, in Bearer token format ## Request ### Query parameters - `project` (string, optional) — The name of the project whose events you want to retrieve ## Response ### 200 eventsSchema - `version` (enum, required) — The api version of this response. A natural increasing number. Only increases if format changes - Allowed values: `1` - `events` (list of eventSchema, required) — The list of events - `totalEvents` (integer, optional) — The total count of events ## Errors ### 401 Unauthorized Error Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`. - `id` (string, optional) — The ID of the error instance - `name` (string, optional) — The name of the error kind - `message` (string, optional) — A description of what went wrong. ## Types ### eventSchema An event describing something happening in the system - `id` (integer, required) — The ID of the event. An increasing natural number. - `createdAt` (string, required) — The time the event happened as a RFC 3339-conformant timestamp. - `type` (enum, required) — What [type](https://docs.getunleash.io/concepts/events#event-types) of event this is - Allowed values: `application-created`, `feature-created`, `feature-deleted`, `feature-updated`, `feature-metadata-updated`, `feature-variants-updated`, `feature-environment-variants-updated`, `feature-project-change`, `feature-archived`, `feature-revived`, `feature-import`, `feature-tagged`, `feature-tag-import`, `feature-strategy-update`, `feature-strategy-add`, `feature-strategy-remove`, `feature-type-updated`, `feature-completed`, `feature-uncompleted`, `feature-link-added`, `feature-link-removed`, `feature-link-updated`, `strategy-order-changed`, `drop-feature-tags`, `feature-untagged`, `feature-stale-on`, `feature-stale-off`, `drop-features`, `feature-environment-enabled`, `feature-environment-disabled`, `strategy-created`, `strategy-deleted`, `strategy-deprecated`, `strategy-reactivated`, `strategy-updated`, `strategy-import`, `drop-strategies`, `context-field-created`, `context-field-updated`, `context-field-deleted`, `project-access-added`, `project-access-user-roles-updated`, `project-access-group-roles-updated`, `project-access-user-roles-deleted`, `project-access-group-roles-deleted`, `project-access-updated`, `project-created`, `project-updated`, `project-deleted`, `project-archived`, `project-revived`, `project-import`, `project-user-added`, `project-user-removed`, `project-user-role-changed`, `project-group-added`, `role-created`, `role-updated`, `role-deleted`, `drop-projects`, `tag-created`, `tag-deleted`, `tag-import`, `drop-tags`, `tag-type-created`, `tag-type-deleted`, `tag-type-updated`, `tag-type-import`, `drop-tag-types`, `addon-config-created`, `addon-config-updated`, `addon-config-deleted`, `db-pool-update`, `user-created`, `user-updated`, `user-deleted`, `drop-environments`, `environment-import`, `environment-created`, `environment-updated`, `environment-deleted`, `segment-created`, `segment-updated`, `segment-deleted`, `group-created`, `group-updated`, `group-deleted`, `group-user-added`, `group-user-removed`, `setting-created`, `setting-updated`, `setting-deleted`, `client-metrics`, `client-register`, `pat-created`, `pat-deleted`, `service-account-token-created`, `service-account-token-deleted`, `public-signup-token-created`, `public-signup-token-user-added`, `public-signup-token-updated`, `change-request-created`, `change-request-discarded`, `change-added`, `change-discarded`, `change-edited`, `change-request-rejected`, `change-request-approved`, `change-request-approval-added`, `change-request-cancelled`, `change-request-sent-to-review`, `change-request-schedule-suspended`, `change-request-applied`, `change-request-scheduled`, `change-request-scheduled-application-success`, `change-request-scheduled-application-failure`, `change-request-configuration-updated`, `api-token-created`, `api-token-updated`, `api-token-deleted`, `feature-favorited`, `feature-unfavorited`, `project-favorited`, `project-unfavorited`, `features-exported`, `features-imported`, `service-account-created`, `service-account-deleted`, `service-account-updated`, `feature-potentially-stale-on`, `feature-dependency-added`, `feature-dependency-removed`, `feature-dependencies-removed`, `banner-created`, `banner-updated`, `banner-deleted`, `safeguard-changed`, `safeguard-deleted`, `safeguard-triggered`, `release-plan-progressions-resumed`, `release-plan-progressions-paused`, `project-environment-added`, `project-environment-removed`, `default-strategy-updated`, `segment-import`, `signal-endpoint-created`, `signal-endpoint-updated`, `signal-endpoint-deleted`, `signal-endpoint-token-created`, `signal-endpoint-token-updated`, `signal-endpoint-token-deleted`, `actions-created`, `actions-updated`, `actions-deleted`, `release-plan-template-created`, `release-plan-template-updated`, `release-plan-template-deleted`, `release-plan-template-archived`, `release-plan-added`, `release-plan-removed`, `release-plan-milestone-started`, `milestone-progression-created`, `milestone-progression-updated`, `milestone-progression-deleted`, `milestone-progression-changed`, `user-preference-updated`, `scim-users-deleted`, `scim-groups-deleted`, `cdn-token-created`, `change-request-requested-approvers-updated`, `impact-metric-created`, `impact-metric-updated`, `impact-metric-deleted`, `user-access-request-registered`, `user-access-request-approved`, `user-access-request-rejected`, `remote-mcp-server-settings-updated` - `createdBy` (string, required) — Which user created this event - `createdByUserId` (double, optional, nullable) — The is of the user that created this event - `environment` (string, optional, nullable) — The feature flag environment the event relates to, if applicable. - `project` (string, optional, nullable) — The project the event relates to, if applicable. - `featureName` (string, optional, nullable) — The name of the feature flag the event relates to, if applicable. - `data` (EventSchemaData, optional, nullable) — Extra associated data related to the event, such as feature flag state, segment configuration, etc., if applicable. - `preData` (EventSchemaPreData, optional, nullable) — Data relating to the previous state of the event's subject. - `tags` (list of tagSchema, optional, nullable) — Any tags related to the event, if applicable. - `label` (string, optional, nullable) — The concise, human-readable name of the event. - `summary` (string, optional, nullable) — A markdown-formatted summary of the event. - `ip` (string, optional, nullable) — The IP address of the user that created the event. Only available in Enterprise. - `groupType` (string, optional) — The type of transaction group this event belongs to, if applicable. - `groupId` (string, optional) — The unique identifier for the transaction group this event belongs to, if applicable. ### EventSchemaData Extra associated data related to the event, such as feature flag state, segment configuration, etc., if applicable. ### EventSchemaPreData Data relating to the previous state of the event's subject. ### tagSchema Representation of a [tag](https://docs.getunleash.io/concepts/feature-flags#tags) - `value` (string, required) — The value of the tag. - `type` (string, required) — The [type](https://docs.getunleash.io/concepts/feature-flags#tags) of the tag - `color` (string, optional, nullable) — The hexadecimal color code for the tag type. ## Examples **Response** ```json { "version": 1, "events": [ { "id": 1, "createdAt": "2023-07-05T12:56:00.000Z", "type": "feature-created", "createdBy": "johndoe", "createdByUserId": 1337, "environment": "development", "project": "default", "featureName": "my.first.feature", "data": { "createdAt": "2022-05-31T13:32:20.547Z", "description": "Flag description", "impressionData": true, "lastSeenAt": null, "name": "new-feature", "project": "my-project", "stale": false, "type": "release", "variants": [] }, "preData": { "createdAt": "2022-05-31T13:32:20.547Z", "description": "Flag description", "impressionData": true, "lastSeenAt": null, "name": "new-feature", "project": "my-project", "stale": false, "type": "release", "variants": [] }, "tags": [ { "value": "a-tag-value", "type": "simple", "color": "#FFFFFF" } ], "label": "string", "summary": "string", "ip": "192.168.1.1", "groupType": "change-request", "groupId": "01HQVX5K8P9EXAMPLE123456" } ], "totalEvents": 842 } ``` **SDK Code** ```python import requests url = "https://app.unleash-instance.example.com/api/admin/events" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.unleash-instance.example.com/api/admin/events'; const options = {method: 'GET', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://app.unleash-instance.example.com/api/admin/events" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://app.unleash-instance.example.com/api/admin/events") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://app.unleash-instance.example.com/api/admin/events") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://app.unleash-instance.example.com/api/admin/events', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.unleash-instance.example.com/api/admin/events"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://app.unleash-instance.example.com/api/admin/events")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```