Skip to content

Latest commit

 

History

History
169 lines (108 loc) · 9.88 KB

File metadata and controls

169 lines (108 loc) · 9.88 KB

Client.Governance.Data.Findings

Overview

Available Operations

  • create - Creates findings export
  • list - Lists findings exports
  • download - Downloads findings export
  • delete - Deletes findings export

create

Creates a new DLP findings export job.

Example Usage

from glean.api_client import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as glean:

    res = glean.client.governance.data.findings.create()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
export_type Optional[models.DlpExportFindingsRequestExportType] The type of export to perform
filter_ Optional[models.DlpFindingFilter] N/A
issue_filter Optional[models.DlpIssueFilter] Filter for DLP issues. Includes document-level filters and issue-specific filters.
file_name Optional[str] The name of the file to export the findings to
field_scope Optional[models.FieldScope] Controls which fields to include in the export
fields_to_exclude List[str] List of field names to exclude from the export
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ExportInfo

Errors

Error Type Status Code Content Type
errors.GleanError 4XX, 5XX */*

list

Lists all DLP findings exports.

Example Usage

from glean.api_client import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as glean:

    res = glean.client.governance.data.findings.list()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ListDlpFindingsExportsResponse

Errors

Error Type Status Code Content Type
errors.GleanError 4XX, 5XX */*

download

Downloads a DLP findings export as a CSV file.

Example Usage

from glean.api_client import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as glean:

    res = glean.client.governance.data.findings.download(id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
id str ✔️ The ID of the export to download.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

str

Errors

Error Type Status Code Content Type
errors.GleanError 4XX, 5XX */*

delete

Deletes a DLP findings export.

Example Usage

from glean.api_client import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as glean:

    glean.client.governance.data.findings.delete(id=741945)

    # Use the SDK ...

Parameters

Parameter Type Required Description
id int ✔️ The ID of the export to delete.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Errors

Error Type Status Code Content Type
errors.GleanError 4XX, 5XX */*