Update Virtual Service Template
To update a Virtual Service template, you need to know your Workspace identifier and the Virtual Service Template identifier. The sample code uses a serviceMockTemplateId of 8 and a workspaceId of 123456. Use the actual ID values of your Workspace and Virtual Service template.
Minimum Parameters for updating a Virtual Service template
The following parameters are the base parameters required to update Virtual Service templates.
Update Virtual Service TemplatesMinimum Configuration Sample
curl 'https://mock.blazemeter.com/api/v1/workspaces/123456/service-mock-templates/8' \
-X PUT \
-H 'Content-Type: application/json' \
-d '{ "created": "2019-07-25T13:41:28.547Z", \
"createdBy": "string", \
"description": "string", \
"liveSystemHost": "string", \
"liveSystemPort": 0, \
"name": "string", \
"noMatchingRequestPreference": "string", \
"noMatchingRequestTxnId": 0, \
"thinkTime": 0, \
"mockServiceTransactions": [ 0 ], \
"updated": "2019-07-25T13:41:28.547Z", \
"updatedBy": "string" \
}'
Update Virtual Service Template Request Attributes
Attributes
-
descriptionstringThe description of the Virtual Service template
-
endpointPreferencestringChoose HTTP or HTTPS
-
harborIdstringThis 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
-
idintegerThe identifier of the Virtual Service template
-
liveSystemHoststringThe host of the live system
-
liveSystemPortintegerThe port of the live system
-
namestringThe name of the Virtual Service
-
noMatchingRequestPreferencestringWhat to do if there are no matching requests. Choose either
return404to return "no match found", or choosebypassliveto redirect to the live system -
noMatchingRequestTxnIdstringIf there are no matching requests, this is the Transaction ID that did not match
-
updatedByintegerName of the last user who updated the template
-
updateddateWhen this template was updated
-
thinkTimeintegerThink time is a synthetic delay inserted between test steps to ensure the test script moves at a human pace
-
updatedarrayThe new identifiers of the Transactions that you want to use in this Virtual Service
-
Response200 OK
{
"apiVersion": 0,
"error": "string",
"limit": 0,
"link": "string",
"requestId": "string",
"result": {
"created": "2019-07-25T13:45:01.191Z",
"createdBy": "string",
"description": "string",
"id": 0,
"liveSystemHost": "string",
"liveSystemPort": 0,
"name": "string",
"noMatchingRequestPreference": "string",
"noMatchingRequestTxnId": 0,
"serviceId": 0,
"serviceName": "string",
"thinkTime": 0,
"mockServiceTransactions": [
0
],
"updated": "2019-07-25T13:45:01.191Z",
"updatedBy": "string"
},
"skip": 0,
"total": 0
}