更新用户自定义URL关键字 - UpdateUserDefinedUrlKeyWordUsingPUTV1
功能介绍
根据工程唯一标识、apiId和用户自定义URL关键字信息 更新用户自定义URL关键字
调用方法
请参见如何调用API。
URI
PUT /v1/{project_id}/basic-aw/{api_id}
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 参数解释: 项目UUID,项目唯一标识,固定长度32位字符(字母和数字)。获取方式请参见获取项目ID 约束限制: 不涉及 取值范围: 项目uuid应符合如下规则:长度等于32位,包含大小写字母、数字 默认取值: 不涉及 |
api_id | 是 | String | 接口的唯一标识 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
X-Auth-Token | 是 | String | 参数解释: 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 约束限制: 必传。 取值范围: 字符串长度不少于1,不超过10万。 默认取值: 不涉及。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
body_param_type | 否 | String | body请求体的类型
|
description | 否 | String | 描述 |
dft_check_point_list | 否 | Array of CheckPoint objects | 默认检查点集合 |
dft_custom_header | 否 | Array of AwParam objects | 默认请求头参数对象 |
dft_variable_list | 否 | Array of AwVariable objects | 定义的变量信息 |
extra_info | 否 | ExtraInfo object | 补充信息 |
group_name | 否 | String | 组名 |
name | 否 | String | 名称 |
param_type_and_dft_value | 否 | Array of AwParam objects | 参数类型和参数默认值对应集合 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
comparison | 否 | String | 参数解释 比较符 |
description | 否 | String | 参数解释 描述信息 |
function_arg | 否 | String | 参数解释 类型值 |
function_type | 否 | String | 参数解释 高级提取类型
|
property | 否 | String | 参数解释 属性名称 |
value | 否 | String | 参数解释 目标值 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
childImportPackage | 否 | Array of strings | 子级导入的包 |
document_link | 否 | String | 文档链接 |
http_method | 否 | String | http请求方法 |
http_url | 否 | String | HTTP请求的URL |
importPackage | 否 | Array of strings | 导入的包 |
mock | 否 | MockInfo object | 关键字实例中的mock信息 |
outputParam | 否 | Array of AwVariable objects | 输出参数 |
param_dependent | 否 | String | 参数依赖 |
summary | 否 | String | 摘要 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
by_order | 否 | Integer | 参数解释 节点顺序 |
currentPermission | 否 | String | 参数解释 当前人员权限 |
description | 否 | String | 参数解释 参数描述 |
dynamicParam | 否 | String | 参数解释 动态参数名称 |
dynamicParamFlag | 否 | Boolean | 参数解释 动态参数标志,默认为false. true代表动态参数; false代表非动态参数 |
functionParams | 否 | String | 参数解释 变量参数([]:空参、[a]:一参,[a,b]:两参) |
function_arg | 否 | String | 参数解释 提取类型的类型值 |
function_type | 否 | String | 参数解释 高级提取类型,响应提取时要使用什么方法处理参数
|
isSensitiveInfo | 否 | Boolean | 参数解释 是否是敏感字段 |
isSensitiveModified | 否 | Boolean | 参数解释 敏感字段是否被修改,不敏感字段不关注此值 |
is_out_put | 否 | Boolean | 参数解释 是否是组合关键字的输出参数,只有组合关键字下awInstance的关键字变量有该字段 |
name | 否 | String | 参数解释 参数名称 |
node_id | 否 | String | 参数解释 节点id |
node_type | 否 | Integer | 参数解释
|
oldName | 否 | String | 参数解释 旧名称 |
parent_node_id | 否 | String | 参数解释 父节点唯一标识 |
property | 否 | String | 参数解释 属性 |
regex | 否 | String | 参数解释 内置函数枚举 |
sensitiveInfoSetterTime | 否 | String | 参数解释 敏感参数设置时间 |
sensitiveInfoSetterUser | 否 | String | 参数解释 敏感参数设置者名称 |
type | 否 | String | 参数解释 类型
|
variableType | 否 | Integer | 参数解释 变量类型(0:text,10-16:分别对应7个内置函数)
|
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
basic_value | 否 | AwParamBasicValue object | 参数解释 关键字参数基本类型取值类 |
basic_value_list | 否 | Array of AwParamBasicValue objects | 参数解释 关键字参数, valueType为1时该值有效 |
custom_body | 否 | String | 参数解释 自定义requestBody内容,inType为2且isBodyCustom为1时有效 |
defaultValue | 否 | String | 参数解释 默认值 |
description | 否 | String | 参数解释 关键字参数描述 |
disabled | 否 | Boolean | 参数解释 是否禁用,只有非必需参数才能被禁用 |
drop_down_value | 否 | String | 参数解释 用于存储下拉菜单的值 |
enum_type | 否 | String | 参数解释 枚举类型 |
enum_type_selected | 否 | String | 参数解释 当前选中的枚举类型 |
format | 否 | String | 参数解释 num和String有效 |
in_type | 否 | Integer | 参数解释 rest接口输入参数类型
|
isChecked | 否 | Boolean | 参数解释 是否是被选中参数 |
is_big_field | 否 | Boolean | 参数解释 是否是大字段参数 |
is_body_custom | 否 | Integer | 参数解释 requestBody是否自定义,inType为2时有效。0-非自定义,用原有逻辑;1-自定义body,requestBody直接使用字段customBody |
is_contract_param | 否 | Integer | 参数解释 是否是契约关键字 0-否;1-yes |
is_sensitive | 否 | Boolean | 参数解释 是否敏感参数,0 是, 1 不是 |
item | 否 | ItemParam object | 参数解释 关键字基本参数 |
maxItems | 否 | Integer | 参数解释 Array类型最大元素数 |
maxLength | 否 | Long | 参数解释 String类型最大长度 |
maximum | 否 | Object | 参数解释 Number类型最大值 |
minItems | 否 | Integer | 参数解释 Array类型最小元素数 |
minLength | 否 | Long | 参数解释 String类型最小长度 |
minimum | 否 | Object | 参数解释 Number类型最小值 |
mock | 否 | MockInfo object | 参数解释 关键字实例中的mock信息 |
name | 否 | String | 参数解释 参数名 |
object_value | 否 | Array of AwParam objects | 参数解释 valueType为2时该值有效。valueType为3时,该值用来表示数组中单个结构体 |
object_value_list | 否 | Array<Array<AwParam>> | 参数解释 valueType为3时该值有效 |
pattern | 否 | String | 参数解释 num和String有效 |
required | 否 | Boolean | 参数解释 是否必需参数 |
type | 否 | String | 参数解释 参数类型
|
validate_rule | 否 | ValidateRule object | 参数解释 校验规则 |
value_type | 否 | Integer | 参数解释 参数值类型
|
xChoiceValue | 否 | String | 参数解释 choice选择关系 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
basic_value | 否 | AwParamBasicValue object | 参数解释 关键字参数基本类型取值类 |
defaultValue | 否 | String | 参数解释 默认值 |
enum_type | 否 | String | 参数解释 枚举类型 |
enum_type_selected | 否 | String | 参数解释 当前选中的枚举类型 |
format | 否 | String | 参数解释 num和String有效 |
is_big_field | 否 | Boolean | 参数解释 是否是大字段参数 |
maxItems | 否 | Integer | 参数解释 Array类型最大元素数 |
maxLength | 否 | Long | 参数解释 String类型最大长度 |
maximum | 否 | Object | Number类型最大值 |
minItems | 否 | Integer | 参数解释 Array类型最小元素数 |
minLength | 否 | Long | 参数解释 String类型最小长度 |
minimum | 否 | Object | 参数解释 Number类型最小值 |
pattern | 否 | String | 参数解释 num和String有效 |
type | 否 | String | 参数解释 参数类型
|
validate_rule | 否 | ValidateRule object | 参数解释 校验规则 |
value_type | 否 | Integer | 参数解释 参数值类型
|
xChoiceValue | 否 | String | 参数解释 choice选择关系 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
mock_id | 否 | String | 参数解释 mock唯一标识 |
mock_switch | 否 | Boolean | 参数解释 mock开关 |
mock_url | 否 | String | 参数解释 mock地址 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
dependent_info | 否 | Array of ConditionInstance objects | 参数解释 依赖信息列表 |
enabled | 否 | Boolean | 参数解释 是否启用的标识符 |
is_configDep | 否 | Boolean | 参数解释 配置依赖的标识符 |
is_dependent | 否 | Boolean | 参数解释 是否依赖的标识符 |
message | 否 | String | 参数解释 消息 |
result | 否 | String | 参数解释 结果 |
special_char | 否 | String | 参数解释 特殊字符 |
special_char_valid | 否 | String | 参数解释 特殊字符的有效性 |
x_example | 否 | String | 参数解释 示例 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
conditionIndex | 否 | Integer | 参数解释 条件索引,用于标识当前处理的是哪个条件 |
conditionMap | 否 | Map<String,Array<String>> | 参数解释 条件映射,键为整数,值为字符串列表,用于存储各个条件的信息 |
depParamMap | 否 | Map<String,DepParamInstance> | 参数解释 依赖参数实例的映射 |
statementIndex | 否 | Integer | 参数解释 声明索引,用于标识当前处理的是哪个声明 |
响应参数
状态码:200
参数 | 参数类型 | 描述 |
|---|---|---|
error | CommonResponseErrorOfobject object | 统一错误返回 |
reason | String | 错误原因 |
result | Object | 结果 |
status | String | '状态值,如success、error'
|
状态码:201
Created
状态码:401
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 参数解释 接口调用失败错误码 取值范围 12-18个字符组成的字符串 |
error_msg | String | 参数解释 接口调用失败错误信息 取值范围 3-1000个字符组成的字符串 |
状态码:403
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 参数解释 接口调用失败错误码 取值范围 12-18个字符组成的字符串 |
error_msg | String | 参数解释 接口调用失败错误信息 取值范围 3-1000个字符组成的字符串 |
状态码:404
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 参数解释 接口调用失败错误码 取值范围 12-18个字符组成的字符串 |
error_msg | String | 参数解释 接口调用失败错误信息 取值范围 3-1000个字符组成的字符串 |
请求示例
{
"extra_info" : {
"document_link" : "",
"summary" : "",
"http_method" : "post",
"mock" : {
"mock_switch" : false,
"mock_id" : "",
"mock_url" : ""
},
"param_dependent" : "",
"http_url" : "www.huawei.com"
},
"group_name" : "root",
"name" : "test23333",
"body_param_type" : "",
"description" : "222"
} 响应示例
状态码:200
SUCCESS
{
"status" : "success",
"result" : {
"id" : "bdf833f7b4484a81ae553f8eb8138017",
"warningMsg" : null,
"name" : "test23333",
"source" : null,
"method" : "post_hostUrl_www_huawei_com",
"description" : "test23333",
"nameView" : null,
"tmssCaseNumber" : null,
"region" : "{region}",
"yamlName" : null,
"create_time_string" : "2025-06-12 19:52:25 GMT+08:00",
"update_time_string" : "2025-06-12 19:52:25 GMT+08:00",
"create_time_stamp" : 1749729145000,
"update_time_stamp" : 1749729145000,
"create_user" : "CloudTest-0704",
"create_time" : "2025-06-12T07:52:25+0800",
"update_user" : "CloudTest-0704",
"update_time" : "2025-06-12T07:52:25+0800",
"param_type_and_dft_value" : [ {
"type" : "String",
"name" : "hostUrl",
"required" : false,
"disabled" : false,
"description" : null,
"mock" : null,
"isChecked" : null,
"is_big_field" : null,
"value_type" : 0,
"basic_value" : {
"value" : "$${hostURL}",
"value_range" : ""
},
"enum_type" : null,
"enum_type_selected" : null,
"minLength" : null,
"maxLength" : null,
"minimum" : null,
"maximum" : null,
"format" : null,
"pattern" : null,
"xChoiceValue" : null,
"maxItems" : null,
"minItems" : null,
"validate_rule" : null,
"defaultValue" : null,
"drop_down_value" : null,
"in_type" : 1,
"is_body_custom" : null,
"custom_body" : null,
"basic_value_list" : null,
"object_value" : null,
"object_value_list" : null,
"is_contract_param" : null,
"item" : null,
"is_sensitive" : null
}, {
"type" : "String",
"name" : "x-auth-token",
"required" : false,
"disabled" : false,
"description" : null,
"mock" : null,
"isChecked" : null,
"is_big_field" : null,
"value_type" : 0,
"basic_value" : {
"value" : "******",
"value_range" : ""
},
"enum_type" : null,
"enum_type_selected" : null,
"minLength" : null,
"maxLength" : null,
"minimum" : null,
"maximum" : null,
"format" : null,
"pattern" : null,
"xChoiceValue" : null,
"maxItems" : null,
"minItems" : null,
"validate_rule" : null,
"defaultValue" : null,
"drop_down_value" : null,
"in_type" : 3,
"is_body_custom" : null,
"custom_body" : null,
"basic_value_list" : null,
"object_value" : null,
"object_value_list" : null,
"is_contract_param" : null,
"item" : null,
"is_sensitive" : true
} ],
"dft_custom_header" : null,
"dft_check_point_list" : null,
"dft_variable_list" : null,
"keyword_variable_value" : null,
"dft_retry_times" : null,
"dft_retry_interval" : null,
"return_type" : "[{\"returnCode\":200}]",
"aw_type" : 1,
"aw_ins_list" : null,
"project_id" : "4d44481c21074c1e93c1d971e238b803",
"public_aw_lib_id" : null,
"special_type" : 90,
"has_code" : 1,
"aw_code" : "",
"group_name" : "b8889baffe4440c8aea9a3988f0641d9",
"protocol_type" : "http/https",
"by_order" : 1,
"aw_mark" : 1,
"output_param_list" : null,
"is_favorite" : null,
"tmss_case_id" : null,
"create_user_id" : null,
"aw_description" : null,
"origin_project" : null,
"aw_uniqueid" : null,
"aw_tags" : null,
"aw_operationid" : null,
"interface_label" : null,
"import_package" : null,
"public_aw_lib" : null,
"root_id" : null,
"custom_aw_libs" : null,
"delete_time" : null,
"delete_user" : null,
"extra_info" : {
"summary" : "",
"mock" : {
"mock_url" : "",
"mock_id" : "",
"mock_switch" : false
},
"http_method" : "post",
"http_url" : "http://{hostUrl}www.huawei.com",
"document_link" : "",
"param_dependent" : ""
}
},
"reason" : null,
"error" : null
} 状态码
状态码 | 描述 |
|---|---|
200 | SUCCESS |
201 | Created |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
错误码
请参见错误码。

