更新时间:2025-08-14 GMT+08:00
分享

查询镜像tag列表(V3)

功能介绍

查询镜像tag列表

调用方法

请参见如何调用API

URI

GET /v3/manage/namespaces/{namespace}/repos/{repository}/tags

表1 路径参数

参数

是否必选

参数类型

描述

namespace

String

组织名称。小写字母开头,后面跟小写字母、数字、小数点、下划线或中划线(其中下划线最多允许连续两个,小数点、下划线、中划线不能直接相连),小写字母或数字结尾,1-64个字符。

repository

String

镜像仓库名称。小写字母或数字开头,后面跟小写字母、数字、小数点、斜杠、下划线或中划线(其中下划线最多允许连续两个,小数点、斜杠、下划线、中划线不能直接相连),小写字母或数字结尾,1-128个字符。如果您的镜像名称repository参数中有斜杠,请先替换成$再进行请求。

表2 Query参数

参数

是否必选

参数类型

描述

limit

Integer

查询返回镜像tag列表当前页面的数量。

每页默认值是100,最多返回1000条记录

marker

String

分页查询时的查询标记,使用上一次接口调用返回的nextMarker值。

tag

String

镜像tag名称,支持模糊匹配。

with_manifest

Boolean

是否返回镜像的manifest信息

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

Content-Type

String

消息体的类型(格式),下方类型可任选其一使用:

application/json;charset=utf-8

application/json

X-Auth-Token

String

用户Token。

通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码:200

表4 响应Body参数

参数

参数类型

描述

nextMarker

String

下一次分页查询的起始位置。如果未返回该值,则表示数据已查询完毕

tags

Array of ShowRepoTagV3 objects

镜像tag列表

表5 ShowRepoTagV3

参数

参数类型

描述

id

Integer

tag编号

repo_id

Integer

仓库编号

tag

String

tag版本名称

image_id

String

镜像id

manifest

String

镜像manifest

digest

String

镜像hash值

schema

Integer

docker协议版本,值为1或2

path

String

镜像pull地址,格式为swr.cn-north-1.my*****cloud.com/namespace/repository:tag

internal_path

String

cce集群内镜像pull路径,格式为 10.125.0.198:20202/namespace/repository:tag

size

Integer

镜像大小,0 ~ 9223372036854775807

is_trusted

Boolean

默认值为false

created

String

镜像创建时间,UTC时间格式,时间为UTC标准时间,用户需要根据本地时间计算偏移量;如东8区需要+8:00

updated

String

镜像更新时间,UTC时间格式,时间为UTC标准时间,用户需要根据本地时间计算偏移量;如东8区需要+8:00

domain_id

String

账号ID

tag_type

Integer

0:manifest类型;1:manifest list类型

请求示例

响应示例

状态码:200

查询镜像列表tag列表成功

{
  "tags" : [ {
    "id" : 1,
    "repo_id" : 1,
    "tag" : "latest",
    "image_id" : "741f24a795d6d93d7c6edd11780d63c13e16c39615dd9d223378a57a836f2ee6",
    "manifest" : "",
    "digest" : "sha256:57b605845a6367c34bfb6ea6477f16852f59aa1861a2b51d10ab77ae0a1dc9c3",
    "schema" : 2,
    "path" : "swr.cn-north-1.my*****cloud.com/namespace/busybox:latest",
    "internal_path" : "10.125.0.198:20202/namespace/busybox:latest",
    "size" : 1304902,
    "is_trusted" : false,
    "created" : "2018-07-06T06:18:55Z",
    "updated" : "2018-07-06T06:18:55Z",
    "domain_id" : "050*****************6d70a9600",
     "tag_type" : 0
  } ],
  "nextMarker" : "9a909b"
}

状态码

状态码

描述

200

查询镜像列表tag列表成功

400

错误的请求

401

鉴权失败

404

镜像仓库不存在

500

内部错误

错误码

请参见错误码

相关文档