鏡像列表
更新時間 2025-01-10 10:51:06
最近更新時間: 2025-01-10 10:51:06
分享文章
接口功能介紹
鏡像列表
接口約束
華北2
URI
POST /v4/cwai/central/task-service/image/list-image
路徑參數
無
Query參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| regionID | 是 | String | 區域的唯一ID | 81f7728662dd11ec810800155d307d5b | |
| projectName | 是 | String | 鏡像所屬的項目名稱 | project-test | |
| repoName | 是 | String | 鏡像所屬倉庫名稱 | ubuntu18.04.6-torch2.0.1 | |
| nameFuzzyQuery | 否 | String | 根據Tag名稱模糊查詢 | ubuntu18 | |
| pushTimeSortRule | 否 | String | 推送時間排序規則[default(默認),ascend(升序),descend(降序)] | default | |
| pageNo | 是 | Integer | 第幾頁 | 1 | |
| pageSize | 是 | Integer | 每頁展示數量, 不大于20 | 20 |
請求參數
請求頭header參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| workspaceID | 是 | String | 工作空間ID | 1810e490-3c45-42a2-8428-08c50797e817 |
請求體body參數
無
響應參數
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| statusCode | Integer | 請求成功(800)或者失敗(900) | 800 | |
| errorCode | String | 錯誤代碼 | Cwai.Api.xxxx | |
| message | String | 錯誤信息的英文描述 | Invalid Request | |
| returnObj | Object | 返回鏡像名稱的詳細信息 | returnObj |
表 returnObj
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| currentCount | Integer | 本次查詢返回數據個數 | 10 | |
| totalCount | Integer | 符合條件的數據總數 | 10 | |
| totalPage | Integer | 總頁數 | 1 | |
| result | Array of Objects | 返回的數據列表 | result |
表 result
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| regionID | String | 81f7728662dd11ec810800155d307d5b | 區域ID | |
| id | Integer | 鏡像TagID | 246 | |
| repositoryID | Integer | 鏡像倉庫ID | 162 | |
| artifactID | Integer | 鏡像制品ID | 363 | |
| tagName | String | 鏡像Tag名稱 | v1 | |
| pushTime | String | 鏡像Tag推送時間 | 2024-01-12T06:48:04.117Z | |
| mediaType | String | 鏡像mediaType | application/vnd.docker.container.image.v1+json | |
| manifestMediaType | String | 鏡像manifestMediaType | application/vnd.docker.distribution.manifest.v2+json | |
| digest | String | 鏡像digest | sha256:40436c3f1d6b311f56a27692cdcf808ebabf9af86787213aaff61b439c48fe03 | |
| artifactPushTime | String | 鏡像制品推送時間 | 2024-01-12T06:20:54.336Z | |
| size | Integer | 鏡像大小, 單位byte | 21240352060 | |
| imageName | String | 鏡像使用全稱 | cwai.daliqc.cn:15000/project-cwpublic/ubuntu18.04.6-torch2.0.1:v1 | |
| repoName | String | 鏡像倉庫名稱 | ubuntu18.04.6-torch2.0.1 | |
| projectName | String | 鏡像項目名稱 | project-cwpublic |
枚舉參數
無
請求示例
請求url
POST //cwai-global.ctapi.daliqc.cn/v4/cwai/central/task-service/image/list-image
Content-Type:application/json
請求頭header
workspaceID:1810e490-3c45-42a2-8428-08c50797e817
User-Agent : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/110.0"
請求體body
{
"regionID": "81f7728662dd11ec810800155d307d5b",
"projectName": "admin",
"repoName": "chinese-llama2-7b",
"pushTimeSortRule": "descend",
"nameFuzzyQuery": "",
"pageNo": 1,
"pageSize": 10
}
響應示例
HTTP/1.1 200 OK
Content-Type:application/json
{
"statusCode": 800,
"message": "成功",
"returnObj": {
"currentCount": 2,
"totalCount": 2,
"totalPage": 1,
"result": [
{
"regionID": "",
"id": 458,
"repositoryID": 202,
"artifactID": 1415,
"tagName": "v2",
"pushTime": "2023-12-09T05:20:53.669Z",
"mediaType": "application/vnd.docker.container.image.v1+json",
"manifestMediaType": "application/vnd.docker.distribution.manifest.v2+json",
"digest": "sha256:1d1e8214d081db5b2281b26c504f79c73aa98574aaaa559ccfa42da231b992f6",
"size": 31913028090,
"artifactPushTime": "2023-12-09T05:20:53.659Z",
"imageName": "cbi.ccr.daliqc.cn:5000/admin/chinese-llama2-7b:v2",
"repoName": "chinese-llama2-7b",
"projectName": "admin"
},
{
"regionID": "",
"id": 392,
"repositoryID": 202,
"artifactID": 1289,
"tagName": "v1",
"pushTime": "2023-11-30T08:59:40.047Z",
"mediaType": "application/vnd.docker.container.image.v1+json",
"manifestMediaType": "application/vnd.docker.distribution.manifest.v2+json",
"digest": "sha256:1b76dda0b952b8deca1457f7c795420720c63ce495ee1b4d8933d3a25da6b841",
"size": 31913041183,
"artifactPushTime": "2023-11-30T08:59:40.036Z",
"imageName": "cbi.ccr.daliqc.cn:5000/admin/chinese-llama2-7b:v1",
"repoName": "chinese-llama2-7b",
"projectName": "admin"
}
]
}
}
狀態碼
請參考
錯誤碼
請參考