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
      • GETGet audit log entry
      • POSTGet audit log entry counts
      • GETList audit log entries
      • POSTSearch audit log entries
    • 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
    • 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 overviewAudit Log

Get audit log entry counts

POST
/api/v2/auditlog/counts
POST
/api/v2/auditlog/counts
$curl -X POST "https://app.launchdarkly.com/api/v2/auditlog/counts?after=1" \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '[
> {
> "effect": "allow"
> }
>]'
1{
2 "buckets": [
3 {
4 "timestamp": 1,
5 "count": 1
6 }
7 ],
8 "totalCount": 1,
9 "bucketIntervalMs": 1
10}
Returns aggregate counts of audit log entries per time bucket. Used for dashboard overlays that show flag targeting changes.
Was this page helpful?
Previous

List audit log entries

Next
Built with

Authentication

Authorizationstring
API Key authentication via header

Query parameters

beforelongOptional
A timestamp filter, expressed as a Unix epoch time in milliseconds. Defaults to now.
afterlongRequired
A timestamp filter, expressed as a Unix epoch time in milliseconds. Required.
bucketslongOptional
Number of time buckets to divide the range into. Default 50, max 500.

Request

This endpoint expects a list of objects.
effectenumRequired
Whether this statement should allow or deny actions on the resources.
Allowed values:
resourceslist of stringsOptional
Resource specifier strings
notResourceslist of stringsOptional

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

actionslist of stringsOptional
Actions to perform on a resource
notActionslist of stringsOptional

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

Response

Audit log entry counts response
bucketslist of objects
totalCountlong
bucketIntervalMslong

Errors

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