All Products
Search
Document Center

Security Center:ListUnfinishedOnceTask

Last Updated:Feb 20, 2024

Queries tasks that are not complete by task type.

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
TaskTypestringYes

The type of the task. Valid values:

  • ASSETS_COLLECTION: asset information collection task
  • IMAGE_SCAN: image scan task
IMAGE_SCAN
TargetstringNo

The value of the object on which the task runs. If you set TaskType to IMAGE_SCAN, set this parameter to the UUID of the image that you want to scan. If you set TaskType to ASSETS_COLLECTION, set this parameter to the UUID of the server whose information you want to collect.

4fe8e1cd-3c37-4851-b9de-124da32c****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

F5CF78A7-30AA-59DB-847F-13EE3AE7****
OnceTasksobject []

The details of the tasks.

Statusinteger

The status.

1
StatusTextstring

The status of the task. Valid values:

  • INIT: The task is not started.
  • START: The task is started.
  • SUCCESS: The task is complete.
  • TIMEOUT: The task timed out.
SUCCESS
Progresslong

The progress percentage of the task.

75
RealRunTimelong

The execution duration of the task.

1670307567000
TaskNamestring

The name of the task.

IMAGE_SCAN
Finishinteger

Indicates whether the task is complete. Valid values:

  • 0: no
  • 1: yes
1
TotalCountinteger

The total number of entries returned.

30
EndTimelong

The time when the task ends.

1670307567000
TaskTypestring

The type of the task.

IMAGE_SCAN
StartTimelong

The time when the task is started.

1640102400000
ResultInfostring

The execution result of the task.

TASK_NOT_SUPPORT_REGION
Targetstring

The objective of the task.

238cf050a7270dd6940602e70f1e5a11eeaf4e02035f445b7f613ff5e064****
TaskIdstring

The ID of the task.

9fb50f2af8bb67c9fdb684194c83****
FinishCountinteger

The number of assets on which the task is complete.

67
TargetTypestring

The type of the assets that are scanned. Valid values:

  • IMAGE_REPO: image repository
  • IMAGE: image
IMAGE
TaskImageInfoobject

The information about the image scan task.

RepoIdstring

The ID of the image repository.

crr-r88w2vryp8m****
Digeststring

The image digest.

default_digest
Tagstring

The image tag.

v1.20-002-a2*****
RepoRegionIdstring

The region ID of the image repository.

cn-hangzhou
RepoNamestring

The name of the image repository.

testyyy
RepoNamespacestring

The namespace to which the image repository belongs.

bitn***
RegionIdstring

The region ID of the server image.

cn-hangzhou
Imagestring

The container image.

***s.com/sas_test/baseli***
Podstring

The pod of the image.

expoit-law-****
AppNamestring

The name of the application.

ack-jenkins-****
NodeNamestring

The name of the node.

pztest****
NodeIpstring

The IP address of the node.

172.18.XXX.XXX
NodeInstanceIdstring

The instance ID of the node.

i-0xi5mxvtmfw9****
ClusterIdstring

The ID of the cluster.

a765ba1435e7f9446065370e9a41****
ClusterNamestring

The name of the cluster.

ACK-test-****

Examples

Sample success responses

JSONformat

{
  "RequestId": "F5CF78A7-30AA-59DB-847F-13EE3AE7****",
  "OnceTasks": [
    {
      "Status": 1,
      "StatusText": "SUCCESS",
      "Progress": 75,
      "RealRunTime": 1670307567000,
      "TaskName": "IMAGE_SCAN",
      "Finish": 1,
      "TotalCount": 30,
      "EndTime": 1670307567000,
      "TaskType": "IMAGE_SCAN",
      "StartTime": 1640102400000,
      "ResultInfo": "TASK_NOT_SUPPORT_REGION",
      "Target": "238cf050a7270dd6940602e70f1e5a11eeaf4e02035f445b7f613ff5e064****",
      "TaskId": "9fb50f2af8bb67c9fdb684194c83****",
      "FinishCount": 67,
      "TargetType": "IMAGE",
      "TaskImageInfo": {
        "RepoId": "crr-r88w2vryp8m****",
        "Digest": "default_digest",
        "Tag": "v1.20-002-a2*****",
        "RepoRegionId": "cn-hangzhou",
        "RepoName": "testyyy",
        "RepoNamespace": "bitn***",
        "RegionId": "cn-hangzhou",
        "Image": "***s.com/sas_test/baseli***",
        "Pod": "expoit-law-****",
        "AppName": "ack-jenkins-****",
        "NodeName": "pztest****",
        "NodeIp": "172.18.XXX.XXX",
        "NodeInstanceId": "i-0xi5mxvtmfw9****",
        "ClusterId": "a765ba1435e7f9446065370e9a41****",
        "ClusterName": "ACK-test-****"
      }
    }
  ]
}

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.