查询镜像仓库信息
此接口用于按条件查询镜像仓库信息,包括仓库的镜像数量、仓库状态和是否符合 OCI 标准等。
接口描述
通信协议:HTTP
URL:GET /api/v1/image/count
传参方式:query
请求参数
字段名 | 类型 | 是否必填 | 说明 |
---|---|---|---|
name | string | 否 | 镜像名称 |
os | string | 否 | 镜像类型,包括 Linux 和 SylixOS 镜像 |
author | string | 否 | 镜像开发者 |
响应参数
字段名 | 类型 | 说明 |
---|---|---|
registryName | string | 仓库名称,本地仓库为“本地仓库”,远程仓库为新建的仓库名称 |
imageCount | int | 仓库的镜像数量,不统计 OCI 标准仓库的镜像数量 |
registryId | string | 仓库 ID ,本地仓库为 local |
status | boolean | 仓库是否在线。ture 表示在线;false 表示不在线 |
standard | boolean | 仓库是否符合 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
}
]
}
错误码
具体请参见 错误码说明。