-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
619 lines (619 loc) · 17.9 KB
/
openapi.yaml
File metadata and controls
619 lines (619 loc) · 17.9 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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
openapi: 3.1.0
info:
title: Logister Public Ingestion API
version: 2.3.0
summary: Send application telemetry and scheduled-work check-ins to Logister.
description: |
Logister's public API accepts project-scoped telemetry over HTTP. Use the
first-party SDKs when they fit your runtime, or use this contract to build
a custom client, script, worker integration, or direct HTTP reporter.
contact:
name: Logister
url: https://docs.logister.org/
license:
name: MIT
url: https://github.com/taimoorq/logister/blob/main/LICENSE
servers:
- url: https://logister.org
description: Hosted Logister app
- url: https://your-logister-host.example
description: Self-hosted Logister instance
tags:
- name: Ingest events
description: Send errors, logs, metrics, transactions, spans, and check-ins.
- name: Check-ins
description: Send compact monitor heartbeats for scheduled work.
security:
- bearerAuth: []
- apiKeyHeader: []
paths:
/api/v1/ingest_events:
post:
operationId: createIngestEvent
tags:
- Ingest events
summary: Ingest one telemetry event or trace span.
description: |
Accepts an `event` envelope. Use this endpoint for errors, logs,
custom metrics, transactions, spans, and check-ins when you want the
full event shape. Uppercase `EVENT` envelopes are also accepted for
runtimes that serialize keys that way.
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/EventEnvelope"
- $ref: "#/components/schemas/UppercaseEventEnvelope"
examples:
error:
summary: Error event
value:
event:
event_type: error
level: error
message: NoMethodError in CheckoutService
fingerprint: checkout-nomethoderror
occurred_at: "2026-05-23T15:30:00Z"
context:
environment: production
release: "2026.05.23"
service: checkout-api
request_id: req_123
trace_id: trace_123
exception:
class: NoMethodError
message: undefined method `total`
metric:
summary: Custom metric with numeric value
value:
event:
event_type: metric
message: queue.depth
level: info
context:
environment: production
value: 42
unit: jobs
queue: billing
dbQuery:
summary: Database query timing metric
value:
event:
event_type: metric
message: db.query
level: info
context:
environment: production
duration_ms: 38.7
name: OrdersController#index
transaction:
summary: Transaction timing
value:
event:
event_type: transaction
message: POST /checkout
transaction_name: POST /checkout
duration_ms: 245.7
context:
environment: production
release: "2026.05.23"
status: 200
route: POST /checkout
span:
summary: Root trace span
value:
event:
event_type: span
name: GET /checkout
kind: server
trace_id: trace_123
span_id: span_root
duration_ms: 245.7
started_at: "2026-05-23T15:30:00Z"
context:
environment: production
route: GET /checkout
service: checkout-api
checkIn:
summary: Check-in through the full ingest endpoint
value:
event:
event_type: check_in
message: nightly-reconcile
check_in_slug: nightly-reconcile
check_in_status: ok
expected_interval_seconds: 900
context:
environment: production
release: "2026.05.23"
responses:
"201":
description: Event or span accepted.
headers:
X-RateLimit-Limit:
$ref: "#/components/headers/XRateLimitLimit"
X-RateLimit-Remaining:
$ref: "#/components/headers/XRateLimitRemaining"
X-RateLimit-Reset:
$ref: "#/components/headers/XRateLimitReset"
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/AcceptedEventResponse"
- $ref: "#/components/schemas/AcceptedSpanResponse"
examples:
event:
value:
id: 018fe6a8-d40e-7c50-a283-e989feadbeef
legacy_id: 123
status: accepted
span:
value:
id: 018fe6a8-d40e-7c50-a283-e989feadbeef
legacy_id: 456
status: accepted
type: span
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"422":
$ref: "#/components/responses/UnprocessableContent"
"429":
$ref: "#/components/responses/TooManyRequests"
/api/v1/check_ins:
post:
operationId: createCheckIn
tags:
- Check-ins
summary: Ingest one scheduled-work check-in.
description: |
Accepts a compact `check_in` envelope for cron jobs, scheduled tasks,
workers, and heartbeat-style monitors. Uppercase `CHECK_IN` envelopes
are also accepted.
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/CheckInEnvelope"
- $ref: "#/components/schemas/UppercaseCheckInEnvelope"
examples:
ok:
summary: Successful scheduled job
value:
check_in:
slug: nightly-reconcile
status: ok
expected_interval_seconds: 900
duration_ms: 1820.5
environment: production
release: "2026.05.23"
error:
summary: Failed scheduled job
value:
check_in:
slug: nightly-reconcile
status: error
expected_interval_seconds: 900
environment: production
request_id: job_123
responses:
"201":
description: Check-in accepted.
headers:
X-RateLimit-Limit:
$ref: "#/components/headers/XRateLimitLimit"
X-RateLimit-Remaining:
$ref: "#/components/headers/XRateLimitRemaining"
X-RateLimit-Reset:
$ref: "#/components/headers/XRateLimitReset"
content:
application/json:
schema:
$ref: "#/components/schemas/AcceptedCheckInResponse"
examples:
accepted:
value:
id: 018fe6a8-d40e-7c50-a283-e989feadbeef
status: accepted
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"422":
$ref: "#/components/responses/UnprocessableContent"
"429":
$ref: "#/components/responses/TooManyRequests"
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: Project API token
description: "Send `Authorization: Bearer <project-api-token>`."
apiKeyHeader:
type: apiKey
in: header
name: X-Api-Key
description: Alternative project API token header.
headers:
RetryAfter:
description: Seconds to wait before retrying after a rate limit.
schema:
type: integer
minimum: 1
XRateLimitLimit:
description: Request limit for the current fixed window.
schema:
type: integer
XRateLimitRemaining:
description: Requests remaining in the current fixed window.
schema:
type: integer
minimum: 0
XRateLimitReset:
description: Unix timestamp when the current fixed window resets.
schema:
type: integer
responses:
BadRequest:
description: Required envelope was missing or unusable.
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
missingEnvelope:
value:
error: "param is missing or the value is empty: event"
Unauthorized:
description: API key was missing, invalid, revoked, inactive, or belongs to an archived project.
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
unauthorized:
value:
error: Unauthorized
UnprocessableContent:
description: Envelope was present, but validation failed.
content:
application/json:
schema:
$ref: "#/components/schemas/ValidationErrorResponse"
examples:
invalid:
value:
errors:
- Message can't be blank
TooManyRequests:
description: The API token or authentication-failure source exceeded the public API rate limit.
headers:
Retry-After:
$ref: "#/components/headers/RetryAfter"
X-RateLimit-Limit:
$ref: "#/components/headers/XRateLimitLimit"
X-RateLimit-Remaining:
$ref: "#/components/headers/XRateLimitRemaining"
X-RateLimit-Reset:
$ref: "#/components/headers/XRateLimitReset"
content:
application/json:
schema:
$ref: "#/components/schemas/RateLimitResponse"
examples:
rateLimited:
value:
error: Rate limit exceeded
limit: 1200
window_seconds: 60
retry_after: 42
schemas:
EventEnvelope:
type: object
required:
- event
properties:
event:
$ref: "#/components/schemas/IngestEvent"
additionalProperties: false
UppercaseEventEnvelope:
type: object
required:
- EVENT
properties:
EVENT:
$ref: "#/components/schemas/IngestEvent"
additionalProperties: false
IngestEvent:
type: object
required:
- event_type
properties:
event_type:
type: string
enum:
- error
- log
- metric
- transaction
- span
- check_in
description: Controls where the event appears in Logister.
level:
type: string
examples:
- info
- warn
- error
- fatal
message:
type: string
description: Primary event label. Required for non-span events.
name:
type: string
description: Span label when `event_type` is `span`.
fingerprint:
type: string
description: Stable grouping key for repeated errors or recurring operational signals.
occurred_at:
type: string
format: date-time
description: Event time. Defaults to receive time when omitted.
environment:
type: string
release:
type: string
trace_id:
type: string
traceId:
type: string
request_id:
type: string
requestId:
type: string
session_id:
type: string
sessionId:
type: string
user_id:
oneOf:
- type: string
- type: integer
userId:
oneOf:
- type: string
- type: integer
transaction_name:
type: string
transactionName:
type: string
duration_ms:
type: number
minimum: 0
durationMs:
type: number
minimum: 0
expected_interval_seconds:
type: integer
minimum: 1
check_in_slug:
type: string
monitor_slug:
type: string
check_in_status:
type: string
status:
oneOf:
- type: string
- type: integer
span_id:
type: string
spanId:
type: string
parent_span_id:
type: string
parentSpanId:
type: string
kind:
$ref: "#/components/schemas/SpanKind"
span_kind:
$ref: "#/components/schemas/SpanKind"
started_at:
type: string
format: date-time
startedAt:
type: string
format: date-time
ended_at:
type: string
format: date-time
endedAt:
type: string
format: date-time
context:
$ref: "#/components/schemas/EventContext"
additionalProperties: true
EventContext:
type: object
description: Structured event metadata used for details, filtering, correlation, metrics, and analytics.
properties:
environment:
type: string
release:
type: string
service:
type: string
trace_id:
type: string
request_id:
type: string
session_id:
type: string
user_id:
oneOf:
- type: string
- type: integer
transaction_name:
type: string
duration_ms:
type: number
minimum: 0
value:
type: number
description: Numeric custom metric value used by `metric_value:<name>` Insights series.
unit:
type: string
tags:
type: object
additionalProperties:
type: string
exception:
type: object
additionalProperties: true
exception_class:
type: string
request:
type: object
additionalProperties: true
check_in_slug:
type: string
check_in_status:
type: string
expected_interval_seconds:
type: integer
minimum: 1
additionalProperties: true
SpanKind:
type: string
enum:
- app
- browser
- cache
- db
- http
- internal
- queue
- render
- resource
- server
CheckInEnvelope:
type: object
required:
- check_in
properties:
check_in:
$ref: "#/components/schemas/CheckIn"
additionalProperties: false
UppercaseCheckInEnvelope:
type: object
required:
- CHECK_IN
properties:
CHECK_IN:
$ref: "#/components/schemas/CheckIn"
additionalProperties: false
CheckIn:
type: object
required:
- slug
properties:
slug:
type: string
description: Monitor slug, such as `nightly-reconcile`.
status:
type: string
default: ok
description: "`ok` keeps the monitor healthy; `error` marks the latest run failed."
occurred_at:
type: string
format: date-time
environment:
type: string
release:
type: string
expected_interval_seconds:
type: integer
minimum: 1
default: 300
duration_ms:
type: number
minimum: 0
trace_id:
type: string
request_id:
type: string
additionalProperties: true
AcceptedEventResponse:
type: object
required:
- id
- status
properties:
id:
type: string
format: uuid
legacy_id:
type: integer
status:
type: string
const: accepted
AcceptedSpanResponse:
allOf:
- $ref: "#/components/schemas/AcceptedEventResponse"
- type: object
properties:
type:
type: string
const: span
AcceptedCheckInResponse:
type: object
required:
- id
- status
properties:
id:
type: string
format: uuid
status:
type: string
const: accepted
ErrorResponse:
type: object
required:
- error
properties:
error:
type: string
ValidationErrorResponse:
type: object
required:
- errors
properties:
errors:
type: array
items:
type: string
RateLimitResponse:
type: object
required:
- error
- limit
- window_seconds
- retry_after
properties:
error:
type: string
const: Rate limit exceeded
limit:
type: integer
window_seconds:
type: integer
retry_after:
type: integer