获取官方镜像制品列表
数据面接口。
接口描述
GET /ccr/v1/subscriptions/{subscription_name}/resourceGroups/{resource_group_name}/zones/{zone}/namespaces/{namespace_name}/officialRepositories/{repository_name}/artifacts
请求参数(Request Parameters)
| 名称 | 类型 | 必须 | 位置 | 默认值 | 约束/取值 | 描述 |
|---|---|---|---|---|---|---|
| subscription_name | string | 是 | path | - | - | 订阅名称 |
| resource_group_name | string | 是 | path | - | - | 资源组名称 |
| zone | string | 是 | path | - | - | 可用区 |
| namespace_name | string | 是 | path | - | ^[a-z0-9]+(?:[._-][a-z0-9]+)*$,最大 63 字符 | 命名空间名称 |
| repository_name | string | 是 | path | - | - | 仓库名称 |
| filter | string | 否 | query | - | 过滤条件,例:create_time >= 2022-06-01T00:00:00 and create_time <= 2022-06-01T23:59:59 | 过滤制品列表 |
| order_by | string | 否 | query | - | 排序字段,例:create_time desc, name | 排序方式 |
| page_size | int32 | 否 | query | - | 最大值 100 | 指定每页返回的最大数据量 |
| page_token | string | 否 | query | - | - | 从上一次列表调用中收到的页面令牌 |
| mirror_zone | string | 否 | query | - | 指定从哪个可用区读取镜像数据。当镜像已同步到其他可用区时,可通过此参数从副本可用区拉取,降低跨区延迟 | 镜像副本所在可用区名称 |
请求示例(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}/officialRepositories/{repository_name}/artifacts' \
-H 'accept: application/json' \
-H 'authorization: Bearer <token>'
响应参数(Response Parameters)
| 字段 | 类型 | 描述 |
|---|---|---|
| artifacts | array(Artifact) | 制品列表 |
| next_page_token | string | 下一页的令牌 |
| total_size | int32 | 制品总数 |
响应示例(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
}