Updated on January 5, 2024

Data Scan list

The Data Scan List API’s PUT method is designed to provide information about objects within a specified data source or database. 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-list

1. If input has only data_source_name:

Code Snippet

{
  "data": {
    	"data_source_name": "Datasource1"
  }
}

input Parameters :

data_source_name:

  • Description: A user-defined identifier for the data source. Users can provide any name for this identifier.
  • Example: "Datasource1"

Output :

A list of objects within that particular data source.

{
  "data": [
    {
      "data_source_name": "Datasource1",
      "objects": [["db1","schema1","table1"],["db2","schema1","table2"],["db2","schema1","table3"]]
    }
  ],
  "success": "true",
  "error": {
    "message": ""
  }
}

2. data_source_name and object_name:

  • Description: If both data_source_name and db name are provided, the API will return have all the objects within that db.

Code Snippet :

{" data ":{
  "data_source_name": "Datasource1",
  "object_name": ["db1"]
}
}

Output :

{
  "data": [
    {
      "data_source_name": "Datasource1",
      "objects": [["db1","schema1","table1"]]
    }
  ],
  "success": "true",
  "error": {
    "message": ""
  }
}

 

What are your feelings
Scroll to Top