Philter’s API provides access to Philter’s ability to detect PHI and PII, remove PHI and PII, and anonymize PHI and PII. The available methods are available via Philter’s REST interface. The REST API can be disabled in Philter’s Configuration. When disabled, all API requests will receive an HTTP 503 Service Unavailable response. (You may want to disable Philter’s REST API when using Philter’s streaming capabilities.)

The curl examples shown on this page are written assuming Philter has been enabled for SSL. If launched from the AWS or Windows Azure marketplaces or DockerHub, SSL will automatically be enabled. See the Configuration for more information on SSL.

API Clients

Pre-built API clients are available for use in your Java and .NET projects in the Philter SDK. The SDK is licensed under the business-friendly Apache License, version 2.0.

Filtering PHI from Text

This API endpoint receives text and removes PHI from the text based on Philter’s enabled and configured filters. The response from this endpoint will either be plain text or JSON depending on the value of the response.format property in Philter’s setting.

Endpoint HTTP Method Parameters Example
/api/filter POST c – The context (optional). curl -k -X POST "https://localhost:8080/api/filter?c=context" -d @file.txt -H Content-Type "text/plain"

This API endpoint receives text and analyzes it for PHI. The response is a list of types of detected PII/PHI.

Endpoint HTTP Method Parameters Example
/api/detect POST None curl -k -X POST https://localhost:8080/api/detect -d @file.txt -H Content-Type "text/plain"

Retrieving Anonymized Replacements

This API endpoint returns the status of Philter. The response will be Healthy or return an appropriate error code. This endpoint is well suited for use by an external application or service to monitor the status of Philter, such as for health checks when deployed behind an AWS EC2 load balancer.

Endpoint HTTP Method Parameters Example
/api/detect GET None curl -k https://localhost:8080/api/status
Was this article helpful to you? Yes No

How can we help?