Create a Report
To generate a new report, you need to provide information such as the cloud provider for which you want to generate the report, along with other details like name, description, format, mandate ID, and so on.
Input ParametersInput Parameters
|
Parameter |
Mandatory/Optional | Data Type |
Description |
|---|---|---|---|
| reportName | Mandatory | String | Specify the name of the assessment report. |
| description | Optional | String | Specify the description of the report. |
| cloudType | Mandatory | String | Specify the cloud provider type (e.g., AWS, Azure, GCP, OCI) |
| query | Optional | String | Specify the custom query to filter resources. |
| startDate | Mandatory | String | Specify the start date/time for the report period (e.g., 2025-09-03T15:43:38Z). |
| endDate | Mandatory | String | Specify the end date/time for the report period. |
| executionType | Mandatory | String | Specify the type of execution (RUN_TIME or SCHEDULED). |
| policyIds | Mandatory | String | Specify the list of policy IDs to include in the report. |
| tagIds | Optional | String | Specify the list of tag IDs to filter resources. |
| connectorIds | Mandatory | String | Specify the list of connector IDs associated with cloud accounts. |
| format | Mandatory | String | Specify the output format of the report (csv, on-screen, etc.). |
| includeResourceARN (Only applicable for AWS) |
Optional | Boolean | Specify whether to include AWS Resource ARNs in the report. |
| resourceResults | Optional | String | Specify for resource-specific results. |
| iacResourceResults | Optional | String | Specify for IaC-specific results |
API request
curl --location '<URL>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
--data '{
"reportName": "AWS Assessment Report Test",
"description": "Assessment Report Decription",
"cloudType": "AWS",
"query": "",
"startDate": "2025-09-03T15:43:38Z",
"endDate": "2025-09-04T15:43:38Z",
"executionType": "RUN_TIME",
"policyIds": [
"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
],
"tagIds": [],
"connectorIds": [
"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
],
"format": "csv",
"includeResourceARN": true,
"resourceResults": [],
"iacResourceResults": []
}'
The successful response to this request will return the report with the ARN listed for the corresponding resources.
Sample - Create a new reportSample - Create a new report
API request
curl -X PATCH -u >qualys_based_url<:>password< 'Content-Type: application/json'-d ' { "cloudType": "GCP", "connectorIds": [ "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" ], "description": "sample_description", "format": "ON_SCREEN", "groupIds": [ "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" ], "mandateId": "2481", "policies": [ { "cloudType": "GCP", "policyId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" } ], "title": "gcppublicapi", "type": "MANDATE" }' 'https: //>QualysBaseURL</cloudview-api/rest/v1/reports'
Response
{ "title": "gcppublicapi", "type": "MANDATE", "format": "ON_SCREEN", "accounts": [ { "name": "GCP123", "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "accountId": "my-project-XXXXXXXXXXXXX", "cloudType": "GCP" }, { "name": "connector 2", "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "accountId": "Demo_GCP", "cloudType": "GCP" } ], "description": "string", "policies": [ { "policyId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "cloudType": "GCP" } ], "mandateId": "2481", "createdOn": "2020-07-27T05:07:01+0000", "cloudType": "GCP", "groupIds": [ "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" ], "reportId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" }
Sample: Create On-Screen Report For Build-Time Controls
API request
{ "cloudType": "GCP", "connectorIds": [ "" ], "description": "GCP_OnScreenReportBuildTime", "format": "ON-SCREEN", "mandateId": "", "policies": [ { "cloudType": "GCP", "policyId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" } ], "tagIds": [ 0 ], "title": "BT_OnScreenReport", "type": "POLICY" }
Response
{ "title": "BT_OnScreenReport", "type": "POLICY", "format": "ON-SCREEN", "accounts": [], "description": "GCP_OnScreenReportBuildTime", "policies": [ { "policyId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "cloudType": "GCP" } ], "createdOn": "2022-04-22T05:14:52+0000", "cloudType": "GCP", "qualysTags": [], "executionType": "BUILD_TIME", "reportId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" }