Use this API to create a new report.
Parameter |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
moduleCode |
Mandatory |
String |
Provie module names. |
userName |
Optional |
String |
Provie user names. |
userRole |
Optional |
String |
Provide user roles. You can provide a maximum of 5 user roles. |
targetType |
Optional |
String |
Provide target types. You can provide a maximum of 5 target types. |
action |
Optional |
String |
Provide actions. You can provide a maximum of 5 actions. |
startDate |
Mandatory |
String |
Provide the start date. |
endDate |
Mandatory |
String |
Provide the end date. |
reportColumns |
Mandatory |
String |
Provide the report column names. |
reportName |
Mandatory |
String |
Provide the report name. |
API request
curl --location --request POST 'https://<QualysBaseURL>/audit-log/admin/report' \
--header 'Authorization: Bearer <JWT Token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"filters": {
"startDate": 1670092200000,
"endDate": 1675927200000,
"fields": [{
"key": "moduleCode",
"value": ["VMDR"],
"operator": "AND"
}]
},
"reportColumns": ["Id", "Action", "Module Name", "Module Code", "User Name", "User Role", "Status", "User Uuid", "Customer Uuid", "Client", "Source Ip", "Created Date", "Target Type", "Target Name", "Details"],
"reportName": "test1",
"reportSummary": "",
"userName": "am_as12",
"customerUuid": "349a756e-675a-e744-81bc-49ed0ecc7502",
"userUuid": "cd417634-8954-ee24-802d-dcfdb2b4c15e"
}'
Request body
{
"filters": {
"fields": [
{
"key": "targetType",
"value": [
"add",
"delete"
],
"operator": "AND"
},
{
"key": "moduleCode",
"value": [
"VM",
"PC",
"CIPS"
],
"operator": "AND"
}
],
"startDate": 1650444199730,
"endDate": 1650444199730
},
"reportColumns": [
"action",
"targetType"
],
"reportName": "testReportAPI",
"userName": "ppawar"
}
Response
{
"message": "Request for report submitted successfully",
"reportId": 1,
"createdDate": 1650444199730
}