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 string

    The description of the Virtual Service template

  • endpointPreference string

    Choose HTTP or HTTPS

  • harborId string

    This 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 integer

    The identifier of the Virtual Service template

  • liveSystemHost string

    The host of the live system

  • liveSystemPort integer

    The port of the live system

  • name string

    The name of the Virtual Service

  • noMatchingRequestPreference string

    What to do if there are no matching requests. Choose either return404 to return "no match found", or choose bypasslive to redirect to the live system

  • noMatchingRequestTxnId string

    If there are no matching requests, this is the Transaction ID that did not match

  • updatedBy integer

    Name of the last user who updated the template

  • updated date

    When this template was updated

  • thinkTime integer

    Think time is a synthetic delay inserted between test steps to ensure the test script moves at a human pace

  • updated array

    The 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
}