tencent cloud

Querying Virus Detection Task Results
Last updated:2025-09-08 19:48:49
Querying Virus Detection Task Results
Last updated: 2025-09-08 19:48:49

Feature Description

This API is used to query the status or result of a virus detection task.

Authorization Description

When used by a sub-account, the ci:DescribeAuditingVirusJob permission is required to view all Cloud Infinite actions.

Activating a Service

To use this feature, you need to enable Cloud Infinite in advance and bind a bucket. For details, see Binding a Bucket.

Use Limits

When using this API, please first confirm the relevant restrictions. For details, see Usage Limits.


Request

Request sample

GET /virus/detect/<jobId> HTTP/1.1
Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Note:
Authorization: Auth String. For details, see Request Signature document.

Request header.

This API only uses common request headers. For details, see Common Request Headers documentation.

Request body.

This request has no request body.

Response

Response Headers

This API only returns the public response header. For details, see Common Response Headers documentation.

Response Body

The response body is returned as application/xml. An example including the complete node data is shown below:
<Response>
<JobsDetail>
<Code></Code>
<Message></Message>
<JobId></JobId>
<State></State>
<CreationTime></CreationTime>
<Object></Object>
<Suggestion></Suggestion>
<DetectDetail>
<Result>
<FileName></FileName>
<VirusName></VirusName>
</Result>
<Result>
<FileName></FileName>
<VirusName></VirusName>
</Result>
</DetectDetail>
</JobsDetail>
<RequestId></RequestId>
</Response>
The data are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None.
Virus detection task result.
Container
Container node Response content:
Node Name (Keyword)
Parent Node
Description
Type
JobsDetail
Response
Detailed information of the virus detection task.
Container
Container node JobsDetail content:
Node Name (Keyword)
Parent Node
Description
Type
Code
Response.JobsDetail
Error code, which is meaningful only when State is Failed.
String
Message
Response.JobsDetail
Error description, which is meaningful only when State is Failed.
String
JobId
Response.JobsDetail
This time's virus detection task ID.
String
State
Response.JobsDetail
The status of the virus detection task, which can be one of the following: Submitted (detection submitted), Success (detection succeeded), Failed (detection failed), Auditing (detecting).
String
CreationTime
Response.JobsDetail
Virus detection task creation time.
String
Object
Response.JobsDetail
When the detected files are stored in COS, this field represents the file name of this detection.
String
Suggestion
Response.JobsDetail
This field represents the detection result of this judgment. Based on this result, you can perform subsequent operations. It is recommended that you handle different detection results accordingly based on business needs. Valid values: normal (detection normal), block (virus detected in the file).
String
DetectDetail
Response.JobsDetail
Detailed information of this detection.
Container Array
Url
Response.JobsDetail
When the detected file is a file link, this field represents the file link of this detection.
String
Content of the Container node DetectDetail:
Node Name (Keyword)
Parent Node
Description
Type
Result
Response.JobsDetail.DetectDetail
Detection result of a single file. Multiple results may exist.
Array
Content of the Array node Result:
Node Name (Keyword)
Parent Node
Description
Type
FileName
Response.JobsDetail.DetectDetail.Result
The name of the detected file. If it is a compressed file, this field represents the specific file name inside after decompression.
String
VirusName
Response.JobsDetail.DetectDetail.Result
Detected virus name.
String

Error Codes

This request returns common error responses and error codes. For more information, see Error Codes.

Examples

Request

GET /virus/detect/ssb1ca9fc8a3ed11ea834c525400863904 HTTP/1.1
Accept: */*
Authorization: q-sign-algorithm=sha1&q-ak=**********************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=**************************************
Host: examplebucket-1250000000.ci.ap-beijing.myqcloud.com

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 666
Connection: keep-alive
Date: Thu, 15 Jun 2017 12:37:29 GMT
Server: tencent-ci
x-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****

<Response>
<JobsDetail>
<Code>Success</Code>
<Message>Success</Message>
<JobId>ss364c726b370211ec8fb35254008618d9</JobId>
<State>Success</State>
<CreationTime>2021-07-07T12:12:12+0800</CreationTime>
<Object>a.doc</Object>
<Suggestion>block</Suggestion>
<DetectDetail>
<Result>
<FileName>xxx</FileName>
<VirusName>Bk.YDWebShell.Php.Small.11100752</VirusName>
</Result>
<Result>
<FileName>xxx</FileName>
<VirusName>Bk.YDWebShell.Php.Small.11100752</VirusName>
</Result>
</DetectDetail>
</JobsDetail>
</Response>

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback