Skip to main content

Locate PII data

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

Locates PII data in text strings returning details of the location and type of data found.

This feature is enabled on Vault SaaS only. If you're interested in running it with a self-hosted deployment, please contact us.

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.

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
    [
    "{\"ip\":\"1.2.3.4\",\"email\":\"pii@example.com\"}"
    ]
Example
{
"language": "en",
"text": [
"{\"ip\":\"1.2.3.4\",\"email\":\"pii@example.com\"}"
]
}

Possible responses

The request is successful.

object required*
  • detections - array of objects required*

    A list of PII entities identified.

    Each object:
    • text - string

      Processed text.

    • entities - array of objects

      List of PII entities detected.

      Each object:

      Identified PII entity type and location.

      • type - string

        PII entity type.

      • 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
{
"detections": [
"{\"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