Filtering API

Describes Philter's filtering API methods.
Philter’s filtering API provides access to Philter’s ability to filter sensitive information from text and to retrieve the health status of Philter.
The curl example commands shown on this page are written assuming Philter has been enabled for SSL. If launched from a cloud marketplace, SSL will be enabled automatically with a self-signed SSL certificate. See the SSL/TLS Settings for more information.

Contexts and Document IDs

Each filter request requires a context. When not provided in the request the context defaults to none. Contexts provide a means for logically grouping your documents during filtering. For example, documents pertaining to one health care provider may be submitted under the context hospital1, and documents pertaining to another health care provider may be submitted under the context hospital2.

Contexts and Consistent Anonymization

The context for each filter request impacts how sensitive information is replaced when found in the text. Consistent anonymization can be enabled at either the context or document level. When enabled at the context level, all instances of a given piece of sensitive information will be replaced consistently by the same value. This allows for maintaining meaning across all documents in the context.

Document Identifiers

Each filter request submitted to Philter is automatically assigned a document identifier. The document identifier is an alphanumeric value unique to that request. No two documents should be assigned the same document identifier. The document identifier is returned in the x-document-id header with each filter or explain API response.
When the replacements store is enabled, the document identifier can be used to retrieve information about the sensitive information identified in the text, such as the character-based start and end positions of the sensitive information, the type (phone number, SSN, etc.) of the sensitive information, and other attributes.
Filtering Text
Example request to filter plain text:
curl -k -X POST "https://localhost:8080/api/filter" -d @file.txt -H Content-Type "text/plain"
Example request to filter a PDF document:
curl -k -X POST "https://localhost:8080/api/filter?" -d @file.pdf -H Content-Type "application/pdf" -O
Filtering Text with Explanation
Retrieving Replacement Values
Example request to retrieve replacement values:
curl -k "https://localhost:8080/api/replacements?d=88beeff6db87a543a629fdfbbeefc192"