Help Center/ Host Security Service/ API Reference/ API Description/ Container Images/ Querying Container Information of Local Images
Updated on 2026-04-03 GMT+08:00

Querying Container Information of Local Images

Function

This API is used to query container information of local images.

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

GET /v5/{project_id}/image/local/containers

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

ID of the enterprise project that a server belongs.

An enterprise project can be configured only after the enterprise project function is enabled.

Enterprise project ID. The value 0 indicates the default enterprise project. To query servers in all enterprise projects, set this parameter to all_granted_eps. If you have only the permission on an enterprise project, you need to transfer the enterprise project ID to query the server in the enterprise project. Otherwise, an error is reported due to insufficient permission.

image_digest

No

String

Image digest.

image_name

No

String

Image name

image_version

No

String

Image version

container_id

No

String

Container ID

offset

No

Integer

Offset, which specifies the start position of the record to be returned.

limit

No

Integer

Number of records displayed on each page.

agent_id

No

String

Agent Id

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

region

Yes

String

Region ID

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_num

Integer

Total

data_list

Array of LocalImageContainerInfo objects

Querying the Container List of a Local Image

Table 5 LocalImageContainerInfo

Parameter

Type

Description

agent_id

String

Agent id

container_name

String

Container Name

container_id

String

Container ID

host_id

String

Server ID

host_name

String

Server name

pod_id

String

pod id

pod_name

String

Pod name

private_ip

String

Private IP Address

public_ip

String

EIP

entry_point

String

Start command

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "total_num" : 1,
  "data_list" : [ {
    "agent_id" : "xxx",
    "container_name" : "xxx",
    "container_id" : "xxx",
    "host_id" : "xxx",
    "host_name" : "xxx",
    "pod_id" : "xxx",
    "pod_name" : "xxx",
    "private_ip" : "xxx",
    "public_ip" : "xxx",
    "entry_point" : "xxx"
  } ]
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.