新增用户自定义URL关键字
功能介绍
新增用户自定义URL关键字
URI
POST /v1/{project_id}/basic-aw
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
参数解释 项目UUID,项目唯一标识,固定长度32位字符(字母和数字)。获取方式请参见获取项目ID。 约束限制 不涉及 取值范围 32个字符组成的字符串 默认取值 不涉及 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
参数解释 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值) 约束限制 不涉及 取值范围 字符串长度不少于1,不超过100000 默认取值 不涉及 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
body_param_type |
否 |
String |
body请求体的类型:text(包含JSON,参数内部区分)、form |
description |
否 |
String |
描述 |
dft_check_point_list |
否 |
Array of CheckPoint objects |
默认检查点List |
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 |
参数类型和参数默认值对应List |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
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 |
awInstance中的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 |
参数解释 是否是组合aw的输出参数,只有组合aw下awInstance的aw变量有该字段 |
name |
否 |
String |
参数解释 参数名称 |
node_id |
否 |
String |
参数解释 节点id |
node_type |
否 |
Integer |
参数解释 0/null-变量节点; 1-目录节点 |
oldName |
否 |
String |
参数解释 旧名称 |
parent_node_id |
否 |
String |
参数解释 父节点id |
property |
否 |
String |
参数解释 属性 |
regex |
否 |
String |
参数解释 内置函数枚举 |
sensitiveInfoSetterTime |
否 |
String |
参数解释 敏感参数设置时间 |
sensitiveInfoSetterUser |
否 |
String |
参数解释 敏感参数设置者名称 |
type |
否 |
String |
参数解释 类型 |
variableType |
否 |
Integer |
参数解释 变量类型(0:text,10-16:分别对应7个内置函数) |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
basic_value |
否 |
AwParamBasicValue object |
参数解释 aw参数基本类型取值类 |
basic_value_list |
否 |
Array of AwParamBasicValue objects |
参数解释 aw参数, valueType为1时该值有效 |
custom_body |
否 |
String |
参数解释 自定义requestBody内容,inType为2且isBodyCustom为1时有效 |
defaultValue |
否 |
String |
参数解释 默认值 |
description |
否 |
String |
参数解释 aw参数描述 |
disabled |
否 |
Boolean |
参数解释 是否禁用,只有非必需参数才能被禁用 |
drop_down_value |
否 |
String |
参数解释 用于存储下拉菜单的值 |
enum_type |
否 |
String |
参数解释 枚举类型 |
enum_type_selected |
否 |
String |
参数解释 当前选中的枚举类型 |
format |
否 |
String |
参数解释 num和String有效 |
in_type |
否 |
Integer |
参数解释 rest接口输入参数类型: 0-query 1-path 2-body 3-header 4-formdata 5-config |
isChecked |
否 |
Boolean |
参数解释 是否是被选中参数 |
is_big_field |
否 |
Boolean |
参数解释 是否是大字段参数 |
is_body_custom |
否 |
Integer |
参数解释 requestBody是否自定义,inType为2时有效。0-非自定义,用原有逻辑;1-自定义body,requestBody直接使用字段customBody |
is_contract_param |
否 |
Integer |
参数解释 是否是契约AW 0-否;1-yes |
is_sensitive |
否 |
Boolean |
参数解释 是否敏感参数,0 是, 1 不是 |
item |
否 |
ItemParam object |
参数解释 aw基本参数 |
maxItems |
否 |
Integer |
参数解释 Array类型最大元素数 |
maxLength |
否 |
Long |
参数解释 String类型最大长度 |
maximum |
否 |
Object |
参数解释 Number类型最大值 |
minItems |
否 |
Integer |
参数解释 Array类型最小元素数 |
minLength |
否 |
Long |
参数解释 String类型最小长度 |
minimum |
否 |
Object |
参数解释 Number类型最小值 |
mock |
否 |
MockInfo object |
参数解释 awInstance中的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选择关系 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
value |
否 |
String |
参数解释 参数默认值,用例有效 |
value_range |
否 |
String |
参数解释 参数值范围,逻辑用例有效 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
basic_value |
否 |
AwParamBasicValue object |
参数解释 aw参数基本类型取值类 |
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 id |
mock_switch |
否 |
Boolean |
参数解释 mock开关 |
mock_url |
否 |
String |
参数解释 mock url |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
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 |
参数解释 声明索引,用于标识当前处理的是哪个声明 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
compareValue |
否 |
String |
参数解释 比较值 |
comparison |
否 |
String |
参数解释 比较符 |
condition |
否 |
Boolean |
参数解释 条件 |
inValidValues |
否 |
Array of strings |
参数解释 无效值列表 |
name |
否 |
String |
参数解释 名称 |
nullInfo |
否 |
String |
参数解释 空值信息 |
relationMap |
否 |
Map<String,String> |
参数解释 关系映射,key为整数,value为字符串 |
relationNum |
否 |
Integer |
参数解释 关系数量 |
values |
否 |
Array of strings |
参数解释 值列表 |
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
code |
String |
参数解释 错误码 |
error |
CommonResponseErrorObject object |
参数解释 统一错误返回 |
reason |
String |
参数解释 失败原因 |
result |
Object |
参数解释 结果 |
status |
String |
参数解释 响应状态 |
状态码:201
Created
状态码:401
Unauthorized
状态码:403
Forbidden
状态码:404
Not Found
请求示例
post https://{endpoint}/v1/09645c1f3f954a8d9ab29174857cffc5/basic-aw
{
"name" : "baidu2",
"group_name" : "dfaba6a51f024c1f95229c1059ca34e0",
"description" : "自定义URL请求",
"extra_info" : {
"http_url" : "http://www.baidu.com",
"http_method" : "get"
},
"param_type_and_dft_value" : [ ],
"dft_check_point_list" : [ ],
"dft_variable_list" : [ ]
}
响应示例
状态码:200
OK
{
"status" : "success",
"result" : {
"id" : "37df588351464f45944580b288556d37",
"warningMsg" : null,
"name" : "baidu1",
"source" : null,
"method" : "getwww_baidu_com",
"description" : "自定义URL请求",
"nameView" : null,
"tmssCaseNumber" : null,
"region" : "cn-north-7",
"yamlName" : null,
"create_time_string" : "2024-06-21 15:46:18 GMT+08:00",
"update_time_string" : "2024-06-21 15:46:18 GMT+08:00",
"create_time_stamp" : 1718955978000,
"update_time_stamp" : 1718955978000,
"create_user" : "devcloud_devcloud_s00314720_01",
"create_time" : "2024-06-21T03:46:18+0800",
"update_user" : "devcloud_devcloud_s00314720_01",
"update_time" : "2024-06-21T03:46:18+0800",
"param_type_and_dft_value" : [ ],
"dft_custom_header" : null,
"dft_check_point_list" : [ ],
"dft_variable_list" : [ ],
"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" : "09645c1f3f954a8d9ab29174857cffc5",
"public_aw_lib_id" : null,
"special_type" : 90,
"has_code" : 1,
"aw_code" : "",
"group_name" : "dfaba6a51f024c1f95229c1059ca34e0",
"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" : {
"http_method" : "get",
"http_url" : "http://www.baidu.com"
}
},
"reason" : null,
"error" : null,
"code" : null
}
状态码
状态码 |
描述 |
---|---|
200 |
OK |
201 |
Created |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
错误码
请参见错误码。