查询镜像仓库信息

更新时间:
2025-01-14

查询镜像仓库信息

此接口用于按条件查询镜像仓库信息,包括仓库的镜像数量、仓库状态和是否符合 OCI 标准等。

接口描述

通信协议:HTTP

URL:GET /api/v1/image/count

传参方式:query

请求参数

字段名 类型 是否必填 说明
namestring镜像名称
osstring镜像类型,包括 Linux 和 SylixOS 镜像
authorstring镜像开发者

响应参数

字段名 类型 说明
registryNamestring仓库名称,本地仓库为“本地仓库”,远程仓库为新建的仓库名称
imageCountint仓库的镜像数量,不统计 OCI 标准仓库的镜像数量
registryIdstring仓库 ID ,本地仓库为 local
statusboolean仓库是否在线。ture 表示在线;false 表示不在线
standardboolean仓库是否符合 OCI 标准。ture 表示符合;false 表示不符合

请求示例

curl --location --request GET 'http://localhost:3001/api/v1/image/count'

响应示例

{
    "status": 200,
    "message": "success",
    "fieldErrors": null,
    "data": [
        {
            "count": 7,
            "registryId": "local",
            "registryName": "本地仓库"
        },
        {
            "registryId": "e6c846d4-1f92-467f-951f-197c2ce64d73",
            "registryName": "test",
            "count": 0,
            "status": true,
            "standard": true
        },
        {
            "registryId": "2bd6d8fc-da11-44c9-b5b1-9b6008d5a3ac",
            "registryName": "ECMP",
            "count": 13,
            "status": true,
            "standard": false
        }
    ]
}

错误码

具体请参见 错误码说明

文档内容是否对您有所帮助?
有帮助
没帮助