Get OSS detection results

Updated at:

You can call the DescribeOssResultItems operation to paginate the results of an OSS content moderation scan.

Usage notes

Operation: DescribeOssResultItems

You can call this operation to paginate the results of an OSS content moderation scan. For more information about how to construct an HTTP request, see Request structure. You can also use a software development kit (SDK). For more information, see SDK overview.

Billing information: 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 the common request parameters that must be included in a request, see Common parameters.

The request body is a struct. The following table describes the parameters in the struct.
NameTypeRequiredExampleDescription
PageSizeIntegerNo20The number of results to display on each page.
CurrentPageIntegerNo1The current page number.
StartDateStringNo2018-09-04 14:17:56 +0800The start time of the query. The format is yyyy-MM-dd HH:mm:ss Z.
EndDateStringNo2018-10-04 14:17:56 +0800The end time of the query. The format is yyyy-MM-dd HH:mm:ss Z.
SceneStringYespornThe detection scenario to query. Valid values:
  • porn: pornography
  • Terrorism: Politics
SuggestionStringNoblockThe suggested action for the results to query. Valid values:
  • block: Block the content.
  • review: Manually review the content.
  • pass: Pass the content.
Note This parameter is required when Stock is set to true.
StockBooleanYestrueSpecifies whether to query the results of a full scan.
  • true: Query the results of a full scan.
  • false: Query the results of an incremental scan.
MinScoreFloatNo90.01(For image objects only) The minimum risk score for the results to query.
MaxScoreFloatNo99.01(For image objects only) The maximum risk score for the results to query.
ResourceTypeStringYesVIDEOThe type of object to query. Valid values:
  • IMAGE: image
  • VIDEO: video
BucketStringNo123The name of the OSS bucket to query.
QueryIdStringNo@guidThe ID of the detection request to query.

Return data

For more information about the response, see Response.

The Data field in the response body is a JSON array. Each element contains the following fields:
NameTypeExampleDescription
TotalCountInteger2The number of results. You can export up to 150 pages of data.
PageSizeInteger20The page size.
CurrentPageInteger1The current page number.
ScanResultListJSONArrayxxxThe list of scan results. For more information, see ScanResultList
Table 1. ScanResultList
NameTypeExampleDescription
IdString1235789The unique identifier of the scan result.
TaskIdString222222The task ID.
DataIdStringsrffdffdfd2The data ID.
SequestTimeString1527410977000The request time.
ScanFinishedTimeString1527410977000The time when the scan was completed.
RequestTimeString1527410977000The request time.
SuggestionStringreviewThe suggested follow-up operation. Valid values:
  • pass: The content is normal. No further action is required.
  • review: The result is uncertain. Manual review is required.
  • block: The content is non-compliant. The recommended action is to delete it or restrict its public access.
NewUrlStringhttps://example.com/bao/uploaded/LB1Q7lIoIbI8KJjy1zdXXbe1VXa.mp4The URL of the original file.
ThumbnailStringhttps://example.com/tfs/TB1HPS9qb9YBuNjy0FgXXcxcXXa-200-200.pngThe URL of the thumbnail.
  • For an image object, this is the URL of the image thumbnail.
  • For a video object, this is the URL of the thumbnail of the first frame.
CreateTimeString1527410977000The scan time.
BucketStringuc-imageThe OSS bucket where the resource is stored.
ObjectStringpost/image/eae1722368b6951ac05cfb68b1cdeb03.jpgThe name of the OSS object.
ScoreFloat90.9The risk score of the resource. Value range: 0 to 100. A higher score indicates a higher probability of non-compliance.
HandleStatusInteger0The processing status of the resource. Valid values:
  • 0: not processed
  • 1: deleted
  • 2: ignored
  • 3: restored
  • 4: blocked
  • 10: processed
ResourceStatusInteger1The status of the resource. Valid values:
  • 0: deleted
  • 1: frozen
  • 2: active
FrameResultsJSONArray[{"Thumbnail":"https://example.com/tfs/TB1HPS9qb9YBuNjy0FgXXcxcXXa-200-200.png","Offset":0,"Url":"https://example.com/tfs/TB1HPS9qb9YBuNjy0FgXXcxcXXa-200-200.png"}](For video objects only) The at-risk frames in the video. For more information, see FrameResults
Table 2. FrameResults
NameTypeExampleDescription
ThumbnailStringhttps://example.com/tfs/TB1HPS9qb9YBuNjy0FgXXcxcXXa-200-200.pngThe URL of the frame's thumbnail.
OffsetString0The position of the frame. This is the offset from the beginning of the video, in seconds.
UrlStringhttps://example.com/tfs/TB1HPS9qb9YBuNjy0FgXXcxcXXa-200-200.pngThe URL of the frame.

Examples

Request example
http(s)://green.cn-shanghai.aliyuncs.com/?
Action=DescribeOssResultItems&ServiceModule=open_api
&<Common request parameters>
{
  "Scene": "porn",
  "Suggestion": "block",
  "Stock": true,
  "ResourceType": "VIDEO"
}
Response example
{
  "code": "200",
  "data": {
    "TotalCount": 2,
    "PageSize": 20,
    "CurrentPage": 1,
    "ScanResultList": [
      {
        "Id": 1235789,
        "TaskId": "222222",
        "DataId": "srffdffdfd2",
        "SequestTime": "1527410977000",
        "ScanFinishedTime": "1527410977000",
        "RequestTime": "1527410977000",
        "Suggestion": "review",
        "NewUrl": "https://example.com/bao/uploaded/LB1Q7lIoIbI8KJjy1zdXXbe1VXa.mp4",
        "Thumbnail": "https://example.com/tfs/TB1HPS9qb9YBuNjy0FgXXcxcXXa-200-200.png",
        "CreateTime": "1527410977000",
        "Bucket": "uc-image",
        "Object": "post/image/eae1722368b6951ac05cfb68b1cdeb03.jpg",
        "Score": 90.9,
        "HandleStatus": 0,
        "ResourceStatus": 1,
        "FrameResults": [
          {
            "Thumbnail": "https://example.com/tfs/TB1HPS9qb9YBuNjy0FgXXcxcXXa-200-200.png",
            "Offset": 0,
            "Url": "https://example.com/tfs/TB1HPS9qb9YBuNjy0FgXXcxcXXa-200-200.png"
          }
        ]
      },
      {
        "Id": 123579,
        "TaskId": "222222",
        "DataId": "srffdffdfd2",
        "SequestTime": "1527410977000",
        "ScanFinishedTime": "1527410977000",
        "RequestTime": "1527410977000",
        "Suggestion": "review",
        "NewUrl": "https://example.com/bao/uploaded/LB1Q7lIoIbI8KJjy1zdXXbe1VXa.mp4",
        "Thumbnail": "https://example.com/tfs/TB1HPS9qb9YBuNjy0FgXXcxcXXa-200-200.png",
        "CreateTime": "1527410977000",
        "Bucket": "uc-image",
        "Object": "post/image/eae1722368b6951ac05cfb68b1cdeb03.jpg",
        "Score": 90.9,
        "HandleStatus": 0,
        "ResourceStatus": 1,
        "FrameResults": [
          {
            "Thumbnail": "https://example.com/tfs/TB1HPS9qb9YBuNjy0FgXXcxcXXa-200-200.png",
            "Offset": 0,
            "Url": "https://example.com/tfs/TB1HPS9qb9YBuNjy0FgXXcxcXXa-200-200.png"
          }
        ]
      }
    ]
  },
  "requestId": "@guid",
  "successResponse": true
}