查询仓库列表
此接口用于按条件查询远程仓库列表。
接口描述
通信协议:HTTP
URL:GET /api/v1/registry
传参方式:query
请求参数
字段名 | 类型 | 是否必填 | 说明 |
---|---|---|---|
key | string | 是 | 搜索关键字 |
响应参数
字段名 | 类型 | 说明 |
---|---|---|
name | string | 仓库名称 |
address | string | 仓库地址 |
id | string | 仓库主键 |
createdTime | string | 创建时间 |
username | string | 连接仓库的账号 |
password | string | 连接仓库的密码 |
status | boolean | 仓库连接状态。true 表示在线;false 表示离线 |
type | enum | 仓库类型,如 docker、ECMP、unknown 等 |
请求示例
curl --location --request GET 'http://localhost:3001/api/v1/registry?key=C'
响应示例
{
"status": 200,
"message": "success",
"fieldErrors": null,
"data": [
{
"name": "OCI",
"address": "http://192.168.XX.XX:5000",
"id": "e6c846d4-1f92-467f-951f-197c2ce64d73",
"createdTime": "2023-01-09 11:09:08",
"username": "hello",
"password": "myPWD",
"status": true,
"type": "docker"
},
{
"name": "ECMP",
"address": "http://ecmp.d.e0a.cc",
"id": "2bd6d8fc-da11-44c9-b5b1-9b6008d5a3ac",
"createdTime": "2023-01-09 11:09:42",
"username": "hello",
"password": "myPWD",
"status": true,
"type": "ECMP"
}
]
}
错误码
具体请参见 错误码说明。