Skip to content

Datasource

Entry point for executing JDBC-based tests and managing referenced data sources (e.g., database connections)


Query the list of data datasource

GET
/api/v1/data/datasource

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

查询参数

id
类型integer
format"int64"
projectId*

Project id

类型integer
必填
format"int64"
name
类型string
database
类型string
lastModifiedBy
类型integer
format"int64"
lastModifiedDate
类型string
format"date-time"
pageNo

Page data size, default 1, maximum 100000

类型integer
format"int32"
maximum100000
minimum1
pageSize

Page data size, default 10, maximum 2000

类型integer
format"int32"
maximum2000
minimum1
orderBy

Sort field

类型string
orderSort

Sorting method

类型string
枚举
"ASC""DESC"
filters[0].key

Filter field name

类型string
filters[0].op

Filter condition (EQUAL, NOT_EQUAL, GREATER_THAN, etc.)

类型string
枚举
"GREATER_THAN""LESS_THAN""GREATER_THAN_EQUAL""LESS_THAN_EQUAL""EQUAL""NOT_EQUAL""MATCH""MATCH_END""NOT_MATCH""NOT_MATCH_END""IN""NOT_IN""IS_NULL""IS_NOT_NULL"
filters[0].value

Filter value

filters[1].key

Filter field name

类型string
filters[1].op

Filter condition (EQUAL, NOT_EQUAL, GREATER_THAN, etc.)

类型string
枚举
"GREATER_THAN""LESS_THAN""GREATER_THAN_EQUAL""LESS_THAN_EQUAL""EQUAL""NOT_EQUAL""MATCH""MATCH_END""NOT_MATCH""NOT_MATCH_END""IN""NOT_IN""IS_NULL""IS_NOT_NULL"
filters[1].value

Filter value

filters[2].key

Filter field name

类型string
filters[2].op

Filter condition (EQUAL, NOT_EQUAL, GREATER_THAN, etc.)

类型string
枚举
"GREATER_THAN""LESS_THAN""GREATER_THAN_EQUAL""LESS_THAN_EQUAL""EQUAL""NOT_EQUAL""MATCH""MATCH_END""NOT_MATCH""NOT_MATCH_END""IN""NOT_IN""IS_NULL""IS_NOT_NULL"
filters[2].value

Filter value

infoScope

Query information scope

类型string
枚举
"BASIC""DETAIL"

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Replace the datasource of data

PUT
/api/v1/data/datasource

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json
JSON
{
"id": 0,
"projectId": 0,
"name": "Mysql-Conn-001",
"database": "MYSQL",
"driverClassName": "string",
"username": "admin",
"password": "xcan@123",
"jdbcUrl": "jdbc:msql://localhost:3306/angusmock"
}

响应

OK

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

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Add the datasource of data

POST
/api/v1/data/datasource

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json
JSON
{
"projectId": 0,
"name": "Mysql-Conn-001",
"database": "MYSQL",
"driverClassName": "string",
"username": "admin",
"password": "xcan@123",
"jdbcUrl": "jdbc:msql://localhost:3306/angusmock"
}

响应

OK

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

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Query the detail of data datasource

GET
/api/v1/data/datasource/{id}

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Mock datasource id

类型integer
必填
format"int64"

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Delete the datasource of data

DELETE
/api/v1/data/datasource/{id}

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Mock datasource id

类型integer
必填
format"int64"

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Test the configuration of data datasource

GET
/api/v1/data/datasource/{id}/test

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Mock datasource id

类型integer
必填
format"int64"

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Fulltext search the list of data datasource

GET
/api/v1/data/datasource/search
UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

查询参数

id
类型integer
format"int64"
projectId*

Project id

类型integer
必填
format"int64"
name
类型string
database
类型string
lastModifiedBy
类型integer
format"int64"
lastModifiedDate
类型string
format"date-time"
pageNo

Page data size, default 1, maximum 100000

类型integer
format"int32"
maximum100000
minimum1
pageSize

Page data size, default 10, maximum 2000

类型integer
format"int32"
maximum2000
minimum1
orderBy

Sort field

类型string
orderSort

Sorting method

类型string
枚举
"ASC""DESC"
filters[0].key

Filter field name

类型string
filters[0].op

Filter condition (EQUAL, NOT_EQUAL, GREATER_THAN, etc.)

类型string
枚举
"GREATER_THAN""LESS_THAN""GREATER_THAN_EQUAL""LESS_THAN_EQUAL""EQUAL""NOT_EQUAL""MATCH""MATCH_END""NOT_MATCH""NOT_MATCH_END""IN""NOT_IN""IS_NULL""IS_NOT_NULL"
filters[0].value

Filter value

filters[1].key

Filter field name

类型string
filters[1].op

Filter condition (EQUAL, NOT_EQUAL, GREATER_THAN, etc.)

类型string
枚举
"GREATER_THAN""LESS_THAN""GREATER_THAN_EQUAL""LESS_THAN_EQUAL""EQUAL""NOT_EQUAL""MATCH""MATCH_END""NOT_MATCH""NOT_MATCH_END""IN""NOT_IN""IS_NULL""IS_NOT_NULL"
filters[1].value

Filter value

filters[2].key

Filter field name

类型string
filters[2].op

Filter condition (EQUAL, NOT_EQUAL, GREATER_THAN, etc.)

类型string
枚举
"GREATER_THAN""LESS_THAN""GREATER_THAN_EQUAL""LESS_THAN_EQUAL""EQUAL""NOT_EQUAL""MATCH""MATCH_END""NOT_MATCH""NOT_MATCH_END""IN""NOT_IN""IS_NULL""IS_NOT_NULL"
filters[2].value

Filter value

infoScope

Query information scope

类型string
枚举
"BASIC""DETAIL"

OK

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

Test the configuration of data datasource

GET
/api/v1/data/datasource/config/test

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

查询参数

database*

Database data source type

类型string
必填
示例"MYSQL"
minLength1
driverClassName
类型string
username
类型string
示例"admin"
password
类型string
示例"xcan@123"
jdbcUrl*
类型string
必填
示例"jdbc:msql://localhost:3306/angusmock"
minLength1

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Released under the GPL-3.0 License.