DescribePentestReportContent
Queries the PDF report of a specified penetration test task under the current account and returns a temporary OSS download URL and its expiration time. The report content is not returned.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| OperationType |
string |
No |
The fixed operation identifier defined by the system. The value for this operation is getPentestReportContent. You do not need to pass in this parameter. Do not set it to any other value. This parameter is currently not exposed in the SDK. Valid values:
|
getPentestReportContent |
| OperationInput |
object |
Yes |
The business parameter object for the operation, passed in JSON format. This object and its required fields must be provided. |
|
| ScanId |
string |
No |
The scan ID of a specific execution of the task. If omitted, the current scan ID of the task is used. If specified, the value must be the current or a historical scan ID of the task. You can obtain the current scan ID from TaskList[].ScanId returned by DescribePentestTaskList. |
b82f6e42-cc4d-4a39-96a4-4159cff16785 |
| TaskId |
string |
Yes |
The task ID to which the report belongs. This parameter is required and must belong to the current account. You can obtain the task ID from CreatePentestTask or TaskList[].TaskId returned by DescribePentestTaskList. |
d89742f4-59a8-4ec8-98db-d109c2365392 |
Specify the task of the current account in OperationInput.TaskId. You can use the TaskList[].TaskId returned by CreatePentestTask. ScanId is optional. If omitted, the report for the current scan of the task is queried. If specified, the value must belong to the task. You do not need to pass in OperationType.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object returned when the operation succeeds. |
||
| Report |
object |
The report download information. This field may be empty if the task has not yet generated a scan ID. The download URL and expiration time may be empty if the report is unavailable. |
|
| DownloadUrl |
string |
The pre-signed OSS download URL for the PDF report. The URL is valid for 1 hour. After it expires, call this operation again to obtain a new URL. The example uses example.com with the signature omitted to illustrate the URL format only and cannot be used for actual downloads. Keep the actual URL secure. |
https://example.com/workspace/reports/report_final.pdf |
| ExpiresAt |
integer |
The expiration time of the download URL, expressed as a UNIX timestamp in seconds, representing the number of seconds elapsed since 1970-01-01 00:00:00 UTC. This field is returned only when the download URL is successfully generated. The value is approximately 3600 seconds after the URL generation time. |
1788829200 |
| RequestId |
string |
The request ID, which is used to locate and troubleshoot issues. |
72C16BE5-08B3-48D1-8D10-6C15F5A93E27 |
After the report is generated, Report.DownloadUrl provides a temporary download URL valid for 1 hour. You can use it to download the PDF in a browser. Use Report.ExpiresAt to check the expiration time. After the URL expires, call this operation again to obtain a new URL. Report may be empty if the task does not have a scan ID yet. DownloadUrl and ExpiresAt may be empty if the scan exists but the report has not been generated or is temporarily unavailable. Check the task status first and retry after an appropriate wait. Do not share the temporary download URL publicly.
Examples
Success response
JSON format
{
"Report": {
"DownloadUrl": "https://example.com/workspace/reports/report_final.pdf",
"ExpiresAt": 1788829200
},
"RequestId": "72C16BE5-08B3-48D1-8D10-6C15F5A93E27"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | ServerError | ServerError | |
| 403 | NoPermission | caller has no permission |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.