-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrbit-api.yaml
More file actions
139 lines (132 loc) · 3.75 KB
/
Copy patherrbit-api.yaml
File metadata and controls
139 lines (132 loc) · 3.75 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
openapi: 3.1.0
info:
title: Errbit Error Ingestion API
description: >
A minimal API for reporting application exceptions to an Errbit server.
This is a new API design, not compatible with the Airbrake or Sentry
APIs. v1 covers error ingestion only.
version: "1.0.0"
servers:
- url: https://errbit.example.com
description: Example Errbit server
paths:
/api/v1/projects/{project_id}/errors/{api_key}:
post:
operationId: createError
summary: Report an exception
description: >
Submits a single exception occurrence for a project. Authenticates
the request via the project's API key embedded in the URL path.
parameters:
- $ref: '#/components/parameters/ProjectId'
- $ref: '#/components/parameters/ApiKey'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorReport'
responses:
'202':
description: Error report accepted.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorAck'
'400':
description: Malformed request body.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Invalid project_id/api_key combination.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Unknown project_id.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
parameters:
ProjectId:
name: project_id
in: path
required: true
description: Identifier of the project the error belongs to.
schema:
type: string
ApiKey:
name: api_key
in: path
required: true
description: Secret API key authorizing writes to this project.
schema:
type: string
schemas:
BacktraceFrame:
type: object
properties:
file:
type: string
description: Source file path for this stack frame.
line:
type: integer
description: Line number within the file, if known.
method:
type: string
description: Method or block name the frame was executing in.
additionalProperties: false
ErrorReport:
type: object
required:
- error
properties:
error:
type: object
required:
- class
- message
properties:
class:
type: string
description: Fully qualified exception class name.
examples:
- RuntimeError
- "Net::OpenTimeout"
message:
type: string
description: Exception message.
backtrace:
type: array
description: Ordered stack frames, innermost first.
items:
$ref: '#/components/schemas/BacktraceFrame'
additionalProperties: false
additionalProperties: false
ErrorAck:
type: object
required:
- id
- created_at
properties:
id:
type: string
description: Server-assigned identifier for the stored error occurrence.
created_at:
type: string
format: date-time
additionalProperties: false
ErrorResponse:
type: object
required:
- error
properties:
error:
type: string
description: Human-readable error message.
additionalProperties: false