Refresh the Logs of a Virtual Service
Before you can get a log of a Virtual Service in the asset catalog, you must refresh the log. 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.
The log refresh call returns an asynchronous tracking object. After the tracking object reports that the logs of all instances (replicas) of a Virtual Service have been refreshed, use get log file endpoint to get the most recent version of the log files of the Virtual Service.
The request returns the logId.
Minimum Parameters for Refreshing the Log of a Virtual Service
The following parameters are the base parameters required to refresh the Log of a Virtual Service.
Refresh Log of Virtual ServiceMinimum Configuration Sample
curl ‘https://mock.blazemeter.com/api/v1/workspaces/1050952/service-mocks/174867/log/refresh?limit=10’ \
-X POST \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '0'
Virtual Service Logs Request Attributes
Attributes
-
serviceMockIdintegerrequired
The Virtual Service identifier
-
workspaceIdintegerrequired
The Workspace identifier
-
limitintegerThe Number of log entries to be requested
Response200 OK
{
"apiVersion": 0,
"error": "string",
"limit": 0,
"link": "string",
"requestId": "string",
"result": {
"log": "string",
"logId": 0,
"serviceMockId": 1234,
"trackingId": "string"
},
"skip": 0,
"total": 0
}