Update Virtual Service Properties
To update properties of an existing Virtual Service in your Workspace, you need to know your Workspace identifier and the Virtual Service identifier. The sample code uses a serviceMockId
of 1234
and a workspaceId
of 123456
. Use the actual ID values of your Workspace and Virtual Service.
Minimum Parameters for Updating Virtual Service Properties
The following parameters are the base parameters required to update Virtual Service properties.
Update a ServiceMinimum Configuration Sample
curl 'https://mock.blazemeter.com/api/v1/workspaces/123456/service-mocks/1234' \
-X PATCH \
-H 'accept: application/json;charset=UTF-8' \
-H 'Content-Type: application/json' \
-d '{ "description": "string", \
"endpointPreference": "string", \
"harborId": "string", \
"name": "string", \
"serviceId": 0, \
"shipId": "string", \
"status": "STOPPED", \
"mockServiceTransactions": [ 0 ]\
}'
Update Virtual Service Properties Request Attributes
Attributes
-
serviceMockId
integerrequired
The Virtual Service identifier
-
workspaceId
integerrequired
The Workspace identifier
-
description
stringThe description of the Virtual Service
-
endpointPreference
stringrequired
Choose HTTP or HTTPS
-
harborId
stringThis identifier was used in MAR-based Mock Services (EOL) only. The identifier of the private on-premise location (aka 'harbor'), a logical container on the BlazeMeter end that contains one or more agents (aka 'ships') on your end
-
serviceId
integerThe identifier of the Service
-
shipId
stringThis identifier was used in MAR-based Mock Services (EOL) only. The identifier of a 'ship', an agent in a logical container on the BlazeMeter end in your private on-premise location (aka 'harbor')
-
name
stringThe name of the Virtual Service
-
status
stringYou can set the status of a Virtual Service to one of the following: STOPPED, RUNNING, CONFIGURING, FAILED (Service Mock initialization failed)
-
virtualServiceTransactions
arrayThe list of identifiers of the new Transactions used in this Virtual Service
Response201 Created
{
"apiVersion": 0,
"error": "string",
"limit": 0,
"link": "string",
"requestId": "string",
"result": {
"created": "2019-07-24T16:21:44.603Z",
"createdBy": "string",
"createdDate": "string",
"description": "string",
"endpointPreference": "string",
"harborId": "string",
"httpEndpoint": "string",
"httpsEndpoint": "string",
"id": 0,
"liveSystemHost": "string",
"liveSystemPort": 0,
"name": "string",
"noMatchingRequestPreference": "string",
"noMatchingRequestTxnId": 0,
"serviceId": 0,
"serviceName": "string",
"shipId": "string",
"status": "STOPPED",
"thinkTime": 0,
"mockServiceTransactions": [
0
],
"updated": "2019-07-24T16:21:44.603Z",
"updatedBy": "string"
},
"skip": 0,
"total": 0
}