Skip to content

Latest commit

 

History

History
201 lines (135 loc) · 7.27 KB

File metadata and controls

201 lines (135 loc) · 7.27 KB

Governance

Overview

Available Operations

createfindingsexport

Creates a new DLP findings export job.

Example Usage

package hello.world;

import com.glean.api_client.glean_api_client.Glean;
import com.glean.api_client.glean_api_client.models.components.DlpExportFindingsRequest;
import com.glean.api_client.glean_api_client.models.operations.CreatefindingsexportResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Exception {

        Glean sdk = Glean.builder()
                .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
            .build();

        DlpExportFindingsRequest req = DlpExportFindingsRequest.builder()
                .build();

        CreatefindingsexportResponse res = sdk.governance().createfindingsexport()
                .request(req)
                .call();

        if (res.exportInfo().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
request DlpExportFindingsRequest ✔️ The request object to use for the request.

Response

CreatefindingsexportResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*

listfindingsexports

Lists all DLP findings exports.

Example Usage

package hello.world;

import com.glean.api_client.glean_api_client.Glean;
import com.glean.api_client.glean_api_client.models.operations.ListfindingsexportsResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Exception {

        Glean sdk = Glean.builder()
                .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
            .build();

        ListfindingsexportsResponse res = sdk.governance().listfindingsexports()
                .call();

        if (res.listDlpFindingsExportsResponse().isPresent()) {
            // handle response
        }
    }
}

Response

ListfindingsexportsResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*

downloadfindingsexport

Downloads a DLP findings export as a CSV file.

Example Usage

package hello.world;

import com.glean.api_client.glean_api_client.Glean;
import com.glean.api_client.glean_api_client.models.operations.DownloadfindingsexportResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Exception {

        Glean sdk = Glean.builder()
                .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
            .build();

        DownloadfindingsexportResponse res = sdk.governance().downloadfindingsexport()
                .id("<id>")
                .call();

        if (res.res().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
id String ✔️ The ID of the export to download.

Response

DownloadfindingsexportResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*

deletefindingsexport

Deletes a DLP findings export.

Example Usage

package hello.world;

import com.glean.api_client.glean_api_client.Glean;
import com.glean.api_client.glean_api_client.models.operations.DeletefindingsexportResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Exception {

        Glean sdk = Glean.builder()
                .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
            .build();

        DeletefindingsexportResponse res = sdk.governance().deletefindingsexport()
                .id(741945L)
                .call();

        // handle response
    }
}

Parameters

Parameter Type Required Description
id long ✔️ The ID of the export to delete.

Response

DeletefindingsexportResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*