(client.governance.data.reports)
- create - Creates new one-time report
- download - Downloads violations CSV for report
- status - Fetches report run status
Creates a new one-time report and executes its batch job.
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)
| 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. |
models.UpdateDlpConfigResponse
| Error Type |
Status Code |
Content Type |
| errors.GleanError |
4XX, 5XX |
*/* |
Downloads CSV violations report for a specific report id.
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)
| 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. |
str
| Error Type |
Status Code |
Content Type |
| errors.GleanError |
4XX, 5XX |
*/* |
Fetches the status of the run corresponding to the report-id.
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)
| 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. |
models.ReportStatusResponse
| Error Type |
Status Code |
Content Type |
| errors.GleanError |
4XX, 5XX |
*/* |