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.
package hello .world ;
import com .glean .api_client .glean_api_client .Glean ;
import com .glean .api_client .glean_api_client .models .components .UpdateDlpConfigRequest ;
import com .glean .api_client .glean_api_client .models .operations .CreatereportResponse ;
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 ();
UpdateDlpConfigRequest req = UpdateDlpConfigRequest .builder ()
.build ();
CreatereportResponse res = sdk .client ().governance ().data ().reports ().create ()
.request (req )
.call ();
if (res .updateDlpConfigResponse ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
request
UpdateDlpConfigRequest
✔️
The request object to use for the request.
CreatereportResponse
Error Type
Status Code
Content Type
models/errors/APIException
4XX, 5XX
*/*
Downloads CSV violations report for a specific report id.
package hello .world ;
import com .glean .api_client .glean_api_client .Glean ;
import com .glean .api_client .glean_api_client .models .operations .DownloadreportcsvResponse ;
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 ();
DownloadreportcsvResponse res = sdk .client ().governance ().data ().reports ().download ()
.id ("<id>" )
.call ();
if (res .res ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
id
String
✔️
The id of the report to download violations for.
DownloadreportcsvResponse
Error Type
Status Code
Content Type
models/errors/APIException
4XX, 5XX
*/*
Fetches the status of the run corresponding to the report-id.
package hello .world ;
import com .glean .api_client .glean_api_client .Glean ;
import com .glean .api_client .glean_api_client .models .operations .GetreportstatusResponse ;
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 ();
GetreportstatusResponse res = sdk .client ().governance ().data ().reports ().status ()
.id ("<id>" )
.call ();
if (res .reportStatusResponse ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
id
String
✔️
The id of the report to get run status for.
GetreportstatusResponse
Error Type
Status Code
Content Type
models/errors/APIException
4XX, 5XX
*/*