All Products
Search
Document Center

Container Registry:ListScanBaselineByTask

Last Updated:Dec 27, 2024

Queries the baseline risks of a scan task by page.

Operation description

Before you call this operation, use a Security Center scan engine to scan the image.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cr:ListScanBaselineget
*Instance
acs:cr:{#regionId}:{#accountId}:instance/{#InstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringNo

The instance ID.

cri-***********
PageNointegerNo

The page number.

1
PageSizeintegerNo

The number of entries per page.

30
LevelstringNo

The severity of the risk.

High
RepoIdstringNo

The repository ID.

crr-**************
TagstringNo

The image tag.

1.1.36
DigeststringNo

The image digest.

sha256:1c89806cfaf66d2990e2cf1131ebd56ff24b133745a33abf1228*************
ScanTaskIdstringNo

The ID of the image scan task.

3e526d7e-4b45-4703-b046-***********

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

5259118F-79E2-57E9-9AEA-551586F4FAED
Codeinteger

The return value.

success
PageNointeger

The page number.

1
IsSuccessboolean

Indicates whether the API request is successful. Valid values:

  • true: successful
  • false: failed
true
PageSizeinteger

The number of entries per page.

30
TotalCountinteger

The total number of entries returned.

2
ScanBaselinesarray<object>

The queried baseline risks.

ScanBaselinesobject
ScanTaskIdstring

The ID of the image scan task.

2328fcaa-f28a-405d-a357-asdvfrew23
BaselineClassAliasstring

The category of the baseline risk.

BaselineNameAliasstring

The name of the baseline risk.

BaselineNameLevelstring

The severity of the baseline risk.

high
LowRiskItemCountinteger

The quantity of baseline risks whose severity is low.

1
MiddleRiskItemCountinteger

The quantity of baseline risks whose severity is medium.

1
HighRiskItemCountinteger

The quantity of baseline risks whose severity is high.

1
BaselineItemCountinteger

The number of baseline risks.

1
BaselineNameKeystring

The name of the baseline risk.

ak_leak
FirstScanTimelong

The time when the image was first scanned.

2024-04-10 15:33:26
BaselineDetailDescriptionstring

The description of the baseline risk.

BaselineDetailPromptstring

The path and content of the baseline risk.

usr/local/www/project/environments/dev/common/config/paramsxxx
BaselineDetailAdvicestring

The suggestion on handling the baseline risk.

CreateTimelong

The time when the image was created.

1695090008000
UpdateTimelong

The time when the image was updated.

1684220824226

Examples

Sample success responses

JSONformat

{
  "RequestId": "5259118F-79E2-57E9-9AEA-551586F4FAED",
  "Code": 0,
  "PageNo": 1,
  "IsSuccess": true,
  "PageSize": 30,
  "TotalCount": 2,
  "ScanBaselines": [
    {
      "ScanTaskId": "2328fcaa-f28a-405d-a357-asdvfrew23",
      "BaselineClassAlias": "",
      "BaselineNameAlias": "",
      "BaselineNameLevel": "high",
      "LowRiskItemCount": 1,
      "MiddleRiskItemCount": 1,
      "HighRiskItemCount": 1,
      "BaselineItemCount": 1,
      "BaselineNameKey": "ak_leak",
      "FirstScanTime": 0,
      "BaselineDetailDescription": "",
      "BaselineDetailPrompt": "usr/local/www/project/environments/dev/common/config/paramsxxx",
      "BaselineDetailAdvice": "",
      "CreateTime": 1695090008000,
      "UpdateTime": 1684220824226
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history