All Products
Search
Document Center

Security Center:DescribeImageLatestScanTask

Last Updated:Feb 20, 2024

Queries the most recent scan task that is created for an image.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DigeststringYes

The digest value of the image.

8f0fbdb41d3d1ade4ffdf21558443f4c03342010563bb8c43ccc09594d50****

Response parameters

ParameterTypeDescriptionExample
object

The data returned.

RequestIdstring

The ID of the request.

0B48AB3C-84FC-424D-A01D-B9270EF4****
Taskobject []

An array that consists of the information about the task.

Statusstring

The status of the task. Valid value:

  • PROCESSING: The task is running.
  • START: The task is being started.
  • MESSAGE_SEND: The scan task is sent.
  • PRE_ANALYZER: The image is in precheck.
  • SUCCESS: The task was successful.
  • FAIL: The task failed.
  • TIMOUT: The task timed out.
SUCCESS
Modifiedstring

The time when the task was last modified. The time is in the yyyy-MM-dd HH:mm:ss format.

2022-12-20 12:00:05
FinishTimelong

The end time of the task. A value is returned only when the task is in the Finished state. Otherwise, the returned value is empty.

1669693430977
Createstring

The time when the task was created. The time is in the yyyy-MM-dd HH:mm:ss format.

2022-12-20 11:59:05
Finishinteger

The number of images that are scanned.

100
Sourcestring

The method in which the task was created. A task can be created in the Security Center console or by calling an API operation. Valid values:

  • console_batch: The task was created in the Security Center console.
  • openapi: The task was created by calling an API operation.
console_batch
StartTimelong

The start time of the task.

1668614400000
TaskTypestring

The type of the task. Valid value:

  • IMAGE_SCAN
IMAGE_SCAN
Namestring

The name of the task.

IMAGE_SCAN
TaskIdstring

The ID of the scan task.

0a960b9a48b788a8689154b032bf****
Targetstring

The digest value of the image.

8f0fbdb41d3d1ade4ffdf21558443f4c03342010563bb8c43ccc09594d50****
Idlong

The task ID.

9755662
TargetTypestring

The type of the scanned asset. Valid value:

  • IMAGE
IMAGE

Examples

Sample success responses

JSONformat

{
  "RequestId": "0B48AB3C-84FC-424D-A01D-B9270EF4****",
  "Task": [
    {
      "Status": "SUCCESS",
      "Modified": "2022-12-20 12:00:05",
      "FinishTime": 1669693430977,
      "Create": "2022-12-20 11:59:05",
      "Finish": 100,
      "Source": "console_batch",
      "StartTime": 1668614400000,
      "TaskType": "IMAGE_SCAN",
      "Name": "IMAGE_SCAN",
      "TaskId": "0a960b9a48b788a8689154b032bf****",
      "Target": "8f0fbdb41d3d1ade4ffdf21558443f4c03342010563bb8c43ccc09594d50****",
      "Id": 9755662,
      "TargetType": "IMAGE"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
403NoPermissioncaller has no permissionYou are not authorized to do this operation.
500ServerErrorServerError-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history