更新时间:2025-06-19 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

分页查询,下一页查询游标的起始位置。

tag

String

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

with_manifest

Boolean

是否返回镜像的manifest信息

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

Content-Type

String

application/json;charset=utf8

X-Auth-Token

String

用户Token, 通过调用IAM服务获取用户Token接口获取

响应参数

状态码:200

表4 响应Body参数

参数

参数类型

描述

nextMarker

String

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

tags

Array of ShowReposTagResp objects

镜像列表

表5 ShowReposTagResp

参数

参数类型

描述

id

Long

tag编号

repo_id

Long

仓库编号

tag

String

tag版本名称

image_id

String

镜像id

manifest

String

镜像manifest

digest

String

镜像hash值

schema

Long

docker协议版本,值为1或2

path

String

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

internal_path

String

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

size

Long

镜像大小,0 ~ 9223372036854775807

is_trusted

Boolean

默认值为false

created

String

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

updated

String

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

deleted

String

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

domain_id

String

账号ID

scanned

Boolean

镜像是否被扫描过

tag_type

Long

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

请求示例

GET https://{endpoint}/v2/manage/namespaces/{namespace}/repos/{repository}/tags

响应示例

状态码:200

查询镜像列表tag列表成功

{
  "tags" : [ {
    "id" : 1,
    "repo_id" : 1,
    "tag" : "latest",
    "image_id" : "741f24a795d6d93d7c6edd11780d63c13e16c39615dd9d223378a57a836f2ee6",
    "manifest" : "",
    "digest" : "sha256:57b605845a6367c34bfb6ea6477f16852f59aa1861a2b51d10ab77ae0a1dc9c3",
    "schema" : 2,
    "path" : "swr.cn-north-1.myhuaweicloud.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",
    "deleted" : null,
    "domain_id" : "050*****************6d70a9600",
    "scanned" : false,
    "tag_type" : 0
  } ],
  "nextMarker" : "9a909b"
}

状态码

状态码

描述

200

查询镜像列表tag列表成功

错误码

请参见错误码

相关文档