Get All Virtual Services
To get all Virtual Services, you need to know your Workspace identifier and the Service identifier. The sample code uses a serviceId of 123 and a workspaceId of 123456. Use the actual ID values of your Workspace and Service.
You can filter by workspaceId and serviceId.
Minimum Parameters for getting all Virtual Services
The following parameters are the base parameters required to get all Virtual Services.
Get All Virtual ServicesMinimum Configuration Sample
curl 'https://mock.blazemeter.com/api/v1/workspaces/26208/service-mocks?serviceId=123' \
-X GET \
-H 'accept: application/json;charset=UTF-8' \
-H 'authorization: Basic Aa1Bb2Cc3Dd4Ee5Ff6Gg7Hh8Ii9Jj0Aa1Bb2Cc3Dd4Ee5Ff6'
Get All Virtual Services Request Attributes
Attributes
-
limitintegerNumber of results per page
-
namestringThe Service name to filter by
-
skipintegerNumber of initial results to skip
-
sortstringThe column name to sort by:
id,name, ordescription -
workspaceIdintegerrequired
The Workspace identifier
Response200 OK
{
"apiVersion": 1,
"error": null,
"result": [
{
"id": 1619,
"name": "Some Service",
"description": null,
"created": 1563893805,
"updated": 1563893805,
"createdBy": "someone@example.com",
"updatedBy": "someone@example.com"
},
{
"id": 1618,
"name": "Some other Service",
"description": "A service that serves as an example",
"created": 1563893804,
"updated": 1563893804,
"createdBy": "someone@example.com",
"updatedBy": "someone@example.com"
}
],
"requestId": null,
"limit": 5,
"skip": 0,
"total": 2
}