Update a Virtual Service
To update 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 a Virtual Service
The following parameters are the base parameters required to update a Virtual Service.
Update a Virtual ServiceMinimum Configuration Sample
curl 'https://mock.blazemeter.com/api/v1/workspaces/123456/service-mocks/1234' \
-X PUT \
-H 'accept: application/json;charset=UTF-8' \
-H 'Content-Type: application/json' \
-d '{ "description": "string", \
"endpointPreference": "string", \
"harborId": "string", \
"id": 0, \
"liveSystemHost": "string", \
"liveSystemPort": 0, \
"name": "string", \
"noMatchingRequestPreference": "string", \
"noMatchingRequestTxnId": 0, \
"serviceId": 0, \
"shipId": "string", \
"thinkTime": 0, \
"mockServiceTransactions": [ 0 ]}'
Update a Virtual Service Request Attributes
Attributes
-
description
stringThe description of the Virtual Service
-
endpointPreference
stringChoose 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
-
id
integerThe identifier of the Virtual Service
-
liveSystemHost
stringThe host of the live system
-
liveSystemPort
integerThe port of the live system
-
name
stringThe name of the new Virtual Service
-
noMatchingRequestPreference
stringWhat to do if there are no matching requests. Choose either
return404
to return "no match found", or choosebypasslive
to redirect to the live system -
noMatchingRequestTxnId
integerIf there are no matching requests, this is the Transaction ID that did not match
-
serviceId
integerThe identifier of an existing Service that contains this Virtual 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')
-
thinkTime
integerThink time is a synthetic delay inserted between test steps to ensure the test script moves at a human pace
-
mockServiceTransactions
arrayThe Transaction identifiers that are assigned to this Virtual Service. You can leave the list empty and assign Transactions later
-
updated
stringThe time when this template was updated
-
updatedBy
stringName of the last user who updated the template
-
Response201 Created
{
"apiVersion": 0,
"error": "string",
"limit": 0,
"link": "string",
"requestId": "string",
"result": {
"created": "2019-07-24T16:07:03.541Z",
"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:07:03.541Z",
"updatedBy": "string"
},
"skip": 0,
"total": 0
}