Get a log file of a virtual service

To get a log snapshot of all instances (replicas) of a virtual service either as JSON or as GZIP file, you need to know the 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.

In order to get the latest logs, always call service-mocks/log/refresh first.

Minimum parameters for requesting a log file of a virtual service

The following parameters are the base parameters required to request a log file of a virtual service.

Log file of virtual service request attributes

Attributes

  • serviceMockId integer

    required

    The virtual service identifier

  • workspaceId integer

    required

    The workspace identifier

  • limit integer

    required

    How many log entries to be requested from the virtual services.

Request log file of virtual serviceMinimum configuration sample

'https://mock.blazemeter.com//api/v1/workspaces/{workspaceId}/service-mocks/{serviceMockId}/log?limit=10' \
    -X GET \
    -H 'accept: application/json;charset=UTF-8'

Response200 OK

{}