generated from FIS2425/template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
158 lines (154 loc) · 4.88 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
openapi: 3.0.0
info:
title: Microservicio Logger
version: 1.0.0
description: Logger for medical consultation application. Saves and handles all the logs from the different microservices
servers:
- url: /api/v1
paths:
/logs:
get:
summary: Fetch list of log entries
description: Retrieves a list of logs stored in the S3 bucket, ordered by timestamp in descending order. Requires admin authentication.
tags:
- Logs
security:
- cookieAuth: []
responses:
'200':
description: A list of logs
content:
application/json:
schema:
type: object
properties:
logs:
type: array
items:
type: object
properties:
requestId:
type: string
description: Unique identifier for the request log.
timestamp:
type: string
format: date-time
description: The timestamp when the log was created.
'401':
description: Unauthorized - No token provided
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Error message indicating access was denied due to missing token.
'403':
description: Forbidden - Insufficient permissions
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Error message indicating insufficient permissions.
'500':
description: Internal server error
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Error message describing the issue.
/logs/{requestId}:
get:
summary: Fetch logs for a specific request
description: Retrieves the logs for a specific request ID stored in the S3 bucket. Requires admin authentication.
tags:
- Logs
security:
- cookieAuth: []
parameters:
- name: requestId
in: path
required: true
description: The unique identifier of the request log to retrieve.
schema:
type: string
responses:
'200':
description: Logs for the specified request ID
content:
application/json:
schema:
type: object
properties:
requestId:
type: string
description: The unique identifier of the request.
logs:
type: object
additionalProperties:
type: string
description: Log details for the request.
'401':
description: Unauthorized - No token provided
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Error message indicating access was denied due to missing token.
'403':
description: Forbidden - Insufficient permissions
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Error message indicating insufficient permissions.
'404':
description: Logs not found for the specified request ID
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Error message indicating the logs were not found.
'500':
description: Internal server error
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Error message describing the issue.
components:
securitySchemes:
cookieAuth:
type: apiKey
in: cookie
name: token
schemas:
LogEntry:
type: object
properties:
requestId:
type: string
description: Unique identifier for the request log.
timestamp:
type: string
format: date-time
description: The timestamp when the log was created.