Skip to content

MockServiceManage

Mock Service Status Management API - Control interface for mock service state management


Stop mock service by agent

POST
/api/v1/mock/service/manage/stop

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json
JSON
{
"broadcast": true,
"cmdParams": [
{
"serviceId": 0,
"deviceId": 0
}
]
}

响应

OK

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

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Query mock service status by agent

POST
/api/v1/mock/service/manage/status

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json
JSON
{
"broadcast": true,
"cmdParams": [
{
"serviceId": 0,
"serverPort": 0,
"serverIp": "string",
"deviceId": 0
}
]
}

响应

OK

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

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Start mock service by agent

POST
/api/v1/mock/service/manage/start

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json
JSON
{
"broadcast": true,
"cmdParams": [
{
"serviceId": 0,
"deviceId": 0,
"jvmArgs": "-Xms128m -Xmx256m",
"serverIp": "string",
"serverPort": 0,
"testerApisUrlPrefix": "string",
"useSsl": true,
"workThreadNum": 0,
"enableNettyLog": true,
"logFileLevel": "string",
"sendRequestLog": true,
"maxContentLength": 0,
"workPushbackThreadNum": 0,
"maxPushbackConnectTimeout": 0,
"maxPushbackRequestTimeout": 0
}
]
}

响应

OK

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

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Synchronize mock service apis by agent

POST
/api/v1/mock/service/apis/manage/sync

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json
JSON
{
"broadcast": true,
"cmdParams": {
"mockServiceId": 0,
"mockServiceIp": "string",
"mockServicePort": 0,
"deviceId": 0,
"syncAllMockApis": true,
"syncMockService": true,
"syncMockApisOperations": [
"string"
]
}
}

响应

OK

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

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Delete mock service apis by agent

POST
/api/v1/mock/service/apis/manage/delete

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json
JSON
{
"broadcast": true,
"cmdParams": {
"mockServiceId": 0,
"mockServiceIp": "string",
"mockServicePort": 0,
"deviceId": 0,
"deleteAllMockApis": true,
"deleteMockApisOperations": [
"string"
]
}
}

响应

OK

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

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Released under the GPL-3.0 License.