For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
      • GETList flag events
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewInsights Flag Events Beta

List flag events

GET
/api/v2/engineering-insights/flag-events
GET
/api/v2/engineering-insights/flag-events
$curl -G https://app.launchdarkly.com/api/v2/engineering-insights/flag-events \
> -H "Authorization: <apiKey>" \
> -d projectKey=projectKey \
> -d environmentKey=environmentKey
1{
2 "totalCount": 1200,
3 "items": [
4 {
5 "id": "e3b2b0e0-9e9b-4c9a-8e9a-0e0e0e0e0e0e",
6 "projectId": "65baa44ecc4b5bce113bb4f7",
7 "projectKey": "default",
8 "flagKey": "enable-new-payment-method",
9 "eventType": "enabled_targeting",
10 "eventTime": 1616425200000,
11 "description": "Targeting rule enabled",
12 "impact": {
13 "size": "medium",
14 "percentage": 50,
15 "reason": "evaluations",
16 "evaluationsSummary": {
17 "variations": [
18 {
19 "value": null,
20 "before": 1000,
21 "after": 500
22 }
23 ]
24 }
25 },
26 "environmentId": "65baa44ecc4b5bce113bb4f7",
27 "environmentKey": "production",
28 "auditLogEntryId": "e3b2b0e0-9e9b-4c9a-8e9a-0e0e0e0e0e0e",
29 "member": {
30 "id": "65baa44ecc4b5bce113bb4f7",
31 "email": "test@launchdarkly.com",
32 "firstName": "string",
33 "lastName": "string"
34 },
35 "actions": [
36 "string"
37 ],
38 "experiments": {
39 "totalCount": 1,
40 "items": [
41 {
42 "key": "experiment-1",
43 "name": "Experiment 1",
44 "iteration": {
45 "id": "65baa44ecc4b5bce113bb4f7",
46 "status": "running",
47 "startedAt": 1655314200000,
48 "endedAt": 1656610200000,
49 "_links": {}
50 },
51 "_links": {}
52 }
53 ]
54 }
55 }
56 ],
57 "_links": {
58 "next": {
59 "href": "/api/v2/engineering-insights/flag-events?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",
60 "type": "application/json"
61 },
62 "self": {
63 "href": "/api/v2/engineering-insights/flag-events",
64 "type": "application/json"
65 }
66 }
67}
Get a list of flag events ### Expanding the flag event collection response LaunchDarkly supports expanding the flag event collection response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `experiments` includes details on all of the experiments run on each flag For example, use `?expand=experiments` to include the `experiments` field in the response. By default, this field is **not** included in the response.
Was this page helpful?
Previous

Insights Pull Requests Beta

Next
Built with

Get a list of flag events

Expanding the flag event collection response

LaunchDarkly supports expanding the flag event collection response to include additional fields.

To expand the response, append the expand query parameter and include the following:

  • experiments includes details on all of the experiments run on each flag

For example, use ?expand=experiments to include the experiments field in the response. By default, this field is not included in the response.

Authentication

Authorizationstring
API Key authentication via header

Query parameters

projectKeystringRequiredformat: "string"
The project key
environmentKeystringRequiredformat: "string"
The environment key
applicationKeystringOptionalformat: "string"
Comma separated list of application keys
querystringOptionalformat: "string"
Filter events by flag key
impactSizestringOptionalformat: "string"

Filter events by impact size. A small impact created a less than 20% change in the proportion of end users receiving one or more flag variations. A medium impact created between a 20%-80% change. A large impact created a more than 80% change. Options: none, small, medium, large

hasExperimentsbooleanOptional

Filter events to those associated with an experiment (true) or without an experiment (false)

globalstringOptionalformat: "string"

Filter to include or exclude global events. Default value is include. Options: include, exclude

expandstringOptionalformat: "string"

Expand properties in response. Options: experiments

limitlongOptional
The number of deployments to return. Default is 20. Maximum allowed is 100.
fromlongOptional
Unix timestamp in milliseconds. Default value is 7 days ago.
tolongOptional
Unix timestamp in milliseconds. Default value is now.
afterstringOptionalformat: "string"
Identifier used for pagination
beforestringOptionalformat: "string"
Identifier used for pagination

Response

Flag event collection response
totalCountinteger
The total number of flag events
itemslist of objects
A list of flag events
_linksmap from strings to objects
The location and content type of related resources

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error