API

Describes the Philter APIs.

Philter's API is divided into three sections, the Core API the Filter Profiles API, and the Alerts API.

  • Core API - methods for filtering sensitive information from text.

  • Filter Profiles API - methods for managing filter profiles.

  • Alerts API - methods for retrieving and deleting alerts.

The Philter SDKs provide convenient methods for using Philter's API methods.

API Authentication

Philter supports API authentication and it is disabled by default. (See Philter's Settings for how to enable API authentication.)

When API authentication is enabled, each API request to an endpoint other than /api/status will require an HTTP Authorization header that contains HTTP basic authentication. The value of the header should be formatted as Basic: followed by the base64 encoded value of token:<token> where <token> is the value of the API token you have chosen. For example, if the authentication token you have set is password, the value of the header would be Basic: dG9rZW46cGFzc3dvcmQ=. The CURL request for this example is:

curl -u token:password -X POST https://philter:8080/api/filter ...

All API methods except /api/status will require the Authorization header when API authentication is enabled. This is to allow monitoring tools and load balancers to be able to determine Philter's status without any additional configuration.

If API authentication is enabled but no API token has been set in Philter's settings, Philter will not start and will display an error.

The Philter SDKs support API authentication.