Version 4.0 Migration Guide
This document covers the breaking changes that must be addressed when migrating from version 3.X to version 4.0. For a list of the new features, please see the full Release Notes.
API URI change
Starting with version 4.0, you will no longer need to specify the container version in your API requests directly to the container. This change will allow customers to run multiple versions of the container simultaneously so that any API consumers can migrate without downtime. We recommend an API Gateway be utilized to insert versioning into the URI path, since it has been removed from the container.
For Community and Professional consumers, simply update v3
to v4
in your URI.
Localhost Example
curl --request POST --url http://localhost:8080/v3/process/text \
--json '{"text": ["Hello John"]}'
curl --request POST --url http://localhost:8080/process/text \
--json '{"text": ["Hello John"]}'
Community Example
curl --request POST https://api.private-ai.com/community/v3/process/text \
--header 'x-api-key: <INSERT API KEY>' --json '{"text": ["Hello John"]}'
curl --request POST https://api.private-ai.com/community/v4/process/text \
--header 'x-api-key: <INSERT API KEY>' --json '{"text": ["Hello John"]}'
Professional Example
curl --request POST https://api.private-ai.com/professional/v3/process/text \
--header 'x-api-key: <INSERT API KEY>' --json '{"text": ["Hello John"]}'
curl --request POST https://api.private-ai.com/professional/v4/process/text \
--header 'x-api-key: <INSERT API KEY>' --json '{"text": ["Hello John"]}'
GENDER_SEXUALITY Entity Change
Terms denoting gender identity and sexual orientation, previously redacted under a single class GENDER_SEXUALITY
will now be redacted under two separate classes: GENDER
and SEXUALITY
respectively. Please see our Supported Entity Types page for descriptions and examples of these entity types.
Example
{
"text": ["My male friend is gay"]
}
[
{
"processed_text": "My [GENDER_SEXUALITY_1] friend is [GENDER_SEXUALITY_2]"
}
]
[
{
"processed_text": "My [GENDER_1] friend is [SEXUALITY_1]"
}
]
HIPAA and PHI Entity Groupings Change
The entity type groupings HIPAA
and PHI
have been renamed and the entity types included in each set has also changed. HIPAA
has been renamed to HIPAA_SAFE_HARBOR
and, accordingly, only includes entity types covered by the HIPAA Safe Harbor provision. The PHI
grouping has been renamed to HEALTH_INFORMATION
. For further information on using these selective entity groupings, please see our documentation on Customizing Detection, as well as our Supported Entity Types for details on which entity types are included in each set.