| title | Azure API Management policy reference - find-and-replace | Microsoft Docs |
|---|---|
| description | Reference for the find-and-replace policy available for use in Azure API Management. Provides policy usage, settings, and examples. |
| services | api-management |
| author | dlepow |
| ms.service | azure-api-management |
| ms.topic | reference |
| ms.date | 07/23/2024 |
| ms.author | danlep |
[!INCLUDE api-management-availability-all-tiers]
The find-and-replace policy finds a request or response substring and replaces it with a different substring.
[!INCLUDE api-management-policy-generic-alert]
<find-and-replace from="what to replace" to="replacement" />| Attribute | Description | Required | Default |
|---|---|---|---|
| from | The string to search for. Policy expressions are allowed. | Yes | N/A |
| to | The replacement string. Specify a zero length replacement string to remove the search string. Policy expressions are allowed. | Yes | N/A |
- Policy sections: inbound, outbound, backend, on-error
- Policy scopes: global, workspace, product, API, operation
- Gateways: classic, v2, consumption, self-hosted, workspace
<find-and-replace from="notebook" to="laptop" />[!INCLUDE api-management-policy-ref-next-steps]