Updated on September 24, 2024

Data Scan list

The API retrieves a list of objects for the specified input parameter. The input can specify the data source alone or include further details like the (Eg database or schema)

For authentication, include the following token in the request headers:

Headers: {“Authorization”: “Bearer <AUTH_TOKEN>”}

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

Endpoint: /data-scan/objects/list

Method: PUT

Input Formats:

The input JSON can be provided in three different formats, each specifying different levels of detail.

Format 1: Data Source Name Only

    • Description: This input returns a list of all objects within the specified data source.

Sample Input:

{
"data": {
"data_source_name": "Snowflake"
}
}

Sample Output :

{
  "data": [
    {
      "data_source_name": "snowflake",
      "objects": [
        ["CustomerDB", "MarketingSchema", "Customerstable"],
        ["SalesDB", "SalesSchema", "Orderstable"],
        ["HRDB", "EmployeeDataSchema", "Employeestable"]
      ]
    }
  ],
  "success": "true",
  "error": {
    "message": ""
  }
}

Format 2: Data Source Name and object_name (any level)

    • Description: This input returns a list of all objects within the specified object path.

Sample Input 1 :

{
  "data": {
    "data_source_name": "snowflake",
    "object_name": ["CustomerDB"]
  }
}

Sample Output 1:

{
  "data": [
    {
      "data_source_name": "snowflake",
      "objects": [
        ["CustomerDB", "MarketingSchema", "Customerstable"],
        ["CustomerDB", "AnalyticsSchema", "CustomerAnalyticstable"]
      ]
    }
  ],
  "success": "true",
  "error": {
    "message": ""
  }
}

Sample Input 2:

{
  "data": {
    "data_source_name": "snowflake",
    "object_name": ["CustomerDB", "MarketingSchema"]
  }
}

Sample Output 2:

{
  "data": [
    {
      "data_source_name": "snowflake",
      "objects": [
        ["CustomerDB", "MarketingSchema", "Customerstable"],
        ["CustomerDB", "MarketingSchema", "Campaignstable"]
      ]
    }
  ],
  "success": "true",
  "error": {
    "message": ""
  }
}

Explanation:

  • Input Structure:
    • data: A JSON object containing the following keys:
      • data_source_name: The name of the data source (e.g., “Snowflake”).
      • object_name An optional list containing complete qualified path of the object
    • Output Structure:
      • data: An array of objects, each containing:
        • data_source_name: The name of the data source.
        • objects: A list of arrays, each representing a fully qualified table name in the format Eg [database, schema, table].
What are your feelings

© All Rights Reserved 2023 | Protecto

Scroll to Top