---
id: GetAnonymizers
name: Get anonymizers
version: 1.0.0
badges:
  - content: Privacy
    backgroundColor: red
    textColor: red
summary: Returns the names of the built-in anonymization operators supported by Presidio Anonymizer.
owners:
  - platform-engineering-team
schemaPath: schema.json
operation:
  method: GET
  path: /anonymizers
  statusCodes: ["200"]
sidebar:
  badge: "GET"
---

`GetAnonymizers` queries the internal [[service|presidio-api]] Anonymizer sidecar (`GET /anonymizers`) to list its built-in anonymization operator names. This endpoint is an upstream capability discovery query; BookWorm's runtime PII middleware calls only `POST /anonymize` with the `replace` operator.

## Overview

| Property                           | Value                                                             |
| :--------------------------------- | :---------------------------------------------------------------- |
| **Bounded Context**                | Data Privacy (External Integration)                               |
| **Owner Service**                  | [[service\|presidio-api]] (`presidio-anonymizer`)                 |
| **Protocol / Format**              | HTTP `GET /anonymizers`, `application/json` response              |
| **Gateway Endpoint**               | Internal sidecar `GET /anonymizers` (not exposed via API Gateway) |
| **Authentication & Authorization** | None (internal service-to-service network boundary)               |
| **Idempotency / Concurrency**      | Read-only and naturally idempotent                                |
| **Rate Limit / Caching**           | None (sidecar)                                                    |
| **Contract Version**               | `1.0.0`                                                           |

:::note
**Capability discovery only:** BookWorm's runtime privacy middleware does not call `GET /anonymizers`; it uses the built-in `replace` operator (`"<PII>"`) via [[command|AnonymizeText]].
:::

## Request & Response Contract

### Request Parameters

Accepts no path parameters, query parameters, or request body.

### Success Response (`200 OK`)

| Name       | Type       | Required | Constraints                   | Description                                                                                      |
| :--------- | :--------- | :------- | :---------------------------- | :----------------------------------------------------------------------------------------------- |
| Root value | `string[]` | Yes      | Array of operator identifiers | Names of built-in anonymization operators (e.g., `hash`, `mask`, `redact`, `replace`, `encrypt`) |

## Behavior & Side Effects

- **Read-only discovery:** Returns supported operator names from the sidecar without mutating state.

## Error Responses

| Status / Code               | Condition                             | Client Recovery Action                                   |
| :-------------------------- | :------------------------------------ | :------------------------------------------------------- |
| `500 Internal Server Error` | Sidecar unreachable or internal error | Verify the `presidio-anonymizer` sidecar health endpoint |

## Related Documentation

- [[service|presidio-api]] — Service overview and privacy middleware integration.
- [[command|AnonymizeText]] — Runtime `POST /anonymize` command used by [[service|chat-api]] and [[service|rating-api]].
- [[query|GetRecognizers]] — List available PII recognizers in Presidio Analyzer.
- [[query|GetSupportedEntities]] — List detectable PII entity types in Presidio Analyzer.

<NodeGraph />

<SchemaViewer file="schema.json" title="Get anonymizers schema" maxHeight="500" search="true" />


 ## Raw Schema:schema.json

{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"title": "GetAnonymizersResponse",
	"description": "Built-in anonymization operator names supported by Presidio Anonymizer.",
	"type": "array",
	"items": { "type": "string" }
}
