更新租户项目模板配置 - UpdateDomainProjectTemplate
功能介绍
此接口用于更新租户项目模板配置
调用方法
请参见如何调用API。
URI
PUT /v4/projects/{project_id}/domain/template/{template_uri}
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 参数解释 项目UUID,项目唯一标识,固定长度32位字符(字母和数字)。获取方式请参见获取项目ID。 约束限制 不涉及 取值范围 32个字符组成的字符串 默认取值 不涉及 |
| template_uri | 是 | String | 参数解释 模板URI,唯一标识一个模板 取值范围 字符串 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| uri | 否 | String | 项目模板唯一标识 |
| domain_id | 否 | String | 项目模板归属租户 |
| name | 否 | String | 项目模板名称 |
| description | 否 | String | 项目模板描述 |
| field_vo_list | 否 | Array of ProjectTemplateFieldVo objects | 项目模板字段列表 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| table_field_name | 否 | String | 字段名称 |
| value_type | 否 | String | 字段类型 |
| is_display | 否 | Integer | 是否显示 |
| is_required | 否 | Integer | 是否必填 |
| is_lock | 否 | Integer | 是否锁定 |
| sort_numb | 否 | Integer | 排序编号 |
| default_value | 否 | String | 默认值 |
| custom_field_uri | 否 | String | 扩展字段URI |
| resource_type | 否 | String | 资源类型 |
| description | 否 | String | 描述 |
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| total | Integer | 符合条件的所有记录数 |
| value | DomainProjectTemplateVo object | 租户项目模板 |
| reason | String | 错误信息 |
| page_size | Integer | 每页展示条数 |
| page_no | Integer | 页码 |
| has_more | Boolean | 是否有更多 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| uri | String | 项目模板唯一标识 |
| domain_id | String | 项目模板归属租户 |
| name | String | 项目模板名称 |
| description | String | 项目模板描述 |
| field_vo_list | Array of ProjectTemplateFieldVo objects | 项目模板字段列表 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| table_field_name | String | 字段名称 |
| value_type | String | 字段类型 |
| is_display | Integer | 是否显示 |
| is_required | Integer | 是否必填 |
| is_lock | Integer | 是否锁定 |
| sort_numb | Integer | 排序编号 |
| default_value | String | 默认值 |
| custom_field_uri | String | 扩展字段URI |
| resource_type | String | 资源类型 |
| description | String | 描述 |
状态码:400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释 接口调用失败错误码 取值范围 不涉及 |
| error_msg | String | 参数解释 接口调用失败错误信息 取值范围 不涉及 |
状态码:500
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释 接口调用失败错误码 取值范围 不涉及 |
| error_msg | String | 参数解释 接口调用失败错误信息 取值范围 不涉及 |
请求示例
更新租户项目模板配置
put https://{endpoint}/v4/projects/{project_uuid}/domain/template/{template_uri}
{
"project_uuid" : "098ad17656684cc5a49a4f7007517f95",
"template_uri" : "tmpl-001",
"name" : "标准模板",
"description" : "标准测试模板"
} 响应示例
状态码:200
OK
{
"total" : 1,
"value" : {
"uri" : "tmpl-001",
"name" : "标准模板",
"description" : "标准测试模板"
},
"reason" : ""
} 状态码:400
Bad Request
{
"error_code" : "CLOUDTEST.00000001",
"error_msg" : "返回的错误信息"
} 状态码:500
Internal Server Error
{
"error_code" : "CLOUDTEST.00000001",
"error_msg" : "返回的错误信息"
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 500 | Internal Server Error |
错误码
请参见错误码。