🔌 Base endpoint: /mockoon-admin/logs
This endpoint allows you to fetch and purge the application's transaction logs when using the desktop application, the CLI or the serverless library.
To retrieve the transaction logs, call the following endpoint:
GET
/mockoon-admin/logs
page
(optional): the page number to retrieve. Default is 1.limit
(optional): the number of logs to retrieve per page. Default is 10.Example request:
CopyGET /mockoon-admin/logs GET /mockoon-admin/logs?page=2 GET /mockoon-admin/logs?page=2&limit=20
Example response (data model):
Copy[ { "request": { "method": "get", "urlPath": "/users/5", "route": "/users/:id", "params": [ { "name": "id", "value": "5" } ], "query": "", "queryParams": {}, "body": "", "headers": [{ "key": "host", "value": "localhost:3000" }] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": [{ "key": "content-type", "value": "application/json; charset=utf-8" }], "body": "ok" }, "routeResponseUUID": "c0a61351-c542-4d80-902d-4305047aff17", "routeUUID": "7e950e12-dc21-425a-930c-e84a381281ee", "proxied": false, "timestampMs": 1714399178682 } ]
To purge the transaction logs, call one of the following endpoints:
POST /mockoon-admin/logs/purge
.PURGE /mockoon-admin/logs
.⚠️ This action will only purge the transaction logs stored in the memory of the running mock server. It will not update the Logs view in the desktop application.