Glossary
This section covers the various terms that are used throughout the Service Virtualization APIs.
DSL
The dsl is the object that stores properties of Transactions.
There are multiple sources we support and convert to DSL format to use them as request/response transactions:
Supported dsl type keys are:
- SWAGGER2_DSL for Swagger Versions 2
- SWAGGER3_DSL for Swagger Versions 3
- CODESV_DSL for CodeSv
- WIREMOCK_DSL for Wiremock
- HAR_DSL for HTTP Archive format (HAR)
- TAURUS_RECORDING for TaurusRecording format
- RR_PAIR for R/R Pairs
- GENERIC_DSL
For more information, see Adding Transactions.
This appendix shows how to configure a dsl manually. The easiest way to create a valid dsl for an API call is to create a Transaction in the web interface and copy and paste the response.
Example - Create a DSL object
To create a dsl manually, use the following format:
Attributes
-
requestDsl
objectThe request DSL details
Show/Hide Child Attributesmethod
stringrequired
HTTP verb used for the request
Sample Values
POST
GET
PUT
PATCH
DELETE
OPTIONS
TRACE
HEAD
CONNECT
ANY
url
objectURL or regular expression to match
Show/Hide Child Attributeskey
stringSet this key to
url
to match URLsSample Values
url
matcherName
stringrequired
Matcher operation to perform over given value
Sample Values
equals_url
matches_url
Note: For Wiremock andurl
type only,matcherName
additionally supportsany
; in this case, nomatchingValue
is requiredmatchingValue
stringrequired
Value to be matched.
For typeurl
, matchingValue is required and must be a valid URL for equals_url, or a valid regular expression for matches_url.
For Wiremock withurl
type and matcherNameany
, matchingValue is not requiredSample Values
myurl.company.com
headers
arrayList of MatcherDsls that apply to header
Show/Hide Child Attributeskey
stringrequired
HTTP header name to match, value not encoded
Sample Values
header1
matcherName
stringrequired
Matcher operation to perform over given value
Sample Values
contains
matches
equals
equals_insensitive
not_matches
absent
matchingValue
stringrequired
Value to be matched
Sample Values
value1
queryParams
arrayList of MatcherDsls that apply to query parameters
Show/Hide Child Attributeskey
stringrequired
Query line parameter name to match, value not encoded
Sample Values
queryParam1
matcherName
stringrequired
Matcher operation to perform over given value
Sample Values
contains
matches
equals
equals_insensitive
not_matches
absent
matchingValue
stringrequired
Value to be matched
Sample Values
value1
cookies
arrayList of MatcherDsls that apply to cookies
Show/Hide Child Attributeskey
stringrequired
Request cookie name to match, value not encoded
Sample Values
cookie1
matcherName
stringrequired
Matcher operation to perform over given value
Sample Values
contains
matches
equals
equals_insensitive
not_matches
absent
matchingValue
stringrequired
Value to be matched
Sample Values
value1
credentials
objectCredentials to use for basic authentication
Show/Hide Child Attributesusername
stringThe username for your credential
Sample Values
joe user
password
stringThe password for your credential
Sample Values
p455w0rd
body
arrayList of MatcherDsls that apply to body
Show/Hide Child AttributesmatcherName
stringrequired
Matcher operation to perform over given value
Sample Values
contains
equals
equals_insensitive
equals_json
matches_json
equals_xml
matches_xml
equals_binary
not_matches
absent
matchingValue
stringrequired
Value to be matched. Encode this value into base64
Sample Values
JFsnbWVudSddWydpZCdd
-
responseDsl
objectThe response DSL details
Show/Hide Child Attributes-
status
integerStatus response code
Sample Values
1xx
information
2xx
success
3xx
redirection
4xx
server errors
5xx
client errors
See HTTP Status Codes -
statusMessage
stringStatus response message
Sample Values
"HTTP/1.1 200 OK"
See HTTP Status Codes -
proxyUrl
stringURL of proxy server, if required
Sample Values
https://proxy.corp.com
-
headers
arrayResponse header elements
Sample Values
"headers": [ { "name": "Content-Type", "value": "text/plain; charset=UTF-8" }
Show/Hide Child Attributes-
name
stringThe header name
Sample Values
Content-Type
-
value
stringThe header value
Sample Values
text/plain; charset=UTF-8
-
-
binary
booleanWhether the response is in binary format
Sample Values
false
true
-
contentType
booleanContent-type of the response body. See IANA.org
Sample Values
application/json
text/plain
text/xml
, ... -
content
stringThe response body content to return. Encode this value into base64
Sample Values
SGVsbG8gd29ybGQhCg==
-
charset
stringThe encoding used in response
Sample Values
UTF-8
-
Create a dsl objectMinimum Configuration Sample
{
"priority": 0,
"requestDsl": {
"method": "POST",
"url": {
"key": "url",
"matcherName": "equals_url",
"matchingValue": "http://www.example.com"
},
"headers": [
{
"key": "header1",
"matcherName": "contains",
"matchingValue": "value1"
},
{
"key": "header2",
"matcherName": "matches",
"matchingValue": "value2"
},
{
"key": "header3",
"matcherName": "equals",
"matchingValue": "value3"
},
{
"key": "header4",
"matcherName": "not_matches",
"matchingValue": "value4"
},
{
"key": "header5",
"matcherName": "equals_insensitive",
"matchingValue": "value5"
},
{
"key": "header6",
"matcherName": "absent",
"matchingValue": "header6"
}
],
"queryParams": [
{
"key": "q1",
"matcherName": "contains",
"matchingValue": "q_value1"
},
{
"key": "q2",
"matcherName": "matches",
"matchingValue": "q_value2"
},
{
"key": "q3",
"matcherName": "equals",
"matchingValue": "q_value3"
},
{
"key": "q4",
"matcherName": "not_matches",
"matchingValue": "q_value4"
},
{
"key": "q5",
"matcherName": "equals_insensitive",
"matchingValue": "q_value5"
},
{
"key": "q6",
"matcherName": "absent",
"matchingValue": "q6"
}
],
"cookies": [
{
"key": "cookie1",
"matcherName": "contains",
"matchingValue": "c_value1"
},
{
"key": "cookie2",
"matcherName": "matches",
"matchingValue": "c_value2"
},
{
"key": "cookie3",
"matcherName": "equals",
"matchingValue": "c_value3"
},
{
"key": "cookie4",
"matcherName": "not_matches",
"matchingValue": "c_value4"
},
{
"key": "cookie5",
"matcherName": "equals_insensitive",
"matchingValue": "c_value5"
},
{
"key": "cookie6",
"matcherName": "absent",
"matchingValue": "cookie6"
}
],
"credentials": {
"username": "joe user",
"password": "p455w0rd"
},
"body": [
{
"matcherName": "matches_json",
"matchingValue": "JFsnbWVudSddWydpZCdd"
}
]
},
"responseDsl": {
"status": 200,
"statusMessage": "HTTP/1.1 200 OK",
"headers": [
{
"name": "Content-Type",
"value": "text/plain; charset=UTF-8"
}
],
"binary": false,
"content": "ZXhhbXBsZSBwb3N0IHJlc3BvbnNl",
"charset": "UTF-8"
}
}
Bridge ID
This identifier was used in MAR-based Mock Services (EOL) only.
Harbor ID
This identifier was used in MAR-based Mock Services (EOL) only. It defines 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.
Location ID
This is the unique identifier for a cloud location or a private location. It is used in the following APIs:
It is found in the response of the following APIs:
- Get Location of a Workspace
- Get Virtual Service User Details
For another method for finding this value, see Get the Location Name.
Log ID
This is the unique identifier of a log. It is used in the following APIs:
It is found in the response of the following APIs:
Virtual Service ID
- Configure or Reconfigure Virtual Services
- Delete Virtual Services
- Deploy Virtual Services
- Get a Log File of a Virtual Service
- Take a Log Snapshot of a Virtual Service
- Update the Log Snapshot of a Virtual Service
- Get Virtual Service
- Stop a Virtual Service
- Delete Virtual Service Template
- Update Virtual Service Properties
- Update a Virtual Service
It is found in the response of the following APIs:
Virtual Service Template ID
This is the unique identifier of a Template. It is used in the following APIs:
- Delete Virtual Service Template
- Update Virtual Service Template Properties
- Update Virtual Service Template
- Apply Virtual Service Template to Virtual Service
It is found in the response of the following APIs:
Registry ID
This identifier was used in MAR-based Mock Services (EOL) only.
Request ID
This is the unique Virtual Service Request identifier for a given Virtual Service in a given Workspace.
It is found in the response of the following API call in the result id: {“result” : [ { “id” : 7777, ...} ] }
:
It is used in the following APIs:
Service ID
This is the unique identifier of a Service. It is used in the following APIs:
- Get Service by ID
- Get All Virtual Services
- Update a Service
- Create Virtual Service Template
- Get All Virtual Service Templates
- Create Transaction From Sources
- Create Transaction
- Get All Transactions
It is found in the response of the following APIs:
Ship ID
This identifier was used in MAR-based Mock Services (EOL) only. It defines a 'ship', an agent in a logical container on the BlazeMeter end in your private on-premise location (aka 'harbor').
Tag ID
This is the unique identifier of a tag. It is used in the following APIs:
It is found in the response of the following APIs:
Transaction ID
This is the unique identifier of a Transaction. It is used in the following APIs:
It is found in the response of the following APIs:
- Create Transaction From Sources
- Create Transaction
- Get All Transactions
- Get All Conflicting Transactions
VSE ID (deprecated)
This identifier was used in MAR-based Mock Services (EOL) only.
Workspace ID
This is the unique identifier that identifies a Workspace. It is used in the following APIs:
- Configure and Deploy Virtual Services
- Configure or Reconfigure Virtual Services
- Create Virtual Services
- Delete Virtual Services
- Deploy Virtual Services
- Get All Virtual Services
- Get Workspace Location
- Get a Log File of a Virtual Service
- Take a Log Snapshot of a Virtual Service
- Update the Log Snapshot of a Virtual Service
- Get Virtual Service
- Create a Service
- Get All Services
- Get Service by ID
- Update a Service
- Stop a Virtual Service
- Create Virtual Service Template
- Get All Virtual Service Templates
- Get Virtual Service Template
- Update Virtual Service Template Properties
- Update Virtual Service Template
- Perform Bulk Operation Over Transactions
- Create Transaction From Sources
- Create Transaction
- Delete Transaction
- Get All Transactions
- Get All Conflicting Transactions
- Get Transaction
- Update Transaction
- Update Virtual Service Properties
- Update a Virtual Service
- Verify Taurus Configuration Dependencies
It is found in the response of the following APIs:
For another method for finding this value, see Get Your Workspace ID.
Project ID
This is the unique identifier that identifies a given project.