API to setup and download scheduled report

1. Authentication

Obtain 'x-access-token'

Authenticate with the system to obtain an x-access-token. This token must be included in all client requests for server validation.

It can be obtained from this end-point.

Request URL

Method
URL

POST

auth/realms/master/protocol/openid-connect/token

Headers

Key
Values

Content-Type

application/x-www-form-urlencoded

Body (each key value in 'x-www-form-urlencoded' form)

Key
Values

grant_type

password

client_id

admin-cli

username

<username>

password

<password>


2. Setup Scheduled Reports(One Time)

Request URL

Method
URL

POST

/api/schedule-report

Headers

Key
Values

x-access-token

string

Request

Key
Values

configuration

{

"EMAIL_LIST":[<list of Emails report Needs to be Sent>]

}

reportType

enum [TABLE_LIST, DATASOURCE_SUMMARY_PDF_REPORT, DELTA_SUMMARY_PDF_REPORT]

TABLE_LIST -> For Global structured DS Report .

DATASOURCE_SUMMARY_PDF_REPORT -> For Datasource Summary Report.

DELTA_SUMMARY_PDF_REPORT -> For DELTA Report.

cron

0 14 * * 4

Cron Expression for the schedule of the Report

notificationType

email

emailBody(Optional)

email Body of scheduled report

reportFormat(Optional)

enum [CSV, PDF, JSON] Format of the report to generate.

Sample Request Body

{
    "configuration": {
        "emailIDs": [
            "[email protected]"
        ]
    },
    "cron": "0 14 * * 4",
    "notificationType": "email",
    "emailBody": "",
    "reportType": "TABLE_LIST"
}

Sample Response Body

Response will be scheduled Report Id

{
    "id": "68e35831aab6d4f3e6de436e"
}

3. Download Scheduled Report

Request URL

Method
URL

GET

api/reports/delta-report

Headers

Key
Values

x-access-token

string

Params

Key
Values

report_type

enum [TABLE_LIST, DATASOURCE_SUMMARY_PDF_REPORT, DELTA_SUMMARY_PDF_REPORT] TABLE_LIST -> For Global structured DS Report .

DATASOURCE_SUMMARY_PDF_REPORT -> For Datasource Summary Report.

DELTA_SUMMARY_PDF_REPORT -> For DELTA Report.

Sample Response Body

Instance Name,Database Name,Table Name,Schema,Column Name,Row Count Fetch Time,Row Count,Attribute Type,Attribute Instance Count,Attribute Sensitivity,Maybe Sensitive - Yes/No,Maybe PII Reason,Data Type,Review Status,Datasource Name
35.192.10.4:1433,employee_db,customers_G9KKC_records,dbo,age_FV,2025-10-06 04:10:37 UTC,10000,AGE,20000,low,No,N/A,STRING,Unreviewed,lb-mssql
35.192.10.4:1433,employee_db,customers_G9KKC_records,dbo,age_OU,2025-10-06 04:10:37 UTC,10000,AGE,20000,low,No,N/A,STRING,Unreviewed,lb-mssql

Response Codes

Status
Response
Description

200

File will be downloaded.

Indicates a successful operation.

404

{"error":"report not available yet."}

The scheduled report is not setup or not completed yet.

500

{"error":"Something went wrong. Please try again later."}

A server-side error occurred.

Last updated