From 42b40636991b97fe818007fab19091764fc5db73 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 15 Jul 2022 15:30:14 +0200 Subject: Add ability for client to create server logs --- support/doc/api/openapi.yaml | 88 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 8 deletions(-) (limited to 'support') diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 93c545e36..9745f68e9 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml @@ -330,26 +330,21 @@ x-tagGroups: - name: Search tags: - Search - - name: Custom pages - tags: - - Homepage - name: Moderation tags: - Abuses - Video Blocks - Account Blocks - Server Blocks - - name: Instance Configuration + - name: Instance tags: - Config + - Homepage - Instance Follows - Instance Redundancy - Plugins - - name: Stats - tags: - Stats - - name: Jobs - tags: + - Logs - Job paths: '/accounts/{name}': @@ -4316,6 +4311,58 @@ paths: schema: $ref: '#/components/schemas/ServerStats' + /server/logs/client: + post: + tags: + - Logs + summary: Send client log + operationId: sendClientLog + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SendClientLog' + responses: + '204': + description: successful operation + + /server/logs: + get: + tags: + - Logs + summary: Get instance logs + operationId: getInstanceLogs + security: + - OAuth2: + - admin + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: array + items: + type: string + + /server/audit-logs: + get: + tags: + - Logs + summary: Get instance audit logs + operationId: getInstanceAuditLogs + security: + - OAuth2: + - admin + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: array + items: + type: string '/feeds/video-comments.{format}': get: @@ -6526,6 +6573,31 @@ components: enabled: type: boolean + SendClientLog: + properties: + message: + type: string + url: + type: string + description: URL of the current user page + level: + enum: + - error + - warn + stackTrace: + type: string + description: Stack trace of the error if there is one + userAgent: + type: string + description: User agent of the web browser that sends the message + meta: + type: string + description: Additional information regarding this log + required: + - message + - url + - level + ServerStats: properties: totalUsers: -- cgit v1.2.3