Export OSS detection results
Updated at:
Call the ExportOssResult operation to export the results of OSS violation detection to a file.
Usage notes
API operation: ExportOssResult
Note You can export up to 5,000 records at a time. The exported file is a .txt file. Each line in the file represents one record. Each record contains the following information: the name of the scanned OSS bucket, the scanned OSS file (key), the scan score, and the recommended action (suggestion). The fields are separated by tab characters (\t).
You can call this operation to export the results of OSS violation detection to a file. For more information about how to construct an HTTP request, see Request structure. You can also use a pre-built HTTP request. For more information, see SDK overview.
Billing: This operation is free of charge.
QPS limit
The queries per second (QPS) limit for this API is 10 per user. Exceeding this limit triggers throttling, which can impact your business. Plan your calls accordingly.
Request parameters
For more information about common request parameters, see Common parameters.
The request body is a struct. The following table describes its parameters.
| Name | Type | Required | Example | Description |
| Stock | Boolean | Yes | true | Specifies whether to export historical results.
|
| ResourceType | String | No | VEDIO | The object type of the results to export.
|
| Scene | String | No | porn | The detection scenario of the results to export.
|
| StartDate | String | No | 2018-09-04 14:17:56 +0800 | The start time of the results to export. The format is yyyy-MM-dd HH:mm:ss Z. |
| EndDate | String | No | 2018-10-04 14:17:56 +0800 | The end time of the results to export. The format is yyyy-MM-dd HH:mm:ss Z. |
| MinScore | Float | No | 90.01 | (For image objects only) The minimum threat score of the results to export. |
| MaxScore | Float | No | 99.01 | (For image objects only) The maximum threat score of the results to export. |
| Suggestion | String | No | block | The recommended action for the results to query. Valid values:
Note This parameter is required when Stock is set to true. |
| Bucket | String | No | 123 | The OSS bucket where the object to export is stored. |
| QueryId | String | No | @guid | The ID of the query request for the object to export. |
| TotalCount | Integer | No | 1000 | The total number of results. |
| PageSize | Integer | No | 20 | The number of entries per page. |
| CurrentPage | Integer | No | 1 | The current page number. |
Response data
For more information about the response, see Response parameters.
The Data field in the response body is a JSON array. Each element contains the following fields:
| Name | Type | Example | Description |
| FileUrl | String | https://example.com/tfs/xxx.txt | The URL of the returned file. |
Examples
Request example
http(s)://green.cn-shanghai.aliyuncs.com/?
Action=ExportOssResult&ServiceModule=open_api
&<Common request parameters>
{
"Stock": true
}Response example
{
"code": "200",
"data": {
"FileUrl": "https://example.com/tfs/xxx.txt"
},
"requestId": "@guid",
"successResponse": true
}Is this page helpful?