Skip to main content

Locate PII data

post
/api/pvlt/1.0/data/analysis/locate

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.

info

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 - string

    An ad-hoc reason for accessing the Vault data. Required when reason is set to Other.

  • reason - string

    Details 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 - string

    Custom audit information to be included in the audit log.

  • reload_cache - boolean

    Reloads the cache before the action.

Request body

The locate request.

object required*
  • language - string

    Language 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."
    ]
Example
{
"language": "en",
"text": [
"My credit card number 1111-0000-1111-0000 has a minimum payment of $24.53."
]
}

Possible responses

The request is successful.

array of objects required*

A list of PII entities identified.

Each object:

PII entity identification result.

  • pii - boolean

    Whether the text contains PII.

  • detections - array of objects

    A list of PII entities identified.

    Each object:

    Identified PII entity type and location.

    • type - string

      PII entity type. See Analysis identified PII types for details of the types detected abd codes returned.

    • score - number

      Accuracy of the PII match.

    • begin_offset - integer

      Text start offset for the match.

    • end_offset - integer

      Text end offset for the match.

Example
[
"{\"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}]}"
]
Example
[
"{\"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}]}"
]

Try the API

Authorization

Query parameters

Request body

Navigate to the docs of your local Vault installation to try the API directly from there.

Code examples

Example