---
title: "Get audit log entry counts"
method: POST
path: "/api/v2/auditlog/counts"
tags: ["Audit log"]
---

# Get audit log entry counts

`POST /api/v2/auditlog/counts`

Returns aggregate counts of audit log entries per time bucket. Used for dashboard overlays that show flag targeting changes.

## Query parameters

- `before` integer — A timestamp filter, expressed as a Unix epoch time in milliseconds. Defaults to now.
- `after` integer, required — A timestamp filter, expressed as a Unix epoch time in milliseconds. Required.
- `buckets` integer — Number of time buckets to divide the range into. Default 50, max 500.

## Request body

- StatementPost[]
  - `resources` string[] — Resource specifier strings
  - `notResources` string[] — Targeted resources are the resources NOT in this list. The <code>resources</code> field must be empty to use this field.
  - `actions` ActionSpecifier[] — Actions to perform on a resource
  - `notActions` ActionSpecifier[] — Targeted actions are the actions NOT in this list. The <code>actions</code> field must be empty to use this field.
  - `effect` 'allow' | 'deny', required — Whether this statement should allow or deny actions on the resources.

## Response `200`

Audit log entry counts response

- CountBucketsResult
  - `buckets` CountBucket[], required
    - `timestamp` integer, required
    - `count` integer, required
  - `totalCount` integer, required
  - `bucketIntervalMs` integer, required

## Other responses

- `400` — Invalid request
- `401` — Invalid access token
- `403` — Forbidden
- `429` — Rate limited

## Changes

- **2026-02-28** `69c5c9aafe78` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/changes/api/v2/auditlog/counts/post.md)

---

[API](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api.md) · [All operations](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/launchdarkly/launchdarkly-rest-api/revisions/69c5c9aafe78/schema)
