Skip to content

Variable

Test Variable Definitions - Unified interface for declaring and maintaining test variables (e.g., environment variables, global parameters)


Query the list of variables

GET
/api/v1/variable

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

查询参数

dto*
类型object
必填

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

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": {
}
}
}

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

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": {
}
}
}

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Delete variables

DELETE
/api/v1/variable

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

查询参数

ids*

Variable ids

类型array
必填
maxItems200
minItems0
uniqueItemstrue

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

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": {
}
}
}

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

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": {
}
}
}

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Import the variables

POST
/api/v1/variable/import

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

multipart/form-data
object

Project id

格式"int64"

Strategy for handling duplicate apis. The COVER value overrides the local api, and the IGNORE value ignores the synchronization current api

有效值"COVER""IGNORE"

Variable specification content. Variable definition string content in json or yaml format

Variable specification file. Variable definition file in json or yaml format

格式"binary"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Import the variable example

POST
/api/v1/variable/example/import

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

查询参数

projectId*

Project id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Clone the variables

POST
/api/v1/variable/clone

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json
JSON
[
0
]

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Query the detail of variable

GET
/api/v1/variable/{id}

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Variable id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Fulltext search the list of variables

GET
/api/v1/variable/search
UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

查询参数

dto*
类型object
必填

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}
授权
变量
cURL
JavaScript
PHP
Python

Export the variables

GET
/api/v1/variable/export

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

查询参数

dto*
类型object
必填

响应

OK

*/*

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python