修改项目模板测试用例自定义字段 - UpdateProjectTemplateTestCaseField
功能介绍
此接口用于修改项目模板测试用例自定义字段
调用方法
请参见如何调用API。
URI
PUT /v4/{domain_id}/project/templates/{template_uri}/testcase/field/{uri}
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| domain_id | 是 | String | 参数解释 租户ID |
| template_uri | 是 | String | 参数解释 租户模板URI |
| uri | 是 | String | 参数解释 项目测试用例自定义字段Uri |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| name | 否 | String | 字段名称 |
| type | 否 | String | 字段类型(单行文本text、多行文本textArea、单选框radio、多选框checkBox、日期date、数字number、单选用户user) |
| options | 否 | Array of strings | (单选框、多选框)类型字段选项 |
| max_value | 否 | Long | 数字类型字段选项最大值 |
| min_value | 否 | Long | 数字类型字段选项最小值 |
| description | 否 | String | 字段描述 |
| is_display | 否 | Integer | 是否显示,1-显示,0-不显示 |
| is_required | 否 | Integer | 是否必填,1-必填,0-非必填 |
| is_lock | 否 | Integer | 是否锁定,1-锁定,0-不锁定 |
| default_value | 否 | String | 默认值 |
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| total | Integer | 起始记录数 大于 实际总条数时,值为0,分页请求才有此值 |
| value | String | 实际的数据类型:单个对象,集合 或 NULL |
| reason | String | 业务失败的提示内容 |
| page_size | Integer | 分页大小 |
| page_no | Integer | 分页编码 |
| has_more | Boolean | 是否有更多 |
状态码:400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释 接口调用失败错误码 取值范围 不涉及 |
| error_msg | String | 参数解释 接口调用失败错误信息 取值范围 不涉及 |
状态码:500
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释 接口调用失败错误码 取值范围 不涉及 |
| error_msg | String | 参数解释 接口调用失败错误信息 取值范围 不涉及 |
请求示例
修改项目模板测试用例自定义字段
put https://{endpoint}/v4/{domain_id}/project/templates/{template_uri}/testcase/field/{uri}
{
"domain_id" : "domain-uuid-001",
"template_uri" : "template-001",
"uri" : "field-001",
"name" : "优先级",
"type" : "radio",
"options" : [ "高", "中", "低" ]
} 响应示例
状态码:200
OK
{
"total" : 1,
"value" : "success",
"reason" : "",
"page_size" : 20,
"page_no" : 1,
"has_more" : false
} 状态码: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 |
错误码
请参见错误码。