From 88e8aa944ab0929d24f9f31020001067247b72f4 Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Sun, 3 Dec 2023 00:09:30 +0800 Subject: [PATCH] chore(core): add logs api doc descriptions (#5034) * chore(core): add logs api doc descriptions * chore: polish docs --------- Co-authored-by: Gao Sun --- packages/core/src/routes/log.openapi.json | 52 +++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 packages/core/src/routes/log.openapi.json diff --git a/packages/core/src/routes/log.openapi.json b/packages/core/src/routes/log.openapi.json new file mode 100644 index 000000000..5c5fb9a00 --- /dev/null +++ b/packages/core/src/routes/log.openapi.json @@ -0,0 +1,52 @@ +{ + "tags": [ + { + "name": "Logs", + "description": "Logs (audit logs) are used to track end-user activities in Logto sign-in experience and other flows. It does not include activities in Logto Console." + } + ], + "paths": { + "/api/logs": { + "get": { + "summary": "Get logs", + "description": "Get logs that match the given query with pagination.", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "Filter logs by user ID." + }, + { + "name": "applicationId", + "in": "query", + "description": "Filter logs by application ID." + }, + { + "name": "logKey", + "in": "query", + "description": "Filter logs by log key." + } + ], + "responses": { + "200": { + "description": "An array of logs that match the given query." + } + } + } + }, + "/api/logs/{id}": { + "get": { + "summary": "Get log", + "description": "Get log details by ID.", + "responses": { + "200": { + "description": "Log details." + }, + "404": { + "description": "Log not found." + } + } + } + } + } +}