Gleanex.Admin.Governance (Gleanex v0.1.0)

Copy Markdown View Source

Provides API endpoints related to governance

Summary

Functions

Creates findings export

Creates new policy

Creates new one-time report

Deletes findings export

Downloads findings export

Downloads violations CSV for policy

Downloads violations CSV for report

Fetches documents visibility

Gets specified policy

Fetches report run status

Lists findings exports

Lists policies

Updates an existing policy

Functions

createfindingsexport(body, opts \\ [])

@spec createfindingsexport(
  body :: Gleanex.Admin.DlpExportFindingsRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Admin.ExportInfo.t()} | {:error, Gleanex.Error.t()}

Creates findings export

Creates a new DLP findings export job.

Request Body

Content Types: application/json; charset=UTF-8

createpolicy(body, opts \\ [])

@spec createpolicy(
  body :: Gleanex.Admin.CreateDlpReportRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Admin.CreateDlpReportResponse.t()} | {:error, Gleanex.Error.t()}

Creates new policy

Creates a new policy with specified specifications and returns its id.

Request Body

Content Types: application/json; charset=UTF-8

createreport(body, opts \\ [])

@spec createreport(
  body :: Gleanex.Admin.UpdateDlpConfigRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Admin.UpdateDlpConfigResponse.t()} | {:error, Gleanex.Error.t()}

Creates new one-time report

Creates a new one-time report and executes its batch job.

Request Body

Content Types: application/json; charset=UTF-8

deletefindingsexport(id, opts \\ [])

@spec deletefindingsexport(id :: integer(), opts :: keyword()) ::
  :ok | {:error, Gleanex.Error.t()}

Deletes findings export

Deletes a DLP findings export.

downloadfindingsexport(id, opts \\ [])

@spec downloadfindingsexport(id :: String.t(), opts :: keyword()) ::
  {:ok, String.t()} | {:error, Gleanex.Error.t()}

Downloads findings export

Downloads a DLP findings export as a CSV file.

downloadpolicycsv(id, opts \\ [])

@spec downloadpolicycsv(id :: String.t(), opts :: keyword()) ::
  {:ok, String.t()} | {:error, Gleanex.Error.t()}

Downloads violations CSV for policy

Downloads CSV violations report for a specific policy id. This does not support continuous policies.

downloadreportcsv(id, opts \\ [])

@spec downloadreportcsv(id :: String.t(), opts :: keyword()) ::
  {:ok, String.t()} | {:error, Gleanex.Error.t()}

Downloads violations CSV for report

Downloads CSV violations report for a specific report id.

getdocvisibility(opts \\ [])

@spec getdocvisibility(opts :: keyword()) ::
  {:ok, Gleanex.Admin.GetDocumentVisibilityOverridesResponse.t()}
  | {:error, Gleanex.Error.t()}

Fetches documents visibility

Fetches the visibility override status of the documents passed.

Options

  • docIds: List of doc-ids which will have their hide status fetched.

getpolicy(id, opts \\ [])

@spec getpolicy(id :: String.t(), opts :: keyword()) ::
  {:ok, Gleanex.Admin.GetDlpReportResponse.t()} | {:error, Gleanex.Error.t()}

Gets specified policy

Fetches the specified policy version, or the latest if no version is provided.

Options

  • version: The version of the policy to fetch. Each time a policy is updated, the older version is still stored. If this is left empty, the latest policy is fetched.

getreportstatus(id, opts \\ [])

@spec getreportstatus(id :: String.t(), opts :: keyword()) ::
  {:ok, Gleanex.Admin.ReportStatusResponse.t()} | {:error, Gleanex.Error.t()}

Fetches report run status

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

listfindingsexports(opts \\ [])

@spec listfindingsexports(opts :: keyword()) ::
  {:ok, Gleanex.Admin.ListDlpFindingsExportsResponse.t()}
  | {:error, Gleanex.Error.t()}

Lists findings exports

Lists all DLP findings exports.

listpolicies(opts \\ [])

@spec listpolicies(opts :: keyword()) ::
  {:ok, Gleanex.Admin.ListDlpReportsResponse.t()} | {:error, Gleanex.Error.t()}

Lists policies

Lists policies with filtering.

Options

  • autoHide: Filter to return reports with a given value of auto-hide.
  • frequency: Filter to return reports with a given frequency.

setdocvisibility(body, opts \\ [])

Hide or unhide docs

Sets the visibility-override state of the documents specified, effectively hiding or un-hiding documents.

Request Body

Content Types: application/json; charset=UTF-8

updatepolicy(id, body, opts \\ [])

@spec updatepolicy(
  id :: String.t(),
  body :: Gleanex.Admin.UpdateDlpReportRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Admin.UpdateDlpReportResponse.t()} | {:error, Gleanex.Error.t()}

Updates an existing policy

Updates an existing policy.

Request Body

Content Types: application/json; charset=UTF-8