API

Describes the Filter Profile Registry's API.

The API provides endpoints for retrieving, uploading, and deleting filter profiles.

The curl examples shown on this page are written assuming the Filter Profile Registry has been enabled for SSL. See the Configuration for more information on SSL.

You may have noticed that Philter also exposes an API for managing filter profiles. The Filter Profile Registry API is identical to Philter's API. This was done to ensure interoperability between scripts written for Philter or the Filter Profile Registry.

get
List Filter Profile Names

https://filter-profile-registry:8080/api/profiles
Gets the names of available filter profiles. There are no request parameters.
Request
Response
Request
‚Äč
Response
200: OK
The response is a list of filter profile names.
["profile1", "profile2", "profile3"]

Example request:

curl -k https://localhost:8080/api/profiles

get
Get a Filter Profile

https://filter-profile-registry:8080/api/profiles/{filterProfileName}
Gets the contents of a filter profile.
Request
Response
Request
Path Parameters
filterProfileName
required
string
The name of a filter profile.
Response
200: OK
The contents of the filter profile.
{
"name": "just-phone-numbers",
"ignored": [
],
"identifiers": {
"dictionaries": [
],
"phoneNumber": {
"phoneNumberFilterStrategies": [
{
"strategy": "REDACT",
"redactionFormat": "{{{REDACTED-%t}}}"
}
]
}
}
}
404: Not Found
Returned if the requested filter profile does not exist.
There will be no response content.

Example request:

curl -k https://localhost:8080/api/profiles/my-profile

put
Upload a Filter Profile

https://filter-profile-registry:8080/api/profiles
Uploads a filter profile to the registry. If a filter profile with the given name already exists its contents will be overwritten by the uploaded profile.
Request
Response
Request
Headers
Content-Type
required
string
The value should be set to application/json.
Body Parameters
required
string
The content of the filter profile.
Response
201: Created
There will be no response.
There will be no response content.

Example request:

curl -k https://localhost:8080/api/profiles -d @profile.json

delete
Delete a Filter Profile

https://filter-profile-registry:8080/api/profiles/{filterProfileName}
Deletes a filter profile from the registry.
Request
Response
Request
Path Parameters
filterProfileName
required
string
The name of a filter profile.
Response
200: OK
There will be no response.
There will be no response content.
404: Not Found
A filter profile with the given name was not found.
There will be no response content.
500: Internal Server Error
The filter profile could not be deleted. Check Philter's log file for more information.
There will be no response content.

Example request:

curl -k https://localhost:8080/api/profiles/exprofile