Locate PII data
Locates the positions of PII data in text strings and classifies the findings.
If you only need an indication of whether your strings contain PII, use the contains operation.
See the Find PII guide for more information on using this operation.
The role performing this operation must have the CapAnalysisLocate
capability.
See identity and access management for more information about how capabilities are used to control access to operations and policies are used to control access to data.
This feature is enabled on Vault SaaS only. If you're interested in running it with a self-hosted deployment, please contact us.
Request
Query parameters
adhoc_reason
- stringAn ad-hoc reason for accessing the Vault data. Required when
reason
is set toOther
.reason
- stringDetails of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false.
custom_audit
- stringCustom audit information to be included in the audit log.
reload_cache
- booleanReloads the cache before the action.
Request body
The locate request.
- application/json
language
- stringLanguage of the text.
text
- array of strings required*A list of text strings to locate and identify PII in.
Example[
"My credit card number 1111-0000-1111-0000 has a minimum payment of $24.53."
]
{
"language": "en",
"text": [
"My credit card number 1111-0000-1111-0000 has a minimum payment of $24.53."
]
}
Possible responses
- 200
- 400
- 401
- 403
- 404
- 405
- 409
- 410
- 500
- 503
The request is successful.
- application/json
A list of PII entities identified.
Each object:PII entity identification result.
pii
- booleanWhether the text contains PII.
detections
- array of objectsA list of PII entities identified.
Each object:Identified PII entity type and location.
type
- stringPII entity type. See Analysis identified PII types for details of the types detected abd codes returned.
score
- numberAccuracy of the PII match.
begin_offset
- integerText start offset for the match.
end_offset
- integerText end offset for the match.
[
"{\"text\":\"My credit card number 1111-0000-1111-0000 has a minimum payment of $24.53.\",\"entities\":[{\"type\":\"CREDIT_DEBIT_NUMBER\",\"score\":0.99997807,\"begin_offset\":22,\"end_offset\":41}]}"
]
[
"{\"text\":\"My credit card number 1111-0000-1111-0000 has a minimum payment of $24.53.\",\"entities\":[{\"type\":\"CREDIT_DEBIT_NUMBER\",\"score\":0.99997807,\"begin_offset\":22,\"end_offset\":41}]}"
]
The request is invalid.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1001",
"message": "The access reason is missing.",
"context": {
"reason": null
}
}
Authentication credentials are incorrect or missing.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1005",
"message": "The request is unauthorized.",
"context": {}
}
The caller doesn't have the required access rights.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1007",
"message": "The operation is forbidden due to missing capabilities.",
"context": {
"username": "WebServer"
}
}
The requested resource is not found.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1004",
"message": "The collection is not found.",
"context": {}
}
The operation is not allowed.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1026",
"message": "The operation is not allowed in in-memory mode.",
"context": {}
}
A conflict occurs.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV3218",
"message": "Concurrent conflicting updates to the same object.",
"context": {}
}
Access to a resource that is no longer available occurs.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1033",
"message": "The resource is gone.",
"context": {}
}
An error occurs on the server.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1000",
"message": "Something went wrong",
"context": {}
}
The service is unavailable.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1009",
"message": "The operation timed out on the server.",
"context": {}
}
Query parameters
Request body
Code examples