Skip to content

Latest commit

 

History

History
130 lines (82 loc) · 6.25 KB

File metadata and controls

130 lines (82 loc) · 6.25 KB

Client.Governance.Data.Reports

Overview

Available Operations

  • create - Creates new one-time report
  • download - Downloads violations CSV for report
  • status - Fetches report run status

create

Creates a new one-time report and executes its batch 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.reports.create()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
config Optional[models.DlpConfig] Detailed configuration of what documents and sensitive content will be scanned.
frequency Optional[str] Only "ONCE" is supported for reports.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.UpdateDlpConfigResponse

Errors

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

download

Downloads CSV violations report for a specific report id.

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.reports.download(id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
id str ✔️ The id of the report to download violations for.
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 */*

status

Fetches the status of the run corresponding to the report-id.

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.reports.status(id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
id str ✔️ The id of the report to get run status for.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ReportStatusResponse

Errors

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