PII Counts

List the recorded PII counts.

Changed on

Returns the PII type counts Philter records when the diffuseCountsEnabled setting is on, for Philter Diffuse to privatize: one entry per user's context and UTC day, with a stable id, giving for each PII type how many redactions found at least one of it, and how many found any PII. Only counts, never any PII. Sorted with sort (day, the default, context, or documents) and order (asc or desc); the default is the most recent day first. Paginated. Another user's context name and username are returned only with ADMIN_CROSS_USER_ACCESS_ENABLED; their counts always are. Narrow by day with from and to (YYYY-MM-DD, UTC, both inclusive), by context name with context (only the caller's own without cross-user access), and by username with owner. recordingEnabled says whether counts are being recorded now, so an empty listing can be told apart from recording being off; counts recorded before it was turned off are still returned. Each read is audited. The counts cover the whole deployment, so this requires an administrator as well as the pii-counts:read scope. Requires the pii-counts:read scope.

get/api/pii-counts

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/pii-counts
  • Auth
    HTTP bearer

Query parameters

fromstring
tostring
contextstring
ownerstring
sortstring
orderstring
offsetinteger
limitinteger

Headers

Authorizationstring required

Response

A page of counts, the total matching the filters, and whether counts are being recorded.

recordingEnabledboolean

Whether Philter is recording PII counts now (the diffuseCountsEnabled setting). When it is false, no new counts are being recorded, so an empty listing does not mean no PII was found.

totalinteger

How many context and day aggregates match the filters.

Example response

{
  "counts": [
    {
      "counts": {
        "email-address": 8900,
        "ssn": 1240
      },
      "day": "2026-10-01"
    }
  ]
}

Changes