Audit log

LaunchDarkly maintains a record of all the changes made to any resource in the system. You can access this history using the audit log API, including filtering by timestamps, or using a custom policy to select which entries to receive.

Several of the endpoints in the audit log API require an audit log entry ID. The audit log entry ID is returned as part of the List audit log entries response. It is the _id field of each element in the items array.

In the LaunchDarkly UI, this information appears on the Change history page. To learn more, read Change history.

List audit log entries

Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query.

LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read About the resource specifier syntax.

Request
query Parameters
before
integer <int64>

A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred before the timestamp.

after
integer <int64>

A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred after the timestamp.

q
string <string>

Text to search for. You can search for the full or partial name of the resource.

limit
integer <int64>

A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10.

spec
string <string>

A resource specifier that lets you filter audit log listings by resource

Responses
200

Audit log entries response

400

Invalid request

401

Invalid access token

403

Forbidden

429

Rate limited

get/api/v2/auditlog
Request samples
Response samples
application/json
{
  • "items": [
    ],
  • "_links": {
    }
}

Search audit log entries

Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers.

LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read About the resource specifier syntax.

Request
query Parameters
before
integer <int64>

A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred before the timestamp.

after
integer <int64>

A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp.

q
string <string>

Text to search for. You can search for the full or partial name of the resource.

limit
integer <int64>

A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10.

Request Body schema: application/json
Array
resources
Array of strings

Resource specifier strings

notResources
Array of strings

Targeted resources are the resources NOT in this list. The resources field must be empty to use this field.

actions
Array of strings (ActionSpecifier)

Actions to perform on a resource

notActions
Array of strings (ActionSpecifier)

Targeted actions are the actions NOT in this list. The actions field must be empty to use this field.

effect
required
string

Whether this statement should allow or deny actions on the resources.

Enum: "allow" "deny"
Responses
200

Audit log entries response

400

Invalid request

401

Invalid access token

403

Forbidden

429

Rate limited

post/api/v2/auditlog
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
{
  • "items": [
    ],
  • "_links": {
    }
}

Get audit log entry

Fetch a detailed audit log entry representation. The detailed representation includes several fields that are not present in the summary representation, including:

  • delta: the JSON patch body that was used in the request to update the entity
  • previousVersion: a JSON representation of the previous version of the entity
  • currentVersion: a JSON representation of the current version of the entity
Request
path Parameters
id
required
string <string>

The ID of the audit log entry

Responses
200

Audit log entry response

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/auditlog/{id}
Request samples
Response samples
application/json
{
  • "_links": {
    },
  • "_id": "1234a56b7c89d012345e678f",
  • "_accountId": "1234a56b7c89d012345e678f",
  • "date": 0,
  • "accesses": [
    ],
  • "kind": "string",
  • "name": "Example feature flag",
  • "description": "Example, turning on the flag for testing",
  • "shortDescription": "Example, turning on the flag",
  • "comment": "This is an automated test",
  • "subject": {
    },
  • "member": {
    },
  • "token": {
    },
  • "app": {
    },
  • "titleVerb": "turned on the flag",
  • "title": "string",
  • "target": {
    },
  • "parent": {
    },
  • "delta": null,
  • "triggerBody": null,
  • "merge": null,
  • "previousVersion": null,
  • "currentVersion": null,
  • "subentries": [
    ]
}