From 3803a1ac23b16fa3134816921237b766bf46b5c6 Mon Sep 17 00:00:00 2001 From: wangsijie Date: Sat, 2 Dec 2023 16:49:11 +0900 Subject: [PATCH] chore(core): add dashboard api doc descriptions (#5037) * chore(core): add dashboard api doc descriptions * chore(core): polish docs --------- Co-authored-by: Gao Sun --- .../core/src/routes/dashboard.openapi.json | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 packages/core/src/routes/dashboard.openapi.json diff --git a/packages/core/src/routes/dashboard.openapi.json b/packages/core/src/routes/dashboard.openapi.json new file mode 100644 index 000000000..c029c5857 --- /dev/null +++ b/packages/core/src/routes/dashboard.openapi.json @@ -0,0 +1,52 @@ +{ + "tags": [ + { + "name": "Dashboard", + "description": "The APIs that power the dashboard page of Console to show the statistics of the current tenant." + } + ], + "paths": { + "/api/dashboard/users/total": { + "get": { + "summary": "Get total user count", + "description": "Get total user count in the current tenant.", + "parameters": [], + "responses": { + "200": { + "description": "Total user count." + } + } + } + }, + "/api/dashboard/users/new": { + "get": { + "summary": "Get new user count", + "description": "Get new user count in the past 7 days.", + "parameters": [], + "responses": { + "200": { + "description": "New user count." + } + } + } + }, + "/api/dashboard/users/active": { + "get": { + "summary": "Get active user data", + "description": "Get active user data, including daily active user (DAU), weekly active user (WAU) and monthly active user (MAU). It also includes an array of DAU in the past 30 days.", + "parameters": [ + { + "in": "query", + "name": "date", + "description": "The date to get active user data." + } + ], + "responses": { + "200": { + "description": "Active user data object." + } + } + } + } + } +}