Use this API to create a new report that lists the audit log records for the specified subscription.
    
| Parameter | Mandatory/Optional | Data Type | Description | 
|---|---|---|---|
| moduleCode | Mandatory | String | Provie module names. You can provide a maximum of 5 module names. You must enter atleast one module code or enter All to include all modules. | 
| userName | Optional | String | Provie user names.You can provide a maximum of 5 usernames. This username is the subscription username and not used to filter records. | 
| userRole | Optional | String | Provide user roles. You can provide a maximum of 5 user roles.   | 
| userUuid | Mandatory | String | Provide the user Uuid. For example, userUuid: 7688c5b4-d815-46b2-818d-749156bb85c2 | 
| customerUuid | Mandatory | String | Provide the Uuid of the customer. | 
| 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. The timestamp is in Unix Epoch format. | 
| endDate | Mandatory | String | Provide the end date. The timestamp is in Unix Epoch format. | 
| reportColumns | Mandatory | String | Provide the report column names. | 
| reportName | Mandatory | String | Provide the report name. | 
| reportSummary | Mandatory | String | Provide a summary of the report. | 
Important to Know
To filter data, you can use the folloing filters in the API body: userName, userRole, targetType, action, and modulecode.
API request
curl --location --request POST 'https://<QualysBaseURL>/audit-log/admin/report' \
--header 'Authorization: Bearer <JWT Token>' \
--header 'Content-Type: application/json' \
--data-raw ' '
Request body
   {
    "customerUuid": "33fe8ca3-d843-53ac-82e3-21cfb833d389",
    "userUuid": "7688c5b4-d815-46b2-818d-749156bb85c2",
    "userName": "qweb_rm2",
    "reportSummary": "PublicAPI-Automation-test-report-Zr00kaPIKM",
    "reportName": "PublicAPI-Automation-test-report-Zr00kaPIKM",
    "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"
    ],
    "filters": {
        "fields": [
            {
                "key": "userName",
                "value": [
                    "User_1",
                    "User_2"
                ],
                "operator": "AND"
            },
            {
                "key": "userRole",
                "value": [
                    "Manager",
                    "Reader"
                ],
                "operator": "AND"
            },
            {
                "key": "targetType",
                "value": [
                    "Account",
                    "Auth"
                ],
                "operator": "AND"
            },
            {
                "key": "action",
                "value": [
                    "Login",
                    "Update"
                ],
                "operator": "AND"
            },
            {
                "key": "moduleCode",
                "value": [
                    "PC",
                    "ADMIN",
                    "VM",
                    "VMDR",
                    "ADMIN"
                ],
                "operator": "AND"
            }
        ],
        "startDate": 1736942490000,
        "endDate": 1744718490000
    }
}Response
{   
   "message": "Request for report submitted successfully",
   "reportId": 1, 
   "createdDate": 1650444199730
}