Updated on July 3, 2024

Data Scan Details

The Data Scan Details API’s PUT method allows users to retrieve detailed information about data scan results for a specified data source or object path. This document provides details on how to use the API, the required input parameters, and the expected output.

Note: To obtain the <auth token>, please refer to the Step-by-Step Guide to Obtain Your Auth Token.

# Import the ProtectoVault class from the protecto_ai module
from protecto_ai import ProtectoVault
# Create an instance of ProtectoVault with your authentication token
obj = ProtectoVault("<auth_token>")

HTTP Method: PUT

Endpoint: /data-scan-details

Input Parameters

The API expects a JSON (JavaScript Object Notation) object as input with the following structure:

  • data:
    • Description: The primary input containing either a data source name alone or the object path at any level.
    • Type: Object

Example 1 :

{
  "data": {
    "data_source_name": "Datasource1"
  },
  "next_page_token": null
}

Example 2 :

{
  "data": {
    "data_source_name": "Datasource2",
    "object_name": ["db1", "schema1"]
  },
  "next_page_token": null
}

Example 3 :

{
  "data": {
    "data_source_name": "Datasource3",
    "object_name": ["db1", "schema1", "table1"]
  },
  "next_page_token": null
}

next_page_token:

  • Description: If there is more data available than what is included in the response due to API response size limitations, the API will provide a next_page_token. Users can use this token in subsequent calls to retrieve the next set of responses.
  • Type: String or null
{
  "data": {
    "data_source_name": "Datasource3"
  },
  "next_page_token": "478826829f384f45afecdaadaa1b230b"
}

Output

The API response will provide detailed information about the data scan, including data source name, object path, column details, and privacy information:

    • Description: An array of objects containing data source name, object path, and details about the columns scanned.
    • Type: Array of Objects 
{
  "details": [
    {
      "data_source_name": "Datasource1",
      "object_name": ["db1", "schema1", "table1"],
      "columns": [
        {
          "column_name": "column_1",
          "values_scanned": 250,
          "pi_details": [
            {
              "ml_identified_pi": "PERSON",
              "user_defined_pi": "-",
              "identified_count": 128,
              "identified_percentage": 20
            },
            {
              "ml_identified_pi": "ADDRESS",
              "user_defined_pi": "IP_ADDRESS",
              "identified_count": 80,
              "identified_percentage": 20
            }
          ]
        },
        {
          "column_name": "column_2",
          "values_scanned": 205,
          "pi_details": [
            {
              "ml_identified_pi": "-",
              "user_defined_pi": "EMAIL_ADDRESS",
              "identified_count": 0,
              "identified_percentage": 0
            }
          ]
        }
      ]
    }
  ],
  "next_page_token": "478826829f384f45afecdaadaa1b230b"
}

 

What are your feelings?
Scroll to Top