Affected: REST API
Overview
By default, the List audit log entries REST API endpoint lists all changes made to any resource in LaunchDarkly, which can include log entries irrelevant to your use case.
Solution
LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To filter by a specific resource, use the spec
query parameter.
Examples:
- To filter by all Teams changes:
spec=team/*
curl --location 'https://app.launchdarkly.com/api/v2/auditlog?spec=team%2F*' \
--header 'authorization: api-123'
- To filter for specific team changes:
spec=team/your-team-key
curl --location 'https://app.launchdarkly.com/api/v2/auditlog?spec=team%2Fyour-team-key' \
--header 'authorization: api-123'
- To see all flag changes within a specific project and environment:
spec=my-project-key:env/my-prod-environment-key:flag/*
curl --location 'https://app.launchdarkly.com/api/v2/auditlog?spec=proj%my-project-key%3Aenv%2Fmy-prod-environment-key%3Aflag%2F*' \
--header 'authorization: api-123'