获取私有镜像制品列表 | 大装置帮助中心
跳到主要内容

获取私有镜像制品列表

数据面接口。

接口描述

GET /ccr/v1/subscriptions/{subscription_name}/resourceGroups/{resource_group_name}/zones/{zone}/namespaces/{namespace_name}/repositories/{repository_name}/artifacts

请求参数(Request Parameters)

名称类型必须位置默认值约束/取值描述
subscription_namestringpath--订阅名称
resource_group_namestringpath--资源组名称
zonestringpath--可用区
namespace_namestringpath-^[a-z0-9]+(?:[._-][a-z0-9]+)*$,最大 63 字符命名空间名称
repository_namestringpath--仓库名称
filterstringquery-过滤条件,例:create_time >= 2022-06-01T00:00:00 and create_time <= 2022-06-01T23:59:59过滤制品列表
order_bystringquery-排序字段,例:create_time desc, name排序方式
page_sizeint32query-最大值 100指定每页返回的最大数据量
page_tokenstringquery--从上一次列表调用中收到的页面令牌
mirror_zonestringquery-指定从哪个可用区读取镜像数据。当镜像已同步到其他可用区时,可通过此参数从副本可用区拉取,降低跨区延迟镜像副本所在可用区名称

请求示例(Request Example)

curl --request GET 'https://compute.cn-sh-04.sensecoreapi.dev/ccr/v1/subscriptions/{subscription_name}/resourceGroups/{resource_group_name}/zones/{zone}/namespaces/{namespace_name}/repositories/{repository_name}/artifacts' \
-H 'accept: application/json' \
-H 'authorization: Bearer <token>'

响应参数(Response Parameters)

字段类型描述
artifactsarray(Artifact制品列表
next_page_tokenstring下一页的令牌
total_sizeint32制品总数

响应示例(Response Example)

{
"artifacts": [
{
"id": "12345",
"digest": "sha256:abc123...",
"manifest_media_type": "application/vnd.docker.distribution.manifest.v2+json",
"media_type": "application/vnd.docker.container.image.v1+json",
"project_id": "96",
"repository_id": "146",
"size": "52428800",
"type": "IMAGE",
"tags": [
{
"id": "1",
"name": "latest",
"artifact_id": "12345",
"immutable": false,
"push_time": "2026-04-14T08:30:00Z",
"pull_time": "2026-06-03T08:45:00Z"
}
],
"push_time": "2026-04-14T08:30:00Z",
"pull_time": "2026-06-03T08:45:00Z"
}
],
"nextPageToken": "",
"totalSize": 1
}