🔌 Base endpoint: /mockoon-admin/logs
This endpoint allows you to fetch and purge the application's transaction logs (both incoming route requests and outgoing callback calls) when using the desktop application, the CLI or the serverless library.
To retrieve the transaction logs, call the following endpoint:
GET/mockoon-admin/logspage (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[ { "type": "route", "request": { "method": "get", "urlPath": "/users/5", "route": "/users/:id", "params": [ { "name": "id", "value": "5" } ], "query": "", "queryParams": {}, "body": "", "headers": [ { "key": "host", "value": "localhost:3000" }, { "key": "Authorization", "value": "Bearer [REDACTED]" } ] }, "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 } ]
💡 Callback logs share the same payload structure with "type": "callback" (type is 'route' | 'callback', and may be omitted for route transactions). For callback entries, request.urlPath holds the full callback URL, request.route is null (with empty routeUUID / routeResponseUUID), and failed callbacks have response.statusCode set to 0.
💡 Transaction logs returned by this endpoint and the SSE event stream have known-sensitive headers redacted (authorization, proxy-authorization, cookie, set-cookie, x-api-key, api-key, x-auth-token). For authorization / proxy-authorization, the auth scheme is preserved (e.g. Bearer [REDACTED]). Request and response bodies are not modified.
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.