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
-
description
stringThe description of the Virtual Service template
-
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 template
-
liveSystemHost
stringThe host of the live system
-
liveSystemPort
integerThe port of the live system
-
name
stringThe name of the 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
stringIf there are no matching requests, this is the Transaction ID that did not match
-
updatedBy
integerName of the last user who updated the template
-
updated
dateWhen this template was updated
-
thinkTime
integerThink time is a synthetic delay inserted between test steps to ensure the test script moves at a human pace
-
updated
arrayThe 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
}