Help Center/ Host Security Service/ API Reference/ API Description/ Container Images/ Exporting Baseline Check Results of Image Repositories in Batches (Full Export Supported)
Updated on 2026-04-03 GMT+08:00

Exporting Baseline Check Results of Image Repositories in Batches (Full Export Supported)

Function

This API is used to export baseline checks for multiple image repositories (full exports supported). When exporting data for CI/CD images, set image_type as 'cicd'.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

POST /v5/{project_id}/image/baseline/export

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which is used to specify the project that an asset belongs to. After the project ID is configured, you can query assets in the project using the project ID. For details about how to obtain it, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 1 to 256 characters.

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Definition

Enterprise project ID, which is used to filter assets in different enterprise projects. For details, see Obtaining an Enterprise Project ID.

To query assets in all enterprise projects, set this parameter to all_granted_eps.

Constraints

You need to set this parameter only after the enterprise project function is enabled.

Range

The value can contain 1 to 256 characters.

Default Value

0: default enterprise project.

export_size

Yes

Integer

Definition

Number of exported data records.

Constraints

N/A

Range

The value range is 0 to 2,147,483,647.

Default Value

N/A

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token, which contains user identity and permissions. The token can be used for identity authentication when an API is called. For details about how to obtain the token, see Obtaining a User Token.

Constraints

N/A

Range

The value can contain 1 to 32,768 characters.

Default Value

N/A

region

No

String

Definition

Region ID, which is used to query assets in the required region. For details about how to obtain a region ID, see Obtaining a Region ID.

Constraints

N/A

Range

The value can contain 1 to 128 characters.

Default Value

N/A

Table 4 Request body parameters

Parameter

Mandatory

Type

Description

image_id_list

No

Array of strings

Definition

List of images to be exported. If operate_all is set to false, the batch query criteria need to be set. image_id indicates the image ID, which uniquely identifies an image (Note: For private images and shared images, the ID returned in the image list is used).

Constraints

N/A

Range

The value range is 0 to 2,147,483,647.

Default Value

N/A

operate_all

No

Boolean

Definition

If the value is true, all filter criteria can be queried.

Constraints

N/A

Range

  • true: yes.

  • false: no.

Default Value

N/A

image_type

No

String

Definition

Image type.

Constraints

N/A

Range

  • private_image: private image

  • shared_image: shared image

    • local_image: local image

    • instance_image: enterprise image

  • **harbor **: Harbor image

  • **jfrog **: Jfrog image

  • **cicd **: CI/CD image

Default Value

N/A

vul_type

No

String

Definition

Type

Constraints

N/A

Range

-linux_vul: Linux vulnerability

  • app_vul: application vulnerability

Default Value

N/A

scan_status

No

String

Definition

Scan status

Constraints

N/A

Range

  • unscan: not scanned

  • success: The scan is complete.

  • scanning

  • failed: The scan failed.

  • download_failed: The download failed.

  • image_oversized: The image is too large.

Default Value

N/A

namespace

No

String

Definition

Organization name. This parameter is available only for private and shared images.

Constraints

N/A

Range

The value can contain 0 to 65,535 characters.

Default Value

N/A

image_name

No

String

Definition

Image

Constraints

N/A

Range

The value can contain 0 to 65,535 characters.

Default Value

N/A

image_version

No

String

Definition

Image tag name

Constraints

N/A

Range

The value can contain 0 to 65,535 characters.

Default Value

N/A

image_id

No

String

Definition

Image ID.

Constraints

N/A

Range

The value can contain 0 to 128 characters.

Default Value

N/A

latest_version

No

Boolean

Definition

Display latest image versions only

Constraints

N/A

Range

  • true: yes.

  • false: no.

Default Value

N/A

image_size

No

Long

Definition

Image size

Constraints

N/A

Range

Minimum value: 0; maximum value: 2147483547

Default Value

N/A

start_latest_update_time

No

Long

Definition

Creation start date, in ms.

Constraints

N/A

Range

Minimum value: 0; maximum value: 2,147,483,547

Default Value

N/A

end_latest_update_time

No

Long

Definition

Creation end date, in ms.

Constraints

N/A

Range

Minimum value: 0; maximum value: 2,147,483,547

Default Value

N/A

start_latest_scan_time

No

Long

Definition

The start time of latest scan completion, in ms.

Constraints

N/A

Range

Minimum value: 0; maximum value: 2,147,483,547

Default Value

N/A

end_latest_scan_time

No

Long

Definition

End date of the latest scan completion time, in ms.

Constraints

N/A

Range

Minimum value: 0; maximum value: 2,147,483,547

Default Value

N/A

has_malicious_file

No

Boolean

Definition

Whether there are malicious files

Constraints

N/A

Range

  • true: yes.

  • false: no.

Default Value

N/A

has_vul

No

Boolean

Definition

Whether there are software vulnerabilities

Constraints

N/A

Range

  • true: yes.

  • false: no.

Default Value

N/A

has_unsafe_setting

No

Boolean

Definition

Whether there are baseline checks.

Constraints

N/A

Range

  • true: yes.

  • false: no.

Default Value

N/A

risky

No

Boolean

Definition

Whether there are security risks

Constraints

N/A

Range

  • true: yes.

  • false: no.

Default Value

N/A

severity_level

No

String

Definition

Image risk level, which is displayed after the image scan is complete.

Constraints

N/A

Range

  • Security

  • Low

  • Medium

  • High

Default Value

N/A

instance_name

No

String

Definition

Enterprise image instance name

Constraints

N/A

Range

The value can contain 0 to 128 characters.

Default Value

N/A

instance_id

No

String

Definition

ID of an SWR Enterprise Edition instance.

Constraints

N/A

Range

The value can contain 0 to 128 characters.

Default Value

N/A

cicd_name

No

String

Definition

CI/CD name.

Constraints

N/A

Range

Length: 0 to 128 characters

Default Value

N/A

build_command_risk_level

No

String

Definition

Risk level of a building instruction.

Constraints

N/A

Range

  • critical

  • high

  • medium

  • low

Default Value

N/A

build_command_risk_name

No

String

Definition

Name of a building instruction risk.

Constraints

N/A

Range

The value can contain 1 to 128 characters.

Default Value

N/A

build_command_rule_id_list

No

Array of strings

Definition

List of the IDs of build instruction risk detection rules to be exported. The value of rule_id can be obtained from the return parameter of the /v5/{project_id}/image/build-command-risks API.

Constraints

N/A

Range

The value can contain 1 to 200 characters.

Default Value

N/A

has_container

No

Boolean

Definition

Whether there are containers.

Constraints

N/A

Range

  • true: yes.

  • false: no.

Default Value

N/A

vul_id_list

No

Array of strings

Definition

Vulnerability ID list for the image vulnerability export.

Constraints

N/A

Range

The value range is 0 to 2048.

Default Value

N/A

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

record_total_num

Long

Definition

Total number of exported records.

Range

The value range is 0 to 2,147,483,647.

task_id

String

Definition

Export task ID

Range

The value can contain 1 to 256 characters.

Example Requests

{
  "operate_all" : true
}

Example Responses

Status code: 200

Request succeeded.

{
  "record_total_num" : 1,
  "task_id" : "asdwwqdtut01"
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.