Variable
Test Variable Definitions - Unified interface for declaring and maintaining test variables (e.g., environment variables, global parameters)
Query the list of variables
Replace variable
PUT
/api/v1/variable
授权
UserHttpBearer
Use existing opaque tokens for authentication
类型HTTP (bearer)
请求体
application/json
JSON
{
"id": 0,
"projectId": 0,
"name": "string",
"description": "string",
"value": "string",
"passwordValue": true,
"extraction": {
"name": "string",
"method": "string",
"expression": "string",
"matchItem": 0,
"defaultValue": "string",
"value": "string",
"finalValue": "string",
"failureMessage": "string"
}
}
响应
OK
*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}
Add variable
POST
/api/v1/variable
授权
UserHttpBearer
Use existing opaque tokens for authentication
类型HTTP (bearer)
请求体
application/json
JSON
{
"projectId": 0,
"name": "string",
"description": "string",
"value": "string",
"passwordValue": true,
"extraction": {
"name": "string",
"method": "string",
"expression": "string",
"matchItem": 0,
"defaultValue": "string",
"value": "string",
"finalValue": "string",
"failureMessage": "string"
}
}
响应
OK
*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}
Delete variables
Update variable
PATCH
/api/v1/variable
授权
UserHttpBearer
Use existing opaque tokens for authentication
类型HTTP (bearer)
请求体
application/json
JSON
{
"id": 0,
"name": "string",
"description": "string",
"value": "string",
"passwordValue": true,
"extraction": {
"name": "string",
"method": "string",
"expression": "string",
"matchItem": 0,
"defaultValue": "string",
"value": "string",
"finalValue": "string",
"failureMessage": "string"
}
}
响应
OK
*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}
Preview the value of variable
POST
/api/v1/variable/value/preview
授权
UserHttpBearer
Use existing opaque tokens for authentication
类型HTTP (bearer)
请求体
application/json
JSON
{
"id": 0,
"name": "string",
"value": "string",
"extraction": {
"name": "string",
"method": "string",
"expression": "string",
"matchItem": 0,
"defaultValue": "string",
"value": "string",
"finalValue": "string",
"failureMessage": "string"
}
}
响应
OK
*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}
Import the variables
POST
/api/v1/variable/import
授权
UserHttpBearer
Use existing opaque tokens for authentication
类型HTTP (bearer)
请求体
multipart/form-data
projectId
integer
必填
Project id
格式
"int64"
strategyWhenDuplicated
string
必填
Strategy for handling duplicate apis. The COVER value overrides the local api, and the IGNORE value ignores the synchronization current api
有效值
"COVER"
"IGNORE"
content
string
Variable specification content. Variable definition string content in json or yaml format
file
string
Variable specification file. Variable definition file in json or yaml format
格式
"binary"
响应
OK
*/*
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}