This repository was archived by the owner on May 29, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathswagger.yaml
More file actions
187 lines (169 loc) · 4.14 KB
/
Copy pathswagger.yaml
File metadata and controls
187 lines (169 loc) · 4.14 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
swagger: "2.0"
info:
version: "1.0.0"
title: "APIClarity Plugins telemetries API"
basePath: /api
schemes:
- http
consumes: [ "application/json" ]
produces: [ "application/json" ]
paths:
/telemetry:
post:
summary: 'Post an http telemetry'
parameters:
- $ref: '#/parameters/TraceSourceTokenHeader'
- in: 'body'
name: 'body'
required: true
schema:
description: 'Telemetry'
$ref: '#/definitions/Telemetry'
responses:
'200':
description: 'Success'
schema:
$ref: '#/responses/Success'
default:
$ref: '#/responses/UnknownError'
/hostsToTrace:
get:
summary: 'Get a list of hosts to trace'
parameters:
- $ref: '#/parameters/TraceSourceTokenHeader'
responses:
'200':
description: 'Success'
schema:
$ref: '#/definitions/HostsToTrace'
default:
$ref: '#/responses/UnknownError'
/control/newDiscoveredAPIs:
post:
summary: 'Allows a client to notify APIClarity about new APIs.'
description: 'This allows a client (a gateway for example) to notify APIclarity about newly discovered APIs. If one of the APIs already exists, it is ignored.'
parameters:
- $ref: '#/parameters/TraceSourceTokenHeader'
- in: 'body'
name: 'body'
description: 'List of new discovered APIs'
required: true
schema:
type: 'object'
required:
- hosts
properties:
hosts:
type: 'array'
description: 'List of discovered APIs, format of hostname:port'
items:
type: 'string'
responses:
'200':
description: 'Success'
schema:
$ref: '#/responses/Success'
default:
$ref: '#/responses/UnknownError'
definitions:
Telemetry:
type: 'object'
properties:
requestID:
type: 'string'
scheme:
type: 'string'
destinationAddress:
type: 'string'
destinationNamespace:
type: 'string'
sourceAddress:
type: 'string'
request:
$ref: '#/definitions/Request'
response:
$ref: '#/definitions/Response'
Request:
type: 'object'
properties:
method:
type: 'string'
path:
type: 'string'
host:
type: 'string'
common:
$ref: '#/definitions/Common'
Response:
type: 'object'
properties:
statusCode:
type: 'string'
common:
$ref: '#/definitions/Common'
Common:
type: 'object'
properties:
version:
type: 'string'
headers:
type: 'array'
items:
$ref: '#/definitions/Header'
body:
type: 'string'
format: 'byte'
TruncatedBody:
type: 'boolean'
time:
description: 'Time since epoch (milliseconds)'
type: 'integer'
format: int64
Header:
type: 'object'
properties:
key:
type: 'string'
value:
type: 'string'
ApiResponse:
description: 'An object that is return in all cases of failures.'
type: 'object'
properties:
message:
type: 'string'
SuccessResponse:
description: 'An object that is return in cases of success that return nothing.'
type: 'object'
properties:
message:
type: 'string'
HostsList:
description: 'List of hosts'
type: 'array'
items:
type: string
HostsToTrace:
description: 'List of hosts to trace'
type: 'object'
properties:
hosts:
$ref: '#/definitions/HostsList'
required:
- hosts
responses:
UnknownError:
description: 'unknown error'
schema:
$ref: '#/definitions/ApiResponse'
Success:
description: 'success message'
schema:
$ref: '#/definitions/SuccessResponse'
parameters:
TraceSourceTokenHeader:
name: 'X-Trace-Source-Token'
description: 'Optional header to authenticate the trace source'
in: 'header'
type: 'string'
required: false