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 integer

    required

    The Virtual Service identifier

  • workspaceId integer

    required

    The Workspace identifier

  • description string

    The description of the Virtual Service

  • endpointPreference string

    required

    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

  • serviceId integer

    The identifier of the Service

  • shipId string

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

    The name of the Virtual Service

  • status string

    You can set the status of a Virtual Service to one of the following: STOPPED, RUNNING, CONFIGURING, FAILED (Service Mock initialization failed)

  • virtualServiceTransactions array

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