云容器引擎-查询所有模板
接口功能介绍
调用该接口分页获取模板列表。
接口约束
无
URI
GET /v1.1/ccse/templates/page
路径参数
无
Query参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
instanceId | 是 | Long | 镜像服务实例id | 100000 | |
code | 是 | String | 镜像服务实例命名空间名称 | demo | |
templateName | 否 | String | 模板名称 | test | |
pageNow | 否 | Integer | 当前页码 | 1 | |
pageSize | 否 | Integer | 每页条数 | 10 |
请求参数
请求头header参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
regionId | 是 | String | 资源池编码 | bb9fdb42056f11eda1610242ac110002 |
请求体body参数
无
响应参数
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
statusCode | String | 状态码 | 800 | |
message | String | 提示信息 | ||
returnObj | Array of Objects | 返回对象 | returnObj | |
error | String | 错误码 | CCSE_500 |
表 returnObj
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
records | Array of Objects | 记录列表 | records | |
total | Integer | 总条数 | 10 | |
size | Integer | 每页条数 | 10 | |
current | Integer | 当前页码 | 1 | |
pages | Integer | 总页数 | 1 |
表 records
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
name | String | 模板名称 | demo-template | |
totalVersions | Integer | 模板版本数 | 1 | |
latestVersion | String | 模板最新版本 | 0.1.1 | |
description | String | 模板的描述 | ||
created | String | 创建时间 | 2023-11-11 11:11:11 | |
crNamespaceId | String | 镜像服务实例命名空间ID | 1605844135063896066 | |
crNamespaceName | String | 镜像服务实例命名空间名称 | demo_inst_ns | |
crRepositoryId | String | 镜像服务实例仓库ID | 1605844135063896066 | |
latestAppVersion | String | 模板APP最新版本 | 0.1.1 | |
version | String | 模板版本 | 0.1.1 | |
appType | String | 模板类型 | ||
appVersion | String | 模板APP版本 | 0.1.1 | |
icon | String | ico | ||
hubId | Long | hubId | ||
repositoryId | Long | 镜像仓库ID | ||
repositoryName | String | 镜像仓库名称 | ||
canDelete | Boolean | canDelete | ||
readme | String | 说明 | ||
kubeVersion | String | kubeVersion | ||
keywords | Array of Strings | 关键字 | ||
home | String | home | ||
sources | Array of Strings | sources | ||
needSubscribe | Boolean | needSubscribe | ||
tenantId | Long | 租户ID |
枚举参数
无
请求示例
请求url
GET https://ccse-global.ctapi.ctyun.cn/v1.1/ccse/templates/page?instanceId=12345&code=xx&templateName=xx&pageNow=1&pageSize=10
请求头header
{regionId:bb9fdb42056f11eda1610242ac110002}
请求体body
无
响应示例
{
"statusCode": 800,
"message": "查询模板列表成功",
"returnObj": {
"records": [
{
"name": "demo-template",
"totalVersions": 1,
"latestVersion": "0.1.1",
"created": "2023-02-27 16: 11: 59",
"repositoryId": "1605844135063896066",
"repositoryName": "demo_inst_ns",
"latestAppVersion": "0.1.0",
"readme": "",
"description": "demo template.",
"version": "0.1.1",
"kubeVersion": null,
"keywords": null,
"home": null,
"sources": null,
"appType": "observability",
"appVersion": "0.1.0"
}
],
"total": 1,
"size": 10,
"current": 1,
"pages": 1
}
}