Apply template to virtual service
To apply an existing template to a virtual service, you need to know your workspace identifier and the virtual service template identifier. The sample code uses a serviceMockId of 1234, a serviceMockTemplateId of 8, and a workspaceId of 123456. Use the actual ID values of your workspace and virtual service template.
Minimum parameters for applying a virtual service template
The following parameters are the base parameters required to update virtual service templates.
Apply virtual service templatesMinimum configuration sample
curl 'https://mock.blazemeter.com/api/v1/workspaces/123456/service-mocks/1234/apply-template/8' \
-X PATCH \
-H "accept: application/json"
Apply virtual service template request attributes
Attributes
-
workspaceIdintegerrequired
The identifier of the workspace
-
serviceMockIdintegerrequired
The identifier of the virtual service
-
templateIdintegerrequired
The identifier of the template
Response200 OK
{
"apiVersion": 0,
"error": "string",
"errors": [
{
"code": "string",
"message": "string",
"severity": "ERROR"
}
],
"limit": 0,
"link": "string",
"requestId": "string",
"result": {
"created": "2021-10-08T08:46:49.163Z",
"createdBy": "string",
"data": {
"dataType": "CONFIGURATION"
},
"ended": "2021-10-08T08:46:49.163Z",
"errors": [
"string"
],
"status": "FINISHED",
"trackingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"trackingUrl": "string",
"updated": "2021-10-08T08:46:49.163Z",
"updatedBy": "string",
"warnings": [
"string"
]
},
"skip": 0,
"total": 0
}