-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapilogs-openapi3-v1.yaml
More file actions
260 lines (259 loc) · 6.87 KB
/
apilogs-openapi3-v1.yaml
File metadata and controls
260 lines (259 loc) · 6.87 KB
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
openapi: 3.0.0
info:
description: API for monitoring Legalesign API
version: "1.0.0"
title: Legalesign API monitoring
contact:
email: support@legalesign.com
name: API support
url: https://legalesign.com/contact/
tags:
- name: webhooks
description: Webhook logs
- name: metrics
description: Counts of events
- name: events
description: Requests for a given time period
- name: Requests
description: Details of a request
servers:
- url: 'https://api-logs.legalesign.com/v1'
security:
- OAuth2: []
paths:
/webhooks/:
get:
tags:
- webhooks
summary: Show up to last 100 webhook events
operationId: getWebhooks
responses:
'200':
description: 'successful operation, list of webhooks events'
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookLogListResponse'
'500':
description: 'error in request'
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: error message
'401':
description: 'not authorized'
/metrics/:
get:
tags:
- metrics
summary: Show counts of requests in time slots
operationId: getMetrics
parameters:
- name: starttime
in: query
description: >-
ISO format datestring. Logs are retained for now more than 2 weeks.
required: true
schema:
type: string
- name: endtime
in: query
description: >-
ISO format datestring.
required: true
schema:
type: string
- name: name
in: query
description: >-
Type of metric to return.
required: false
schema:
type: string
enum: [Count]
- name: status
in: query
description: >-
Filter by status codes.
required: false
schema:
type: string
enum: [XXX, 4XX, 5XX]
responses:
'200':
description: 'succesful, return list of event counts over a time period'
content:
application/json:
schema:
$ref: '#/components/schemas/MetricListResponse'
'401':
description: 'not authorized'
/events/:
get:
tags:
- events
summary: Get list of API requests and status codes over a time period
operationId: getEvents
parameters:
- name: starttime
in: query
description: >-
ISO format datestring. Logs are retained for now more than 2 weeks.
required: true
schema:
type: string
- name: endtime
in: query
description: >-
ISO format datestring.
required: true
schema:
type: string
responses:
'200':
description: 'succesful, return list of requests'
content:
application/json:
schema:
$ref: '#/components/schemas/EventListResponse'
'401':
description: 'not authorized'
/requests/:
get:
tags:
- requests
summary: Get details of an individual request
operationId: getRequest
parameters:
- name: logstream
in: query
description: get this from the call to events
required: true
schema:
type: string
- name: requestid
in: query
description: get this from the call to events
required: true
schema:
type: string
format: uuid
responses:
'200':
description: 'succesful, return list of requests'
content:
application/json:
schema:
$ref: '#/components/schemas/RequestListResponse'
'401':
description: 'not authorized'
components:
securitySchemes:
OAuth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://a.legalesign.com/oauth2/authorize
tokenUrl: https://a.legalesign.com/oauth2/token
scopes: {}
schemas:
MetricListResponse:
type: object
properties:
objects:
type: array
items:
$ref: '#/components/schemas/MetricResponse'
RequestListResponse:
type: object
properties:
objects:
type: array
items:
$ref: '#/components/schemas/RequestResponse'
EventListResponse:
type: object
properties:
objects:
type: array
items:
$ref: '#/components/schemas/EventResponse'
MetricResponse:
type: object
properties:
Timestamp:
type: string
description: ISO formatted datestring
Average:
type: integer
Sum:
type: integer
Unit:
type: string
enum: ['Count']
WebhookLogListResponse:
type: object
properties:
objects:
type: array
items:
$ref: '#/components/schemas/WebhookLogResponse'
WebhookLogResponse:
type: object
properties:
callback_type:
type: string
enum: ['all', 'signed', 'rejected']
event_id:
type: string
message:
type: string
status_code:
type: string
description: Status code we received
timestamp:
type: integer
format: int64
description: Timestamp since epoch in milliseconds
url:
type: string
description: Your webhook url
EventResponse:
type: object
properties:
RequestId:
type: string
description: Use this and LogStream for the request details call
Timestamp:
type: integer
description: Milliseconds since the epoch
LogStream:
type: string
description: Use this and RequestId for the request details call
Status:
type: string
description: Status code of request
Latency:
type: string
description: Latency of request, not in use currently.
RequestResponse:
type: object
properties:
logStreamName:
type: string
timestamp:
type: integer
description: Milliseconds since the epoch
message:
type: string
description: A log message for the request
integestionTime:
type: integer
description: Milliseconds since the epoch
eventId:
type: integer
description: A uniqueId for request