lustro-cli 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lustro_cli/__init__.py +29 -0
- lustro_cli/cli.py +2460 -0
- lustro_cli/client.py +434 -0
- lustro_cli/discovery.py +1033 -0
- lustro_cli/exitcodes.py +25 -0
- lustro_cli/mcp.py +867 -0
- lustro_cli/wire/__init__.py +62 -0
- lustro_cli/wire/_schema.json +97 -0
- lustro_cli/wire/cursor-envelope.schema.json +28 -0
- lustro_cli/wire/error-envelope.schema.json +46 -0
- lustro_cli/wire/golden/cursor-delta.json +91 -0
- lustro_cli/wire/golden/cursor-reset.json +65 -0
- lustro_cli/wire/golden/cursor-unchanged.json +15 -0
- lustro_cli/wire/golden/error-envelope.json +7 -0
- lustro_cli/wire/golden/export-har-websocket.json +148 -0
- lustro_cli/wire/golden/export-har.json +359 -0
- lustro_cli/wire/golden/logs-delta.json +44 -0
- lustro_cli/wire/golden/logs-reset.json +73 -0
- lustro_cli/wire/golden/logs-unchanged.json +9 -0
- lustro_cli/wire/golden/meta.json +12 -0
- lustro_cli/wire/golden/prefs-delta.json +58 -0
- lustro_cli/wire/golden/prefs-files.json +64 -0
- lustro_cli/wire/golden/prefs-reset.json +58 -0
- lustro_cli/wire/golden/prefs-unchanged.json +4 -0
- lustro_cli/wire/golden/rules-list.json +44 -0
- lustro_cli/wire/golden/screen-tree-views.json +596 -0
- lustro_cli/wire/golden/screen-tree.json +689 -0
- lustro_cli/wire/golden/send-result.json +7 -0
- lustro_cli/wire/golden/senders-list.json +6 -0
- lustro_cli/wire/golden/sqlite-databases.json +37 -0
- lustro_cli/wire/golden/sqlite-exec.json +4 -0
- lustro_cli/wire/golden/sqlite-query.json +109 -0
- lustro_cli/wire/golden/sqlite-rows.json +109 -0
- lustro_cli/wire/golden/sqlite-schema.json +98 -0
- lustro_cli/wire/golden/sqlite-tables.json +57 -0
- lustro_cli/wire/golden/stream-delta.json +48 -0
- lustro_cli/wire/golden/stream-reset.json +66 -0
- lustro_cli/wire/golden/stream-unchanged.json +4 -0
- lustro_cli/wire/golden/transaction-image.json +43 -0
- lustro_cli/wire/golden/transaction.json +41 -0
- lustro_cli/wire/golden/websocket.json +37 -0
- lustro_cli/wire/golden/websockets-reset.json +89 -0
- lustro_cli/wire/golden/work-events.json +152 -0
- lustro_cli/wire/golden/work-item.json +118 -0
- lustro_cli/wire/golden/work-items.json +129 -0
- lustro_cli/wire/golden/work-metrics.json +40 -0
- lustro_cli/wire/logs.openapi.json +622 -0
- lustro_cli/wire/meta.schema.json +47 -0
- lustro_cli/wire/network.openapi.json +2458 -0
- lustro_cli/wire/pagination.schema.json +20 -0
- lustro_cli/wire/prefs.openapi.json +699 -0
- lustro_cli/wire/screen.openapi.json +512 -0
- lustro_cli/wire/sqlite.openapi.json +1233 -0
- lustro_cli/wire/stream-envelope.schema.json +33 -0
- lustro_cli/wire/sync.py +80 -0
- lustro_cli/wire/work.openapi.json +1188 -0
- lustro_cli-0.1.0.dist-info/METADATA +585 -0
- lustro_cli-0.1.0.dist-info/RECORD +60 -0
- lustro_cli-0.1.0.dist-info/WHEEL +4 -0
- lustro_cli-0.1.0.dist-info/entry_points.txt +3 -0
|
@@ -0,0 +1,2458 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Lustro Network debug tab",
|
|
5
|
+
"version": "1.17",
|
|
6
|
+
"description": "Capture, inspect, mock, throttle, and replay HTTP traffic, and inspect the messages of WebSocket connections. All routes are token-authenticated (Bearer header or HttpOnly cookie) and live under /api/v1/network. Errors use the shared error envelope. A method that a path below does not take gets a 405 with an Allow header that lists the methods it takes."
|
|
7
|
+
},
|
|
8
|
+
"servers": [
|
|
9
|
+
{
|
|
10
|
+
"url": "/",
|
|
11
|
+
"description": "The Lustro debug server (loopback by default)."
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"paths": {
|
|
15
|
+
"/api/v1/network/transactions": {
|
|
16
|
+
"get": {
|
|
17
|
+
"operationId": "listTransactions",
|
|
18
|
+
"summary": "Poll captured transactions with an opaque cursor.",
|
|
19
|
+
"description": "Short-polling. Send the last cursor back each call. status=reset returns the full current list; status=delta returns the current list after a change; status=unchanged omits items. Treat unknown statuses as reset. The cursor advances when the transaction list changes: a capture, a response or streaming progress, a failure, an eviction, or clear. A change to the mock rules advances it too, from protocol 1.9, because each transaction has activeMockRuleId; a hit on a rule doesn't. Pause, overwrite mode, throttle, and the capture filter's counts don't advance it; state reports them on every response, unchanged ones included. A cursor from before an app restart gets a reset. A request the app's capture filter skips is never listed; mock rules and the throttle still apply to it, and state.captureFilter counts it.",
|
|
20
|
+
"parameters": [
|
|
21
|
+
{
|
|
22
|
+
"name": "cursor",
|
|
23
|
+
"in": "query",
|
|
24
|
+
"required": false,
|
|
25
|
+
"schema": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"description": "Opaque cursor from the previous response. Omit on first poll."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "search",
|
|
32
|
+
"in": "query",
|
|
33
|
+
"required": false,
|
|
34
|
+
"schema": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"description": "Only the transactions in which this text is found, ignoring case: in the URL, the final URL, the method, a request or response header as the line Name: value, or a text body. Headers and bodies are searched as stored, after redaction. 400 with field search when the search takes longer than 5 s."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "regex",
|
|
41
|
+
"in": "query",
|
|
42
|
+
"required": false,
|
|
43
|
+
"schema": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"default": false
|
|
46
|
+
},
|
|
47
|
+
"description": "true makes each word of search, up to a space, a Java regular expression found ignoring case: every word must be found, each in any field, and a word that starts with - must be found in none. A space in a regex is \\s. 400 with field search when a word doesn't compile, and with field regex for a value other than true or false."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "since",
|
|
51
|
+
"in": "query",
|
|
52
|
+
"required": false,
|
|
53
|
+
"schema": {
|
|
54
|
+
"type": "integer",
|
|
55
|
+
"format": "int64",
|
|
56
|
+
"minimum": 0
|
|
57
|
+
},
|
|
58
|
+
"description": "Only the transactions with startedAt at or after this time, in milliseconds since the Unix epoch, such as the requests that started after a step of a test. The cursor is the one of the whole list, as with search: a change to a transaction that since leaves out also advances it, and the delta then has the same items. Send no cursor after a change to since. 400 with field since for a value that is not an integer of 0 or more. Since protocol 1.14."
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"responses": {
|
|
62
|
+
"200": {
|
|
63
|
+
"description": "Cursor envelope.",
|
|
64
|
+
"content": {
|
|
65
|
+
"application/json": {
|
|
66
|
+
"schema": {
|
|
67
|
+
"$ref": "#/components/schemas/TransactionCursorEnvelope"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"400": {
|
|
73
|
+
"$ref": "#/components/responses/Error"
|
|
74
|
+
},
|
|
75
|
+
"401": {
|
|
76
|
+
"$ref": "#/components/responses/Error"
|
|
77
|
+
},
|
|
78
|
+
"403": {
|
|
79
|
+
"$ref": "#/components/responses/Error"
|
|
80
|
+
},
|
|
81
|
+
"413": {
|
|
82
|
+
"$ref": "#/components/responses/Error"
|
|
83
|
+
},
|
|
84
|
+
"503": {
|
|
85
|
+
"$ref": "#/components/responses/Error"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"/api/v1/network/transactions/{id}": {
|
|
91
|
+
"get": {
|
|
92
|
+
"operationId": "getTransaction",
|
|
93
|
+
"summary": "Full detail for one captured transaction.",
|
|
94
|
+
"parameters": [
|
|
95
|
+
{
|
|
96
|
+
"name": "id",
|
|
97
|
+
"in": "path",
|
|
98
|
+
"required": true,
|
|
99
|
+
"schema": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"responses": {
|
|
105
|
+
"200": {
|
|
106
|
+
"description": "Transaction detail.",
|
|
107
|
+
"content": {
|
|
108
|
+
"application/json": {
|
|
109
|
+
"schema": {
|
|
110
|
+
"$ref": "#/components/schemas/Transaction"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"401": {
|
|
116
|
+
"$ref": "#/components/responses/Error"
|
|
117
|
+
},
|
|
118
|
+
"403": {
|
|
119
|
+
"$ref": "#/components/responses/Error"
|
|
120
|
+
},
|
|
121
|
+
"404": {
|
|
122
|
+
"$ref": "#/components/responses/Error"
|
|
123
|
+
},
|
|
124
|
+
"413": {
|
|
125
|
+
"$ref": "#/components/responses/Error"
|
|
126
|
+
},
|
|
127
|
+
"503": {
|
|
128
|
+
"$ref": "#/components/responses/Error"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"/api/v1/network/transactions/{id}/body/{direction}": {
|
|
134
|
+
"get": {
|
|
135
|
+
"operationId": "getTransactionBody",
|
|
136
|
+
"summary": "One captured body, as it is stored.",
|
|
137
|
+
"description": "Returns the bytes of a binary body (requestBodyBinary or responseBodyBinary in the detail) as they arrived, or the redacted text of a text body encoded as UTF-8, so it is also how to download a large text body. A body cut at the capture cap comes back as the part that was kept; the detail's requestBodyTruncated and responseBodyTruncated say when. Content-Type is the captured media type without its parameters, plus charset=utf-8 for text; application/octet-stream or text/plain; charset=utf-8 when none was captured. image/png, image/jpeg, image/gif, and image/webp are served inline, so the console can show them in an img element. Every other type, SVG and HTML included, carries Content-Disposition: attachment and the Content-Security-Policy default-src 'none'; sandbox, enforced alongside the server's own policy, so a captured page can't run script under the console's origin. 404 when the transaction is unknown or no body was kept for that direction: none was sent, it was not captured, or its type is one capture drops.",
|
|
138
|
+
"parameters": [
|
|
139
|
+
{
|
|
140
|
+
"name": "id",
|
|
141
|
+
"in": "path",
|
|
142
|
+
"required": true,
|
|
143
|
+
"schema": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "direction",
|
|
149
|
+
"in": "path",
|
|
150
|
+
"required": true,
|
|
151
|
+
"schema": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"enum": [
|
|
154
|
+
"request",
|
|
155
|
+
"response"
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"responses": {
|
|
161
|
+
"200": {
|
|
162
|
+
"description": "The body.",
|
|
163
|
+
"headers": {
|
|
164
|
+
"Content-Disposition": {
|
|
165
|
+
"description": "attachment, for every type but image/png, image/jpeg, image/gif, and image/webp; absent for those.",
|
|
166
|
+
"schema": {
|
|
167
|
+
"type": "string"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"Content-Security-Policy": {
|
|
171
|
+
"description": "For an attachment, the server's policy and default-src 'none'; sandbox, in one header; for an inline image, the server's policy alone.",
|
|
172
|
+
"schema": {
|
|
173
|
+
"type": "string"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"content": {
|
|
178
|
+
"*/*": {
|
|
179
|
+
"schema": {}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"401": {
|
|
184
|
+
"$ref": "#/components/responses/Error"
|
|
185
|
+
},
|
|
186
|
+
"403": {
|
|
187
|
+
"$ref": "#/components/responses/Error"
|
|
188
|
+
},
|
|
189
|
+
"404": {
|
|
190
|
+
"$ref": "#/components/responses/Error"
|
|
191
|
+
},
|
|
192
|
+
"413": {
|
|
193
|
+
"$ref": "#/components/responses/Error"
|
|
194
|
+
},
|
|
195
|
+
"503": {
|
|
196
|
+
"$ref": "#/components/responses/Error"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"/api/v1/network/transactions/_/export": {
|
|
202
|
+
"get": {
|
|
203
|
+
"operationId": "exportTransactions",
|
|
204
|
+
"summary": "Captured transactions as a HAR 1.2 document.",
|
|
205
|
+
"description": "Returns the transactions that ids names, or every one when ids is left out, as a HAR 1.2 document that browser devtools and HTTP tools import, oldest first. The entry of a WebSocket's handshake carries the socket's messages in _webSocketMessages, the field Chrome DevTools writes and reads, and its _resourceType is websocket. It is built from the store, so headers, the URL, and text bodies are redacted as in the detail. An id the store no longer has is left out, and an ids parameter that names none returns no entries. Each entry spends its whole durationMs in timings.wait, and the time the global throttle held it in timings.blocked, with send and receive at 0 and the other phases at -1; time is their sum. A body kept as bytes goes out in base64: content.encoding is base64 for a response, and postData._encoding for a request, which HAR gives no encoding field. _lustro on each entry carries the transaction id and what HAR has no field for: isMocked, source, categories, the truncation flags, responseComplete, finalUrl, priorResponses, and error. A request still in flight has status 0 and time 0. The request line and headers must stay under 8 KB, so a client that exports many ids sends them in batches.",
|
|
206
|
+
"parameters": [
|
|
207
|
+
{
|
|
208
|
+
"name": "format",
|
|
209
|
+
"in": "query",
|
|
210
|
+
"required": false,
|
|
211
|
+
"schema": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"enum": [
|
|
214
|
+
"har"
|
|
215
|
+
],
|
|
216
|
+
"default": "har"
|
|
217
|
+
},
|
|
218
|
+
"description": "The export format. 400 for any other."
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"name": "ids",
|
|
222
|
+
"in": "query",
|
|
223
|
+
"required": false,
|
|
224
|
+
"schema": {
|
|
225
|
+
"type": "array",
|
|
226
|
+
"items": {
|
|
227
|
+
"type": "string"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"description": "Transaction ids separated by commas; the parameter can also repeat. Left out, the export has every transaction."
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"responses": {
|
|
234
|
+
"200": {
|
|
235
|
+
"description": "A HAR document.",
|
|
236
|
+
"content": {
|
|
237
|
+
"application/json": {
|
|
238
|
+
"schema": {
|
|
239
|
+
"$ref": "#/components/schemas/HarDocument"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"400": {
|
|
245
|
+
"$ref": "#/components/responses/Error"
|
|
246
|
+
},
|
|
247
|
+
"401": {
|
|
248
|
+
"$ref": "#/components/responses/Error"
|
|
249
|
+
},
|
|
250
|
+
"403": {
|
|
251
|
+
"$ref": "#/components/responses/Error"
|
|
252
|
+
},
|
|
253
|
+
"413": {
|
|
254
|
+
"$ref": "#/components/responses/Error"
|
|
255
|
+
},
|
|
256
|
+
"503": {
|
|
257
|
+
"$ref": "#/components/responses/Error"
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"/api/v1/network/websockets": {
|
|
263
|
+
"get": {
|
|
264
|
+
"operationId": "listWebSockets",
|
|
265
|
+
"summary": "Poll captured WebSocket connections with an opaque cursor.",
|
|
266
|
+
"description": "Short-polling, as for transactions: status=reset and status=delta carry the full current list, newest first, and status=unchanged omits items. The cursor advances when a connection is listed, changes state, or gets an event, and on clear. A connection is listed when the app creates its socket with the factory from Lustro.webSocketFactory; the interceptor alone shows only the handshake, as a transaction. A socket the app's capture filter skips is never listed. While capture is paused, no socket is listed and no message is recorded; a close or a failure of a listed connection still is. A connection that was cleared or evicted is listed again with its next message, with counts that start again.",
|
|
267
|
+
"parameters": [
|
|
268
|
+
{
|
|
269
|
+
"name": "cursor",
|
|
270
|
+
"in": "query",
|
|
271
|
+
"required": false,
|
|
272
|
+
"schema": {
|
|
273
|
+
"type": "string"
|
|
274
|
+
},
|
|
275
|
+
"description": "Opaque cursor from the previous response. Omit on first poll."
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
"responses": {
|
|
279
|
+
"200": {
|
|
280
|
+
"description": "Cursor envelope.",
|
|
281
|
+
"content": {
|
|
282
|
+
"application/json": {
|
|
283
|
+
"schema": {
|
|
284
|
+
"$ref": "#/components/schemas/WebSocketCursorEnvelope"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"401": {
|
|
290
|
+
"$ref": "#/components/responses/Error"
|
|
291
|
+
},
|
|
292
|
+
"403": {
|
|
293
|
+
"$ref": "#/components/responses/Error"
|
|
294
|
+
},
|
|
295
|
+
"413": {
|
|
296
|
+
"$ref": "#/components/responses/Error"
|
|
297
|
+
},
|
|
298
|
+
"503": {
|
|
299
|
+
"$ref": "#/components/responses/Error"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"/api/v1/network/websockets/{id}": {
|
|
305
|
+
"get": {
|
|
306
|
+
"operationId": "getWebSocket",
|
|
307
|
+
"summary": "One WebSocket connection, with the headers of its handshake.",
|
|
308
|
+
"parameters": [
|
|
309
|
+
{
|
|
310
|
+
"name": "id",
|
|
311
|
+
"in": "path",
|
|
312
|
+
"required": true,
|
|
313
|
+
"schema": {
|
|
314
|
+
"type": "string"
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
"responses": {
|
|
319
|
+
"200": {
|
|
320
|
+
"description": "Connection detail.",
|
|
321
|
+
"content": {
|
|
322
|
+
"application/json": {
|
|
323
|
+
"schema": {
|
|
324
|
+
"$ref": "#/components/schemas/WebSocketConnection"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"401": {
|
|
330
|
+
"$ref": "#/components/responses/Error"
|
|
331
|
+
},
|
|
332
|
+
"403": {
|
|
333
|
+
"$ref": "#/components/responses/Error"
|
|
334
|
+
},
|
|
335
|
+
"404": {
|
|
336
|
+
"$ref": "#/components/responses/Error"
|
|
337
|
+
},
|
|
338
|
+
"413": {
|
|
339
|
+
"$ref": "#/components/responses/Error"
|
|
340
|
+
},
|
|
341
|
+
"503": {
|
|
342
|
+
"$ref": "#/components/responses/Error"
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"/api/v1/network/websockets/{id}/events": {
|
|
348
|
+
"get": {
|
|
349
|
+
"operationId": "listWebSocketEvents",
|
|
350
|
+
"summary": "Poll a connection's log: its messages and lifecycle events, in order.",
|
|
351
|
+
"description": "A stream envelope. The first poll (no cursor, or one from another log) gets status=reset with the last events of the log, at most limit of them. A poll with the returned cursor gets status=delta with only the events after it, oldest first, or status=unchanged. When more than limit events are new, the delta has the oldest limit of them, and the next poll goes on from there. dropped counts the events the log evicted before this client got them. direction and search leave events out of items; the cursor still moves past them. Clear starts a new log, so a cursor from before it gets a reset.",
|
|
352
|
+
"parameters": [
|
|
353
|
+
{
|
|
354
|
+
"name": "id",
|
|
355
|
+
"in": "path",
|
|
356
|
+
"required": true,
|
|
357
|
+
"schema": {
|
|
358
|
+
"type": "string"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"name": "cursor",
|
|
363
|
+
"in": "query",
|
|
364
|
+
"required": false,
|
|
365
|
+
"schema": {
|
|
366
|
+
"type": "string"
|
|
367
|
+
},
|
|
368
|
+
"description": "Opaque cursor from the previous response. Omit on first poll."
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"name": "limit",
|
|
372
|
+
"in": "query",
|
|
373
|
+
"required": false,
|
|
374
|
+
"schema": {
|
|
375
|
+
"type": "integer",
|
|
376
|
+
"format": "int32",
|
|
377
|
+
"minimum": 1,
|
|
378
|
+
"default": 100
|
|
379
|
+
},
|
|
380
|
+
"description": "The most events in one response. A limit above the size of the log returns the whole log. 400 when it is not a whole number of 1 or more."
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"name": "direction",
|
|
384
|
+
"in": "query",
|
|
385
|
+
"required": false,
|
|
386
|
+
"schema": {
|
|
387
|
+
"type": "string",
|
|
388
|
+
"enum": [
|
|
389
|
+
"sent",
|
|
390
|
+
"received"
|
|
391
|
+
]
|
|
392
|
+
},
|
|
393
|
+
"description": "Only the events with this direction: messages, and close frames. 400 for any other value."
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"name": "search",
|
|
397
|
+
"in": "query",
|
|
398
|
+
"required": false,
|
|
399
|
+
"schema": {
|
|
400
|
+
"type": "string"
|
|
401
|
+
},
|
|
402
|
+
"description": "Only the text messages whose stored text contains this, ignoring case. 400 with field search when the search takes longer than 5 s."
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"name": "regex",
|
|
406
|
+
"in": "query",
|
|
407
|
+
"required": false,
|
|
408
|
+
"schema": {
|
|
409
|
+
"type": "boolean",
|
|
410
|
+
"default": false
|
|
411
|
+
},
|
|
412
|
+
"description": "true makes each word of search, up to a space, a Java regular expression found ignoring case: every word must be found, each in any field, and a word that starts with - must be found in none. A space in a regex is \\s. 400 with field search when a word doesn't compile, and with field regex for a value other than true or false."
|
|
413
|
+
}
|
|
414
|
+
],
|
|
415
|
+
"responses": {
|
|
416
|
+
"200": {
|
|
417
|
+
"description": "Stream envelope.",
|
|
418
|
+
"content": {
|
|
419
|
+
"application/json": {
|
|
420
|
+
"schema": {
|
|
421
|
+
"$ref": "#/components/schemas/WebSocketEventStreamEnvelope"
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
"400": {
|
|
427
|
+
"$ref": "#/components/responses/Error"
|
|
428
|
+
},
|
|
429
|
+
"401": {
|
|
430
|
+
"$ref": "#/components/responses/Error"
|
|
431
|
+
},
|
|
432
|
+
"403": {
|
|
433
|
+
"$ref": "#/components/responses/Error"
|
|
434
|
+
},
|
|
435
|
+
"404": {
|
|
436
|
+
"$ref": "#/components/responses/Error"
|
|
437
|
+
},
|
|
438
|
+
"413": {
|
|
439
|
+
"$ref": "#/components/responses/Error"
|
|
440
|
+
},
|
|
441
|
+
"503": {
|
|
442
|
+
"$ref": "#/components/responses/Error"
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
"/api/v1/network/websockets/{id}/events/{seq}/payload": {
|
|
448
|
+
"get": {
|
|
449
|
+
"operationId": "getWebSocketPayload",
|
|
450
|
+
"summary": "The payload of one message, as it is stored.",
|
|
451
|
+
"description": "Returns the bytes of a binary message as application/octet-stream, or the redacted text of a text message as text/plain; charset=utf-8. A payload cut at the capture cap comes back as the part that was kept; the event's truncated says when. Every payload carries Content-Disposition: attachment and the Content-Security-Policy default-src 'none'; sandbox, enforced alongside the server's own policy, so a captured payload can't run script under the console's origin. 404 when the connection or the event is unknown, when the event is not a message, or when no payload is stored for it.",
|
|
452
|
+
"parameters": [
|
|
453
|
+
{
|
|
454
|
+
"name": "id",
|
|
455
|
+
"in": "path",
|
|
456
|
+
"required": true,
|
|
457
|
+
"schema": {
|
|
458
|
+
"type": "string"
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"name": "seq",
|
|
463
|
+
"in": "path",
|
|
464
|
+
"required": true,
|
|
465
|
+
"schema": {
|
|
466
|
+
"type": "integer",
|
|
467
|
+
"format": "int64"
|
|
468
|
+
},
|
|
469
|
+
"description": "The event's seq."
|
|
470
|
+
}
|
|
471
|
+
],
|
|
472
|
+
"responses": {
|
|
473
|
+
"200": {
|
|
474
|
+
"description": "The payload.",
|
|
475
|
+
"headers": {
|
|
476
|
+
"Content-Disposition": {
|
|
477
|
+
"description": "attachment, always.",
|
|
478
|
+
"schema": {
|
|
479
|
+
"type": "string"
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
"Content-Security-Policy": {
|
|
483
|
+
"description": "The server's policy and default-src 'none'; sandbox, in one header.",
|
|
484
|
+
"schema": {
|
|
485
|
+
"type": "string"
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
"content": {
|
|
490
|
+
"*/*": {
|
|
491
|
+
"schema": {}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
"401": {
|
|
496
|
+
"$ref": "#/components/responses/Error"
|
|
497
|
+
},
|
|
498
|
+
"403": {
|
|
499
|
+
"$ref": "#/components/responses/Error"
|
|
500
|
+
},
|
|
501
|
+
"404": {
|
|
502
|
+
"$ref": "#/components/responses/Error"
|
|
503
|
+
},
|
|
504
|
+
"413": {
|
|
505
|
+
"$ref": "#/components/responses/Error"
|
|
506
|
+
},
|
|
507
|
+
"503": {
|
|
508
|
+
"$ref": "#/components/responses/Error"
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
"/api/v1/network/clear": {
|
|
514
|
+
"post": {
|
|
515
|
+
"operationId": "clearTransactions",
|
|
516
|
+
"summary": "Clear the captured transactions and WebSocket connections, and start the capture filter's counts again. Mock rules and settings are preserved.",
|
|
517
|
+
"responses": {
|
|
518
|
+
"200": {
|
|
519
|
+
"description": "Acknowledged.",
|
|
520
|
+
"content": {
|
|
521
|
+
"application/json": {
|
|
522
|
+
"schema": {
|
|
523
|
+
"type": "object",
|
|
524
|
+
"required": [
|
|
525
|
+
"status"
|
|
526
|
+
],
|
|
527
|
+
"properties": {
|
|
528
|
+
"status": {
|
|
529
|
+
"const": "ok"
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
"401": {
|
|
537
|
+
"$ref": "#/components/responses/Error"
|
|
538
|
+
},
|
|
539
|
+
"403": {
|
|
540
|
+
"$ref": "#/components/responses/Error"
|
|
541
|
+
},
|
|
542
|
+
"413": {
|
|
543
|
+
"$ref": "#/components/responses/Error"
|
|
544
|
+
},
|
|
545
|
+
"503": {
|
|
546
|
+
"$ref": "#/components/responses/Error"
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
"/api/v1/network/rules": {
|
|
552
|
+
"get": {
|
|
553
|
+
"operationId": "listMockRules",
|
|
554
|
+
"summary": "List mock rules.",
|
|
555
|
+
"responses": {
|
|
556
|
+
"200": {
|
|
557
|
+
"description": "Mock rules, in the order they are tried: the first enabled rule that matches a request answers it.",
|
|
558
|
+
"content": {
|
|
559
|
+
"application/json": {
|
|
560
|
+
"schema": {
|
|
561
|
+
"type": "object",
|
|
562
|
+
"required": [
|
|
563
|
+
"items"
|
|
564
|
+
],
|
|
565
|
+
"properties": {
|
|
566
|
+
"items": {
|
|
567
|
+
"type": "array",
|
|
568
|
+
"items": {
|
|
569
|
+
"$ref": "#/components/schemas/MockRule"
|
|
570
|
+
},
|
|
571
|
+
"description": "In the order the rules are tried."
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
"401": {
|
|
579
|
+
"$ref": "#/components/responses/Error"
|
|
580
|
+
},
|
|
581
|
+
"403": {
|
|
582
|
+
"$ref": "#/components/responses/Error"
|
|
583
|
+
},
|
|
584
|
+
"413": {
|
|
585
|
+
"$ref": "#/components/responses/Error"
|
|
586
|
+
},
|
|
587
|
+
"503": {
|
|
588
|
+
"$ref": "#/components/responses/Error"
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"post": {
|
|
593
|
+
"operationId": "addMockRule",
|
|
594
|
+
"summary": "Add (or upsert by id) a mock rule.",
|
|
595
|
+
"description": "A new rule goes first, so the rule added last wins when two match a request. A rule with the id of an existing one replaces it in place, whole: send enabled, responseHeaders, and failure when editing one, or they fall back to true, empty, and null.",
|
|
596
|
+
"requestBody": {
|
|
597
|
+
"required": true,
|
|
598
|
+
"content": {
|
|
599
|
+
"application/json": {
|
|
600
|
+
"schema": {
|
|
601
|
+
"$ref": "#/components/schemas/MockRuleInput"
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
"responses": {
|
|
607
|
+
"200": {
|
|
608
|
+
"description": "Created.",
|
|
609
|
+
"content": {
|
|
610
|
+
"application/json": {
|
|
611
|
+
"schema": {
|
|
612
|
+
"type": "object",
|
|
613
|
+
"required": [
|
|
614
|
+
"status",
|
|
615
|
+
"id"
|
|
616
|
+
],
|
|
617
|
+
"properties": {
|
|
618
|
+
"status": {
|
|
619
|
+
"const": "ok"
|
|
620
|
+
},
|
|
621
|
+
"id": {
|
|
622
|
+
"type": "string"
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
"400": {
|
|
630
|
+
"$ref": "#/components/responses/Error"
|
|
631
|
+
},
|
|
632
|
+
"401": {
|
|
633
|
+
"$ref": "#/components/responses/Error"
|
|
634
|
+
},
|
|
635
|
+
"403": {
|
|
636
|
+
"$ref": "#/components/responses/Error"
|
|
637
|
+
},
|
|
638
|
+
"413": {
|
|
639
|
+
"$ref": "#/components/responses/Error"
|
|
640
|
+
},
|
|
641
|
+
"503": {
|
|
642
|
+
"$ref": "#/components/responses/Error"
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
"/api/v1/network/rules/_/sync": {
|
|
648
|
+
"post": {
|
|
649
|
+
"operationId": "syncMockRules",
|
|
650
|
+
"summary": "Atomically replace the entire set of mock rules.",
|
|
651
|
+
"description": "Idempotent: the resulting rule list equals the posted array, in that order, so the first rule posted is tried first. A rule without an id gets a new one. Two posted rules with the same id are a 400 with field id, and the message has the indexes of both (since protocol 1.11). A 400 leaves the rules as they were. The interceptor never observes an empty window during the swap.",
|
|
652
|
+
"requestBody": {
|
|
653
|
+
"required": true,
|
|
654
|
+
"content": {
|
|
655
|
+
"application/json": {
|
|
656
|
+
"schema": {
|
|
657
|
+
"type": "array",
|
|
658
|
+
"items": {
|
|
659
|
+
"$ref": "#/components/schemas/MockRuleInput"
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
"responses": {
|
|
666
|
+
"200": {
|
|
667
|
+
"description": "Replaced.",
|
|
668
|
+
"content": {
|
|
669
|
+
"application/json": {
|
|
670
|
+
"schema": {
|
|
671
|
+
"type": "object",
|
|
672
|
+
"required": [
|
|
673
|
+
"status",
|
|
674
|
+
"count"
|
|
675
|
+
],
|
|
676
|
+
"properties": {
|
|
677
|
+
"status": {
|
|
678
|
+
"const": "ok"
|
|
679
|
+
},
|
|
680
|
+
"count": {
|
|
681
|
+
"type": "integer",
|
|
682
|
+
"description": "The number of rules set."
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
"400": {
|
|
690
|
+
"$ref": "#/components/responses/Error"
|
|
691
|
+
},
|
|
692
|
+
"401": {
|
|
693
|
+
"$ref": "#/components/responses/Error"
|
|
694
|
+
},
|
|
695
|
+
"403": {
|
|
696
|
+
"$ref": "#/components/responses/Error"
|
|
697
|
+
},
|
|
698
|
+
"413": {
|
|
699
|
+
"$ref": "#/components/responses/Error"
|
|
700
|
+
},
|
|
701
|
+
"503": {
|
|
702
|
+
"$ref": "#/components/responses/Error"
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
"/api/v1/network/rules/delete": {
|
|
708
|
+
"post": {
|
|
709
|
+
"operationId": "deleteMockRule",
|
|
710
|
+
"summary": "Delete a mock rule by id.",
|
|
711
|
+
"description": "404 with field id when no rule has the id, and then nothing changes.",
|
|
712
|
+
"requestBody": {
|
|
713
|
+
"required": true,
|
|
714
|
+
"content": {
|
|
715
|
+
"application/json": {
|
|
716
|
+
"schema": {
|
|
717
|
+
"type": "object",
|
|
718
|
+
"required": [
|
|
719
|
+
"id"
|
|
720
|
+
],
|
|
721
|
+
"properties": {
|
|
722
|
+
"id": {
|
|
723
|
+
"type": "string"
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
"responses": {
|
|
731
|
+
"200": {
|
|
732
|
+
"description": "Acknowledged.",
|
|
733
|
+
"content": {
|
|
734
|
+
"application/json": {
|
|
735
|
+
"schema": {
|
|
736
|
+
"type": "object",
|
|
737
|
+
"required": [
|
|
738
|
+
"status"
|
|
739
|
+
],
|
|
740
|
+
"properties": {
|
|
741
|
+
"status": {
|
|
742
|
+
"const": "ok"
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
"400": {
|
|
750
|
+
"$ref": "#/components/responses/Error"
|
|
751
|
+
},
|
|
752
|
+
"401": {
|
|
753
|
+
"$ref": "#/components/responses/Error"
|
|
754
|
+
},
|
|
755
|
+
"403": {
|
|
756
|
+
"$ref": "#/components/responses/Error"
|
|
757
|
+
},
|
|
758
|
+
"404": {
|
|
759
|
+
"$ref": "#/components/responses/Error"
|
|
760
|
+
},
|
|
761
|
+
"413": {
|
|
762
|
+
"$ref": "#/components/responses/Error"
|
|
763
|
+
},
|
|
764
|
+
"503": {
|
|
765
|
+
"$ref": "#/components/responses/Error"
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
"/api/v1/network/rules/toggle": {
|
|
771
|
+
"post": {
|
|
772
|
+
"operationId": "toggleMockRule",
|
|
773
|
+
"summary": "Toggle a mock rule's enabled flag.",
|
|
774
|
+
"description": "404 with field id when no rule has the id, and then nothing changes.",
|
|
775
|
+
"requestBody": {
|
|
776
|
+
"required": true,
|
|
777
|
+
"content": {
|
|
778
|
+
"application/json": {
|
|
779
|
+
"schema": {
|
|
780
|
+
"type": "object",
|
|
781
|
+
"required": [
|
|
782
|
+
"id"
|
|
783
|
+
],
|
|
784
|
+
"properties": {
|
|
785
|
+
"id": {
|
|
786
|
+
"type": "string"
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
"responses": {
|
|
794
|
+
"200": {
|
|
795
|
+
"description": "Acknowledged.",
|
|
796
|
+
"content": {
|
|
797
|
+
"application/json": {
|
|
798
|
+
"schema": {
|
|
799
|
+
"type": "object",
|
|
800
|
+
"required": [
|
|
801
|
+
"status"
|
|
802
|
+
],
|
|
803
|
+
"properties": {
|
|
804
|
+
"status": {
|
|
805
|
+
"const": "ok"
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
"400": {
|
|
813
|
+
"$ref": "#/components/responses/Error"
|
|
814
|
+
},
|
|
815
|
+
"401": {
|
|
816
|
+
"$ref": "#/components/responses/Error"
|
|
817
|
+
},
|
|
818
|
+
"403": {
|
|
819
|
+
"$ref": "#/components/responses/Error"
|
|
820
|
+
},
|
|
821
|
+
"404": {
|
|
822
|
+
"$ref": "#/components/responses/Error"
|
|
823
|
+
},
|
|
824
|
+
"413": {
|
|
825
|
+
"$ref": "#/components/responses/Error"
|
|
826
|
+
},
|
|
827
|
+
"503": {
|
|
828
|
+
"$ref": "#/components/responses/Error"
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
"/api/v1/network/pause": {
|
|
834
|
+
"post": {
|
|
835
|
+
"operationId": "togglePause",
|
|
836
|
+
"summary": "Toggle capture pause (capture-only; mocks and throttle still apply while paused). It pauses WebSocket messages too.",
|
|
837
|
+
"responses": {
|
|
838
|
+
"200": {
|
|
839
|
+
"description": "New state.",
|
|
840
|
+
"content": {
|
|
841
|
+
"application/json": {
|
|
842
|
+
"schema": {
|
|
843
|
+
"type": "object",
|
|
844
|
+
"required": [
|
|
845
|
+
"status",
|
|
846
|
+
"paused"
|
|
847
|
+
],
|
|
848
|
+
"properties": {
|
|
849
|
+
"status": {
|
|
850
|
+
"const": "ok"
|
|
851
|
+
},
|
|
852
|
+
"paused": {
|
|
853
|
+
"type": "boolean"
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
},
|
|
860
|
+
"401": {
|
|
861
|
+
"$ref": "#/components/responses/Error"
|
|
862
|
+
},
|
|
863
|
+
"403": {
|
|
864
|
+
"$ref": "#/components/responses/Error"
|
|
865
|
+
},
|
|
866
|
+
"413": {
|
|
867
|
+
"$ref": "#/components/responses/Error"
|
|
868
|
+
},
|
|
869
|
+
"503": {
|
|
870
|
+
"$ref": "#/components/responses/Error"
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
},
|
|
875
|
+
"/api/v1/network/overwrite-mode": {
|
|
876
|
+
"post": {
|
|
877
|
+
"operationId": "toggleOverwriteMode",
|
|
878
|
+
"summary": "Toggle overwrite mode (new request evicts earlier completed transactions with the same method + URL path).",
|
|
879
|
+
"responses": {
|
|
880
|
+
"200": {
|
|
881
|
+
"description": "New state.",
|
|
882
|
+
"content": {
|
|
883
|
+
"application/json": {
|
|
884
|
+
"schema": {
|
|
885
|
+
"type": "object",
|
|
886
|
+
"required": [
|
|
887
|
+
"status",
|
|
888
|
+
"overwriteMode"
|
|
889
|
+
],
|
|
890
|
+
"properties": {
|
|
891
|
+
"status": {
|
|
892
|
+
"const": "ok"
|
|
893
|
+
},
|
|
894
|
+
"overwriteMode": {
|
|
895
|
+
"type": "boolean"
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
},
|
|
902
|
+
"401": {
|
|
903
|
+
"$ref": "#/components/responses/Error"
|
|
904
|
+
},
|
|
905
|
+
"403": {
|
|
906
|
+
"$ref": "#/components/responses/Error"
|
|
907
|
+
},
|
|
908
|
+
"413": {
|
|
909
|
+
"$ref": "#/components/responses/Error"
|
|
910
|
+
},
|
|
911
|
+
"503": {
|
|
912
|
+
"$ref": "#/components/responses/Error"
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
"/api/v1/network/throttle": {
|
|
918
|
+
"post": {
|
|
919
|
+
"operationId": "setThrottle",
|
|
920
|
+
"summary": "Set a global pre-request throttle delay (ms).",
|
|
921
|
+
"description": "Holds each OkHttp request of the app for delayMs before it is sent; 0 turns the throttle off. A missing delayMs, or one that is not a whole number from 0 to 600000 (10 minutes), gets a 400 with field delayMs, and the throttle stays as it was.",
|
|
922
|
+
"requestBody": {
|
|
923
|
+
"required": true,
|
|
924
|
+
"content": {
|
|
925
|
+
"application/json": {
|
|
926
|
+
"schema": {
|
|
927
|
+
"type": "object",
|
|
928
|
+
"required": [
|
|
929
|
+
"delayMs"
|
|
930
|
+
],
|
|
931
|
+
"properties": {
|
|
932
|
+
"delayMs": {
|
|
933
|
+
"type": "integer",
|
|
934
|
+
"format": "int32",
|
|
935
|
+
"minimum": 0,
|
|
936
|
+
"maximum": 600000
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
"responses": {
|
|
944
|
+
"200": {
|
|
945
|
+
"description": "New delay.",
|
|
946
|
+
"content": {
|
|
947
|
+
"application/json": {
|
|
948
|
+
"schema": {
|
|
949
|
+
"type": "object",
|
|
950
|
+
"required": [
|
|
951
|
+
"status",
|
|
952
|
+
"delayMs"
|
|
953
|
+
],
|
|
954
|
+
"properties": {
|
|
955
|
+
"status": {
|
|
956
|
+
"const": "ok"
|
|
957
|
+
},
|
|
958
|
+
"delayMs": {
|
|
959
|
+
"type": "integer"
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
"400": {
|
|
967
|
+
"$ref": "#/components/responses/Error"
|
|
968
|
+
},
|
|
969
|
+
"401": {
|
|
970
|
+
"$ref": "#/components/responses/Error"
|
|
971
|
+
},
|
|
972
|
+
"403": {
|
|
973
|
+
"$ref": "#/components/responses/Error"
|
|
974
|
+
},
|
|
975
|
+
"413": {
|
|
976
|
+
"$ref": "#/components/responses/Error"
|
|
977
|
+
},
|
|
978
|
+
"503": {
|
|
979
|
+
"$ref": "#/components/responses/Error"
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
"/api/v1/network/senders": {
|
|
985
|
+
"get": {
|
|
986
|
+
"operationId": "listSenders",
|
|
987
|
+
"summary": "List the senders that POST send can use, in order; the first one is the default.",
|
|
988
|
+
"description": "Each sender is an OkHttp client that the app registered under a name. An empty list means that the app registered none, and POST send is not available.",
|
|
989
|
+
"responses": {
|
|
990
|
+
"200": {
|
|
991
|
+
"description": "The senders, in order.",
|
|
992
|
+
"content": {
|
|
993
|
+
"application/json": {
|
|
994
|
+
"schema": {
|
|
995
|
+
"type": "object",
|
|
996
|
+
"required": [
|
|
997
|
+
"items"
|
|
998
|
+
],
|
|
999
|
+
"properties": {
|
|
1000
|
+
"items": {
|
|
1001
|
+
"type": "array",
|
|
1002
|
+
"items": {
|
|
1003
|
+
"type": "object",
|
|
1004
|
+
"required": [
|
|
1005
|
+
"name",
|
|
1006
|
+
"baseUrl"
|
|
1007
|
+
],
|
|
1008
|
+
"properties": {
|
|
1009
|
+
"name": {
|
|
1010
|
+
"type": "string",
|
|
1011
|
+
"description": "The name to pass as sender to POST send."
|
|
1012
|
+
},
|
|
1013
|
+
"baseUrl": {
|
|
1014
|
+
"type": [
|
|
1015
|
+
"string",
|
|
1016
|
+
"null"
|
|
1017
|
+
],
|
|
1018
|
+
"description": "The URL a relative url is appended to; null when the sender takes absolute URLs only. An app can give a sender's base URL as a function that the app calls for each list and each send, so the value can change between two calls; null also when that function failed."
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
},
|
|
1028
|
+
"401": {
|
|
1029
|
+
"$ref": "#/components/responses/Error"
|
|
1030
|
+
},
|
|
1031
|
+
"403": {
|
|
1032
|
+
"$ref": "#/components/responses/Error"
|
|
1033
|
+
},
|
|
1034
|
+
"413": {
|
|
1035
|
+
"$ref": "#/components/responses/Error"
|
|
1036
|
+
},
|
|
1037
|
+
"503": {
|
|
1038
|
+
"$ref": "#/components/responses/Error"
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
"/api/v1/network/send": {
|
|
1044
|
+
"post": {
|
|
1045
|
+
"operationId": "sendRequest",
|
|
1046
|
+
"summary": "Send a request through one of the app's senders (synchronous).",
|
|
1047
|
+
"description": "Blocks until the sender returns, within the per-request timeout. An absolute url is sent as given; a relative one is appended to the base URL of the sender, as the app gives it at the time of the send. 400 with field url for a relative url when the sender has no base URL, and, since protocol 1.14, with field baseUrl when the app's base URL function fails or returns a URL that is not an absolute http or https URL. Self-requests to the debug server's own bind host:port are rejected. Only available when the app registered a sender (see GET senders): without one, the tab's document has no send route, and POST send gets 404.",
|
|
1048
|
+
"requestBody": {
|
|
1049
|
+
"required": true,
|
|
1050
|
+
"content": {
|
|
1051
|
+
"application/json": {
|
|
1052
|
+
"schema": {
|
|
1053
|
+
"type": "object",
|
|
1054
|
+
"required": [
|
|
1055
|
+
"url"
|
|
1056
|
+
],
|
|
1057
|
+
"properties": {
|
|
1058
|
+
"url": {
|
|
1059
|
+
"type": "string",
|
|
1060
|
+
"description": "Absolute URL, or a path appended to the base URL of the sender."
|
|
1061
|
+
},
|
|
1062
|
+
"sender": {
|
|
1063
|
+
"type": [
|
|
1064
|
+
"string",
|
|
1065
|
+
"null"
|
|
1066
|
+
],
|
|
1067
|
+
"description": "The name of a sender from GET senders. Left out or null: the first one."
|
|
1068
|
+
},
|
|
1069
|
+
"method": {
|
|
1070
|
+
"type": "string",
|
|
1071
|
+
"default": "GET"
|
|
1072
|
+
},
|
|
1073
|
+
"headers": {
|
|
1074
|
+
"type": "object",
|
|
1075
|
+
"additionalProperties": {
|
|
1076
|
+
"type": "string"
|
|
1077
|
+
}
|
|
1078
|
+
},
|
|
1079
|
+
"body": {
|
|
1080
|
+
"type": "string"
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
},
|
|
1087
|
+
"responses": {
|
|
1088
|
+
"200": {
|
|
1089
|
+
"description": "Synchronous send result.",
|
|
1090
|
+
"content": {
|
|
1091
|
+
"application/json": {
|
|
1092
|
+
"schema": {
|
|
1093
|
+
"type": "object",
|
|
1094
|
+
"required": [
|
|
1095
|
+
"ok"
|
|
1096
|
+
],
|
|
1097
|
+
"properties": {
|
|
1098
|
+
"transactionId": {
|
|
1099
|
+
"type": [
|
|
1100
|
+
"string",
|
|
1101
|
+
"null"
|
|
1102
|
+
],
|
|
1103
|
+
"description": "The transaction that the Lustro interceptor recorded for this request; null when the sender's client has no Lustro interceptor, or the request was not captured."
|
|
1104
|
+
},
|
|
1105
|
+
"sender": {
|
|
1106
|
+
"type": "string",
|
|
1107
|
+
"description": "The name of the sender that sent the request. Since 1.7."
|
|
1108
|
+
},
|
|
1109
|
+
"url": {
|
|
1110
|
+
"type": "string",
|
|
1111
|
+
"description": "The URL the request went to, after a relative url was resolved. Since 1.7."
|
|
1112
|
+
},
|
|
1113
|
+
"statusCode": {
|
|
1114
|
+
"type": [
|
|
1115
|
+
"integer",
|
|
1116
|
+
"null"
|
|
1117
|
+
],
|
|
1118
|
+
"description": "The response status; 0 when ok is false."
|
|
1119
|
+
},
|
|
1120
|
+
"ok": {
|
|
1121
|
+
"type": "boolean",
|
|
1122
|
+
"description": "true when a response came back, whatever its status; false when the call failed, and error says why."
|
|
1123
|
+
},
|
|
1124
|
+
"error": {
|
|
1125
|
+
"type": "string"
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
},
|
|
1132
|
+
"400": {
|
|
1133
|
+
"$ref": "#/components/responses/Error"
|
|
1134
|
+
},
|
|
1135
|
+
"401": {
|
|
1136
|
+
"$ref": "#/components/responses/Error"
|
|
1137
|
+
},
|
|
1138
|
+
"403": {
|
|
1139
|
+
"$ref": "#/components/responses/Error"
|
|
1140
|
+
},
|
|
1141
|
+
"413": {
|
|
1142
|
+
"$ref": "#/components/responses/Error"
|
|
1143
|
+
},
|
|
1144
|
+
"503": {
|
|
1145
|
+
"$ref": "#/components/responses/Error"
|
|
1146
|
+
},
|
|
1147
|
+
"504": {
|
|
1148
|
+
"$ref": "#/components/responses/Error"
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
},
|
|
1154
|
+
"components": {
|
|
1155
|
+
"responses": {
|
|
1156
|
+
"Error": {
|
|
1157
|
+
"description": "Error envelope.",
|
|
1158
|
+
"content": {
|
|
1159
|
+
"application/json": {
|
|
1160
|
+
"schema": {
|
|
1161
|
+
"$ref": "#/components/schemas/ErrorEnvelope"
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
},
|
|
1167
|
+
"schemas": {
|
|
1168
|
+
"ErrorEnvelope": {
|
|
1169
|
+
"type": "object",
|
|
1170
|
+
"required": [
|
|
1171
|
+
"error",
|
|
1172
|
+
"message"
|
|
1173
|
+
],
|
|
1174
|
+
"properties": {
|
|
1175
|
+
"error": {
|
|
1176
|
+
"type": "string",
|
|
1177
|
+
"enum": [
|
|
1178
|
+
"bad_request",
|
|
1179
|
+
"unauthorized",
|
|
1180
|
+
"forbidden",
|
|
1181
|
+
"not_found",
|
|
1182
|
+
"method_not_allowed",
|
|
1183
|
+
"conflict",
|
|
1184
|
+
"payload_too_large",
|
|
1185
|
+
"unprocessable_entity",
|
|
1186
|
+
"too_many_requests",
|
|
1187
|
+
"internal_error",
|
|
1188
|
+
"unavailable",
|
|
1189
|
+
"timeout",
|
|
1190
|
+
"error"
|
|
1191
|
+
],
|
|
1192
|
+
"description": "Machine error type, e.g. bad_request, not_found, timeout."
|
|
1193
|
+
},
|
|
1194
|
+
"message": {
|
|
1195
|
+
"type": "string"
|
|
1196
|
+
},
|
|
1197
|
+
"code": {
|
|
1198
|
+
"type": "string"
|
|
1199
|
+
},
|
|
1200
|
+
"field": {
|
|
1201
|
+
"type": "string"
|
|
1202
|
+
},
|
|
1203
|
+
"hint": {
|
|
1204
|
+
"type": "string"
|
|
1205
|
+
}
|
|
1206
|
+
},
|
|
1207
|
+
"additionalProperties": false
|
|
1208
|
+
},
|
|
1209
|
+
"TransactionCursorEnvelope": {
|
|
1210
|
+
"type": "object",
|
|
1211
|
+
"required": [
|
|
1212
|
+
"cursor",
|
|
1213
|
+
"status"
|
|
1214
|
+
],
|
|
1215
|
+
"properties": {
|
|
1216
|
+
"cursor": {
|
|
1217
|
+
"type": "string",
|
|
1218
|
+
"description": "Opaque cursor token."
|
|
1219
|
+
},
|
|
1220
|
+
"status": {
|
|
1221
|
+
"type": "string",
|
|
1222
|
+
"enum": [
|
|
1223
|
+
"delta",
|
|
1224
|
+
"unchanged",
|
|
1225
|
+
"reset"
|
|
1226
|
+
]
|
|
1227
|
+
},
|
|
1228
|
+
"items": {
|
|
1229
|
+
"type": "array",
|
|
1230
|
+
"items": {
|
|
1231
|
+
"$ref": "#/components/schemas/Transaction"
|
|
1232
|
+
}
|
|
1233
|
+
},
|
|
1234
|
+
"state": {
|
|
1235
|
+
"type": "object",
|
|
1236
|
+
"description": "Capture controls, sent with every response, unchanged ones included.",
|
|
1237
|
+
"properties": {
|
|
1238
|
+
"paused": {
|
|
1239
|
+
"type": "boolean"
|
|
1240
|
+
},
|
|
1241
|
+
"overwriteMode": {
|
|
1242
|
+
"type": "boolean"
|
|
1243
|
+
},
|
|
1244
|
+
"throttleDelayMs": {
|
|
1245
|
+
"type": "integer"
|
|
1246
|
+
},
|
|
1247
|
+
"mockRules": {
|
|
1248
|
+
"type": "object",
|
|
1249
|
+
"description": "The mock rules, in short. Since protocol 1.9.",
|
|
1250
|
+
"required": [
|
|
1251
|
+
"enabled",
|
|
1252
|
+
"revision"
|
|
1253
|
+
],
|
|
1254
|
+
"properties": {
|
|
1255
|
+
"enabled": {
|
|
1256
|
+
"type": "integer",
|
|
1257
|
+
"minimum": 0,
|
|
1258
|
+
"description": "How many rules are enabled."
|
|
1259
|
+
},
|
|
1260
|
+
"revision": {
|
|
1261
|
+
"type": "integer",
|
|
1262
|
+
"description": "Changes when a rule is added, edited, deleted, enabled, or disabled, and on a sync; a hit leaves it as it is. When it differs from the last one you saw, GET rules again."
|
|
1263
|
+
}
|
|
1264
|
+
},
|
|
1265
|
+
"additionalProperties": false
|
|
1266
|
+
},
|
|
1267
|
+
"captureFilter": {
|
|
1268
|
+
"type": [
|
|
1269
|
+
"object",
|
|
1270
|
+
"null"
|
|
1271
|
+
],
|
|
1272
|
+
"description": "The capture filter the app set in its code, or null when it set none. The counts start again on clear.",
|
|
1273
|
+
"required": [
|
|
1274
|
+
"description",
|
|
1275
|
+
"skipped",
|
|
1276
|
+
"failed"
|
|
1277
|
+
],
|
|
1278
|
+
"properties": {
|
|
1279
|
+
"description": {
|
|
1280
|
+
"type": "string",
|
|
1281
|
+
"description": "What the filter leaves out, as the app describes it."
|
|
1282
|
+
},
|
|
1283
|
+
"skipped": {
|
|
1284
|
+
"type": "integer",
|
|
1285
|
+
"minimum": 0,
|
|
1286
|
+
"description": "Requests the filter left out of the list."
|
|
1287
|
+
},
|
|
1288
|
+
"failed": {
|
|
1289
|
+
"type": "integer",
|
|
1290
|
+
"minimum": 0,
|
|
1291
|
+
"description": "Requests the filter threw on. They were captured."
|
|
1292
|
+
}
|
|
1293
|
+
},
|
|
1294
|
+
"additionalProperties": false
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
},
|
|
1300
|
+
"Transaction": {
|
|
1301
|
+
"type": "object",
|
|
1302
|
+
"required": [
|
|
1303
|
+
"id",
|
|
1304
|
+
"method",
|
|
1305
|
+
"url"
|
|
1306
|
+
],
|
|
1307
|
+
"properties": {
|
|
1308
|
+
"id": {
|
|
1309
|
+
"type": "string"
|
|
1310
|
+
},
|
|
1311
|
+
"timestamp": {
|
|
1312
|
+
"type": "string",
|
|
1313
|
+
"description": "When the request started, as HH:mm:ss.SSS in the device's time zone. For display; sort and correlate by startedAt."
|
|
1314
|
+
},
|
|
1315
|
+
"startedAt": {
|
|
1316
|
+
"type": "integer",
|
|
1317
|
+
"description": "When the request started, in milliseconds since the Unix epoch."
|
|
1318
|
+
},
|
|
1319
|
+
"completedAt": {
|
|
1320
|
+
"type": [
|
|
1321
|
+
"integer",
|
|
1322
|
+
"null"
|
|
1323
|
+
],
|
|
1324
|
+
"description": "When the capture recorded the response as complete, or the request as failed, in milliseconds since the Unix epoch; null while in flight. A response stays in flight while the app reads a body that capture did not read whole, such as a download, a body past the capture cap, or a stream, until the app reads to its end or closes it. It can differ from startedAt plus durationMs by the time the capture took to record it."
|
|
1325
|
+
},
|
|
1326
|
+
"method": {
|
|
1327
|
+
"type": "string"
|
|
1328
|
+
},
|
|
1329
|
+
"url": {
|
|
1330
|
+
"type": "string",
|
|
1331
|
+
"description": "The URL the app requested. Redacted at capture time."
|
|
1332
|
+
},
|
|
1333
|
+
"finalUrl": {
|
|
1334
|
+
"type": [
|
|
1335
|
+
"string",
|
|
1336
|
+
"null"
|
|
1337
|
+
],
|
|
1338
|
+
"description": "The URL the response came from, when it isn't url: after the client followed a redirect, or after an OkHttp interceptor added after Lustro's rewrote the URL. null otherwise, and while in flight. Redacted at capture time. Since protocol 1.5."
|
|
1339
|
+
},
|
|
1340
|
+
"protocol": {
|
|
1341
|
+
"type": [
|
|
1342
|
+
"string",
|
|
1343
|
+
"null"
|
|
1344
|
+
],
|
|
1345
|
+
"description": "The protocol the response came over, as the HTTP client names it, e.g. http/1.1, h2, or h3. null when unknown: before a response, and for a mocked response. Platform HttpURLConnection capture reads it from X-Android-Selected-Protocol, a header the platform adds to the response, since protocol 1.6, and leaves out the platform's X-Android-* headers from responseHeaders."
|
|
1346
|
+
},
|
|
1347
|
+
"statusCode": {
|
|
1348
|
+
"type": [
|
|
1349
|
+
"integer",
|
|
1350
|
+
"null"
|
|
1351
|
+
]
|
|
1352
|
+
},
|
|
1353
|
+
"durationMs": {
|
|
1354
|
+
"type": [
|
|
1355
|
+
"integer",
|
|
1356
|
+
"null"
|
|
1357
|
+
],
|
|
1358
|
+
"description": "How long the request took from when it was sent, without the time the global throttle held it before that (see throttledMs). For a body the app reads after capture, such as a download, it runs until the app read to the end of the body or closed it, and while the body arrives it is the time to the headers. null before a response."
|
|
1359
|
+
},
|
|
1360
|
+
"throttledMs": {
|
|
1361
|
+
"type": [
|
|
1362
|
+
"integer",
|
|
1363
|
+
"null"
|
|
1364
|
+
],
|
|
1365
|
+
"description": "How long the global throttle held the request before it was sent, in milliseconds, or null when it wasn't throttled. The request is listed, with startedAt, from when the app made the call. Since protocol 1.4."
|
|
1366
|
+
},
|
|
1367
|
+
"categories": {
|
|
1368
|
+
"type": "array",
|
|
1369
|
+
"items": {
|
|
1370
|
+
"type": "string"
|
|
1371
|
+
},
|
|
1372
|
+
"description": "Labels from the configured NetworkClassifier (may be empty)."
|
|
1373
|
+
},
|
|
1374
|
+
"isMocked": {
|
|
1375
|
+
"type": "boolean"
|
|
1376
|
+
},
|
|
1377
|
+
"mockRuleId": {
|
|
1378
|
+
"type": [
|
|
1379
|
+
"string",
|
|
1380
|
+
"null"
|
|
1381
|
+
],
|
|
1382
|
+
"description": "The id of the mock rule that produced the response, as recorded when the request was answered: the rule can have changed or been deleted since. null when the response isn't mocked, and when an app's adapter reported it with mocked(true) instead of mockedBy(rule). Since protocol 1.9. Since protocol 1.12, also the rule that failed the request: a failure rule, or a rule that the interceptor could not serve. Such a transaction has isMocked true, error set, and statusCode null."
|
|
1383
|
+
},
|
|
1384
|
+
"activeMockRuleId": {
|
|
1385
|
+
"type": [
|
|
1386
|
+
"string",
|
|
1387
|
+
"null"
|
|
1388
|
+
],
|
|
1389
|
+
"description": "The id of the mock rule that answers the next request with this method and URL: the first enabled rule that matches, as the interceptor tries them. It is worked out when the transaction is listed, so it follows the rules as they change, also for a request captured before the rule existed, and a change to the rules advances the list's cursor. The rules are matched against the URL as captured, which is redacted, so a pattern that names a redacted value doesn't match here. null when no enabled rule matches, and for a platform transaction, which no rule answers; for an app transaction, the rule answers only if the app's adapter asks for it. Since protocol 1.9."
|
|
1390
|
+
},
|
|
1391
|
+
"replacedCount": {
|
|
1392
|
+
"type": "integer",
|
|
1393
|
+
"minimum": 0,
|
|
1394
|
+
"description": "How many earlier copies of this request overwrite mode removed when the app sent it: the completed transactions with the same method and URL path that started before it, each counted with the copies it had replaced in turn. 0 when it replaced none, as when overwrite mode is off. Since protocol 1.10."
|
|
1395
|
+
},
|
|
1396
|
+
"source": {
|
|
1397
|
+
"type": "string",
|
|
1398
|
+
"enum": [
|
|
1399
|
+
"okhttp",
|
|
1400
|
+
"platform",
|
|
1401
|
+
"app"
|
|
1402
|
+
],
|
|
1403
|
+
"description": "The adapter that captured the request. okhttp: Lustro's OkHttp interceptor, where mock rules and the throttle apply. platform: platform HttpURLConnection capture, which only records, so no mock rule answers the request and the throttle doesn't hold it. app: the app's own adapter, through Lustro.networkCaptureSink(), where a mock rule applies only if the adapter asks for it, and the throttle doesn't. Since protocol 1.6; treat a value you don't know as one that no mock rule or throttle reaches."
|
|
1404
|
+
},
|
|
1405
|
+
"requestContentType": {
|
|
1406
|
+
"type": [
|
|
1407
|
+
"string",
|
|
1408
|
+
"null"
|
|
1409
|
+
],
|
|
1410
|
+
"description": "The request's media type as captured, e.g. application/json; charset=utf-8. null when the request declares none."
|
|
1411
|
+
},
|
|
1412
|
+
"responseContentType": {
|
|
1413
|
+
"type": [
|
|
1414
|
+
"string",
|
|
1415
|
+
"null"
|
|
1416
|
+
],
|
|
1417
|
+
"description": "The response's Content-Type as captured, e.g. application/json; charset=utf-8. null before a response, and when the header is missing or isn't a media type."
|
|
1418
|
+
},
|
|
1419
|
+
"requestBodyBytes": {
|
|
1420
|
+
"type": [
|
|
1421
|
+
"integer",
|
|
1422
|
+
"null"
|
|
1423
|
+
],
|
|
1424
|
+
"description": "Size of the request body on the wire, before a gzip or deflate Content-Encoding is inflated; null when not known."
|
|
1425
|
+
},
|
|
1426
|
+
"responseBodyBytes": {
|
|
1427
|
+
"type": [
|
|
1428
|
+
"integer",
|
|
1429
|
+
"null"
|
|
1430
|
+
],
|
|
1431
|
+
"description": "Size of the response body on the wire, before a gzip or deflate Content-Encoding is inflated; null when not known."
|
|
1432
|
+
},
|
|
1433
|
+
"responseComplete": {
|
|
1434
|
+
"type": "boolean",
|
|
1435
|
+
"description": "false while the request is in flight, which includes a response whose body the app is still reading. A body that fails while the app reads it sets error and keeps statusCode."
|
|
1436
|
+
},
|
|
1437
|
+
"webSocketId": {
|
|
1438
|
+
"type": [
|
|
1439
|
+
"string",
|
|
1440
|
+
"null"
|
|
1441
|
+
],
|
|
1442
|
+
"description": "Set on the handshake of a WebSocket that is listed under websockets: the id of that connection. null for every other transaction, and once the connection is cleared or evicted."
|
|
1443
|
+
},
|
|
1444
|
+
"error": {
|
|
1445
|
+
"type": [
|
|
1446
|
+
"string",
|
|
1447
|
+
"null"
|
|
1448
|
+
]
|
|
1449
|
+
},
|
|
1450
|
+
"requestHeaders": {
|
|
1451
|
+
"type": "object",
|
|
1452
|
+
"additionalProperties": {
|
|
1453
|
+
"type": "string"
|
|
1454
|
+
}
|
|
1455
|
+
},
|
|
1456
|
+
"requestBody": {
|
|
1457
|
+
"type": [
|
|
1458
|
+
"string",
|
|
1459
|
+
"null"
|
|
1460
|
+
],
|
|
1461
|
+
"description": "The body as redacted text. A gzip or deflate body is stored inflated; one in another Content-Encoding, such as br, is null. A multipart body is stored as multipart text: each part's headers and the value of a text part, and for any other part, such as a file, the line [Lustro did not store this part: <type>, <n> bytes] in place of its content."
|
|
1462
|
+
},
|
|
1463
|
+
"requestBodyTruncated": {
|
|
1464
|
+
"type": "boolean"
|
|
1465
|
+
},
|
|
1466
|
+
"requestBodyBinary": {
|
|
1467
|
+
"type": "boolean",
|
|
1468
|
+
"description": "Detail only. true when the request body was kept as bytes, as it arrived, because the Redactor can't read it: an image. requestBody is then null; fetch the bytes from GET transactions/{id}/body/request."
|
|
1469
|
+
},
|
|
1470
|
+
"responseHeaders": {
|
|
1471
|
+
"type": [
|
|
1472
|
+
"object",
|
|
1473
|
+
"null"
|
|
1474
|
+
],
|
|
1475
|
+
"additionalProperties": {
|
|
1476
|
+
"type": "string"
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1479
|
+
"responseBody": {
|
|
1480
|
+
"type": [
|
|
1481
|
+
"string",
|
|
1482
|
+
"null"
|
|
1483
|
+
],
|
|
1484
|
+
"description": "The body as redacted text. A gzip or deflate body is stored inflated; one in another Content-Encoding, such as br, is null."
|
|
1485
|
+
},
|
|
1486
|
+
"responseBodyTruncated": {
|
|
1487
|
+
"type": "boolean"
|
|
1488
|
+
},
|
|
1489
|
+
"responseBodyBinary": {
|
|
1490
|
+
"type": "boolean",
|
|
1491
|
+
"description": "Detail only. true when the response body was kept as bytes, as it arrived, because the Redactor can't read it: an image. responseBody is then null; fetch the bytes from GET transactions/{id}/body/response."
|
|
1492
|
+
},
|
|
1493
|
+
"matchingMockRuleIds": {
|
|
1494
|
+
"type": "array",
|
|
1495
|
+
"items": {
|
|
1496
|
+
"type": "string"
|
|
1497
|
+
},
|
|
1498
|
+
"description": "Detail only. The ids of the mock rules whose urlPattern and method match this request, enabled or not, in the order they are tried; the first enabled one is activeMockRuleId. Matched as activeMockRuleId is, and empty for a platform transaction. Since protocol 1.9."
|
|
1499
|
+
},
|
|
1500
|
+
"priorResponses": {
|
|
1501
|
+
"type": "array",
|
|
1502
|
+
"items": {
|
|
1503
|
+
"$ref": "#/components/schemas/PriorResponse"
|
|
1504
|
+
},
|
|
1505
|
+
"description": "Detail only. The responses the client answered with another request before the final one, oldest first: the redirects OkHttp followed and the authentication challenges it answered. The first one's url is url, and the response came from finalUrl. Empty when there were none, and for platform HttpURLConnection capture, which reports only finalUrl. Since protocol 1.5."
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
},
|
|
1509
|
+
"PriorResponse": {
|
|
1510
|
+
"type": "object",
|
|
1511
|
+
"required": [
|
|
1512
|
+
"url",
|
|
1513
|
+
"statusCode"
|
|
1514
|
+
],
|
|
1515
|
+
"properties": {
|
|
1516
|
+
"url": {
|
|
1517
|
+
"type": "string",
|
|
1518
|
+
"description": "The URL of the request this response answered. Redacted at capture time."
|
|
1519
|
+
},
|
|
1520
|
+
"statusCode": {
|
|
1521
|
+
"type": "integer",
|
|
1522
|
+
"description": "Such as 301 for a redirect, or 401 for an authentication challenge."
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1525
|
+
"additionalProperties": false
|
|
1526
|
+
},
|
|
1527
|
+
"WebSocketCursorEnvelope": {
|
|
1528
|
+
"type": "object",
|
|
1529
|
+
"required": [
|
|
1530
|
+
"cursor",
|
|
1531
|
+
"status"
|
|
1532
|
+
],
|
|
1533
|
+
"properties": {
|
|
1534
|
+
"cursor": {
|
|
1535
|
+
"type": "string",
|
|
1536
|
+
"description": "Opaque cursor token."
|
|
1537
|
+
},
|
|
1538
|
+
"status": {
|
|
1539
|
+
"type": "string",
|
|
1540
|
+
"enum": [
|
|
1541
|
+
"delta",
|
|
1542
|
+
"unchanged",
|
|
1543
|
+
"reset"
|
|
1544
|
+
]
|
|
1545
|
+
},
|
|
1546
|
+
"items": {
|
|
1547
|
+
"type": "array",
|
|
1548
|
+
"items": {
|
|
1549
|
+
"$ref": "#/components/schemas/WebSocketConnection"
|
|
1550
|
+
},
|
|
1551
|
+
"description": "Newest first."
|
|
1552
|
+
},
|
|
1553
|
+
"state": {
|
|
1554
|
+
"$ref": "#/components/schemas/TransactionCursorEnvelope/properties/state"
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
},
|
|
1558
|
+
"WebSocketConnection": {
|
|
1559
|
+
"type": "object",
|
|
1560
|
+
"required": [
|
|
1561
|
+
"id",
|
|
1562
|
+
"url",
|
|
1563
|
+
"state"
|
|
1564
|
+
],
|
|
1565
|
+
"properties": {
|
|
1566
|
+
"id": {
|
|
1567
|
+
"type": "string"
|
|
1568
|
+
},
|
|
1569
|
+
"url": {
|
|
1570
|
+
"type": "string",
|
|
1571
|
+
"description": "The URL the app asked for, with the ws or wss scheme. Redacted at capture time. The handshake transaction has the same URL with http or https, as OkHttp holds it."
|
|
1572
|
+
},
|
|
1573
|
+
"state": {
|
|
1574
|
+
"type": "string",
|
|
1575
|
+
"enum": [
|
|
1576
|
+
"connecting",
|
|
1577
|
+
"open",
|
|
1578
|
+
"closing",
|
|
1579
|
+
"closed",
|
|
1580
|
+
"failed"
|
|
1581
|
+
],
|
|
1582
|
+
"description": "connecting until the handshake response arrives; closing once either side sent a close frame; closed after both did; failed after an error, a refused handshake, or cancel()."
|
|
1583
|
+
},
|
|
1584
|
+
"timestamp": {
|
|
1585
|
+
"type": "string",
|
|
1586
|
+
"description": "startedAt as HH:mm:ss.SSS in the device's time zone. For display; sort and correlate by startedAt."
|
|
1587
|
+
},
|
|
1588
|
+
"startedAt": {
|
|
1589
|
+
"type": "integer",
|
|
1590
|
+
"description": "When the app created the socket, in milliseconds since the Unix epoch."
|
|
1591
|
+
},
|
|
1592
|
+
"openedAt": {
|
|
1593
|
+
"type": [
|
|
1594
|
+
"integer",
|
|
1595
|
+
"null"
|
|
1596
|
+
],
|
|
1597
|
+
"description": "When the handshake response arrived; null before that, and for a socket that never opened."
|
|
1598
|
+
},
|
|
1599
|
+
"closedAt": {
|
|
1600
|
+
"type": [
|
|
1601
|
+
"integer",
|
|
1602
|
+
"null"
|
|
1603
|
+
],
|
|
1604
|
+
"description": "When the socket closed or failed; null before that."
|
|
1605
|
+
},
|
|
1606
|
+
"statusCode": {
|
|
1607
|
+
"type": [
|
|
1608
|
+
"integer",
|
|
1609
|
+
"null"
|
|
1610
|
+
],
|
|
1611
|
+
"description": "The status of the handshake response: 101, or the status of the response that refused the upgrade. null before a response, and when the socket failed without one."
|
|
1612
|
+
},
|
|
1613
|
+
"closeCode": {
|
|
1614
|
+
"type": [
|
|
1615
|
+
"integer",
|
|
1616
|
+
"null"
|
|
1617
|
+
],
|
|
1618
|
+
"description": "The close code the server sent, or null when it sent none."
|
|
1619
|
+
},
|
|
1620
|
+
"closeReason": {
|
|
1621
|
+
"type": [
|
|
1622
|
+
"string",
|
|
1623
|
+
"null"
|
|
1624
|
+
]
|
|
1625
|
+
},
|
|
1626
|
+
"closedBy": {
|
|
1627
|
+
"type": [
|
|
1628
|
+
"string",
|
|
1629
|
+
"null"
|
|
1630
|
+
],
|
|
1631
|
+
"enum": [
|
|
1632
|
+
"app",
|
|
1633
|
+
"server",
|
|
1634
|
+
null
|
|
1635
|
+
],
|
|
1636
|
+
"description": "Whose close frame came first; null when neither side sent one."
|
|
1637
|
+
},
|
|
1638
|
+
"canceled": {
|
|
1639
|
+
"type": "boolean",
|
|
1640
|
+
"description": "true when the app called cancel() before the socket ended. OkHttp then fails the socket, so state is failed."
|
|
1641
|
+
},
|
|
1642
|
+
"error": {
|
|
1643
|
+
"type": [
|
|
1644
|
+
"string",
|
|
1645
|
+
"null"
|
|
1646
|
+
],
|
|
1647
|
+
"description": "For a failed socket: the exception it ended with, as class and message. Stored as it is, not redacted."
|
|
1648
|
+
},
|
|
1649
|
+
"transactionId": {
|
|
1650
|
+
"type": [
|
|
1651
|
+
"string",
|
|
1652
|
+
"null"
|
|
1653
|
+
],
|
|
1654
|
+
"description": "The handshake's transaction, when the interceptor on the same client captured it; else null."
|
|
1655
|
+
},
|
|
1656
|
+
"categories": {
|
|
1657
|
+
"type": "array",
|
|
1658
|
+
"items": {
|
|
1659
|
+
"type": "string"
|
|
1660
|
+
},
|
|
1661
|
+
"description": "Labels from the configured NetworkClassifier (may be empty)."
|
|
1662
|
+
},
|
|
1663
|
+
"sentCount": {
|
|
1664
|
+
"type": "integer",
|
|
1665
|
+
"minimum": 0,
|
|
1666
|
+
"description": "Messages the app sent since the connection was listed. A message that send() refused is not counted."
|
|
1667
|
+
},
|
|
1668
|
+
"sentBytes": {
|
|
1669
|
+
"type": "integer",
|
|
1670
|
+
"minimum": 0,
|
|
1671
|
+
"description": "The payload bytes of those messages."
|
|
1672
|
+
},
|
|
1673
|
+
"receivedCount": {
|
|
1674
|
+
"type": "integer",
|
|
1675
|
+
"minimum": 0,
|
|
1676
|
+
"description": "Messages the app received since the connection was listed."
|
|
1677
|
+
},
|
|
1678
|
+
"receivedBytes": {
|
|
1679
|
+
"type": "integer",
|
|
1680
|
+
"minimum": 0
|
|
1681
|
+
},
|
|
1682
|
+
"storedEvents": {
|
|
1683
|
+
"type": "integer",
|
|
1684
|
+
"minimum": 0,
|
|
1685
|
+
"description": "Events in the log now."
|
|
1686
|
+
},
|
|
1687
|
+
"evictedEvents": {
|
|
1688
|
+
"type": "integer",
|
|
1689
|
+
"minimum": 0,
|
|
1690
|
+
"description": "Events the log dropped at its limits, oldest first. They are still in the counts."
|
|
1691
|
+
},
|
|
1692
|
+
"droppedEvents": {
|
|
1693
|
+
"type": "integer",
|
|
1694
|
+
"minimum": 0,
|
|
1695
|
+
"description": "Messages that were never stored, because capture was behind. They are in no count."
|
|
1696
|
+
},
|
|
1697
|
+
"protocol": {
|
|
1698
|
+
"type": [
|
|
1699
|
+
"string",
|
|
1700
|
+
"null"
|
|
1701
|
+
],
|
|
1702
|
+
"description": "Detail only. The protocol of the handshake response, http/1.1."
|
|
1703
|
+
},
|
|
1704
|
+
"requestHeaders": {
|
|
1705
|
+
"type": "object",
|
|
1706
|
+
"additionalProperties": {
|
|
1707
|
+
"type": "string"
|
|
1708
|
+
},
|
|
1709
|
+
"description": "Detail only. The headers the app set on the request, redacted. The handshake transaction also has the headers OkHttp adds."
|
|
1710
|
+
},
|
|
1711
|
+
"responseHeaders": {
|
|
1712
|
+
"type": [
|
|
1713
|
+
"object",
|
|
1714
|
+
"null"
|
|
1715
|
+
],
|
|
1716
|
+
"additionalProperties": {
|
|
1717
|
+
"type": "string"
|
|
1718
|
+
},
|
|
1719
|
+
"description": "Detail only. The headers of the handshake response, redacted; null before a response."
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
},
|
|
1723
|
+
"WebSocketEventStreamEnvelope": {
|
|
1724
|
+
"type": "object",
|
|
1725
|
+
"required": [
|
|
1726
|
+
"cursor",
|
|
1727
|
+
"status"
|
|
1728
|
+
],
|
|
1729
|
+
"properties": {
|
|
1730
|
+
"cursor": {
|
|
1731
|
+
"type": "string",
|
|
1732
|
+
"description": "Opaque cursor token."
|
|
1733
|
+
},
|
|
1734
|
+
"status": {
|
|
1735
|
+
"type": "string",
|
|
1736
|
+
"enum": [
|
|
1737
|
+
"delta",
|
|
1738
|
+
"unchanged",
|
|
1739
|
+
"reset"
|
|
1740
|
+
]
|
|
1741
|
+
},
|
|
1742
|
+
"items": {
|
|
1743
|
+
"type": "array",
|
|
1744
|
+
"items": {
|
|
1745
|
+
"$ref": "#/components/schemas/WebSocketEvent"
|
|
1746
|
+
},
|
|
1747
|
+
"description": "Oldest first. For reset, the last events of the log; for delta, the events after the cursor."
|
|
1748
|
+
},
|
|
1749
|
+
"dropped": {
|
|
1750
|
+
"type": "integer",
|
|
1751
|
+
"minimum": 0,
|
|
1752
|
+
"description": "For delta: events the log evicted before this client got them."
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
},
|
|
1756
|
+
"WebSocketEvent": {
|
|
1757
|
+
"type": "object",
|
|
1758
|
+
"description": "One entry of a connection's log: a message, or a lifecycle event. An event has only the keys of its kind.",
|
|
1759
|
+
"required": [
|
|
1760
|
+
"seq",
|
|
1761
|
+
"at",
|
|
1762
|
+
"kind"
|
|
1763
|
+
],
|
|
1764
|
+
"properties": {
|
|
1765
|
+
"seq": {
|
|
1766
|
+
"type": "integer",
|
|
1767
|
+
"minimum": 1,
|
|
1768
|
+
"description": "The event's number in its connection, in the order the events happened. A number is never used again, and one can be missing, such as that of a message that was not captured."
|
|
1769
|
+
},
|
|
1770
|
+
"at": {
|
|
1771
|
+
"type": "integer",
|
|
1772
|
+
"description": "When the event happened, in milliseconds since the Unix epoch. For a sent message, when the app called send()."
|
|
1773
|
+
},
|
|
1774
|
+
"timestamp": {
|
|
1775
|
+
"type": "string",
|
|
1776
|
+
"description": "at as HH:mm:ss.SSS in the device's time zone. For display."
|
|
1777
|
+
},
|
|
1778
|
+
"kind": {
|
|
1779
|
+
"type": "string",
|
|
1780
|
+
"enum": [
|
|
1781
|
+
"open",
|
|
1782
|
+
"message",
|
|
1783
|
+
"close",
|
|
1784
|
+
"closed",
|
|
1785
|
+
"cancel",
|
|
1786
|
+
"failure"
|
|
1787
|
+
],
|
|
1788
|
+
"description": "open = the handshake response arrived. message = a text or binary message. close = a close frame: with direction sent, the app called close(); with direction received, the server's frame arrived. closed = both sides closed. cancel = the app called cancel(). failure = the socket failed."
|
|
1789
|
+
},
|
|
1790
|
+
"direction": {
|
|
1791
|
+
"type": "string",
|
|
1792
|
+
"enum": [
|
|
1793
|
+
"sent",
|
|
1794
|
+
"received"
|
|
1795
|
+
],
|
|
1796
|
+
"description": "For message and close."
|
|
1797
|
+
},
|
|
1798
|
+
"type": {
|
|
1799
|
+
"type": "string",
|
|
1800
|
+
"enum": [
|
|
1801
|
+
"text",
|
|
1802
|
+
"binary"
|
|
1803
|
+
],
|
|
1804
|
+
"description": "For message."
|
|
1805
|
+
},
|
|
1806
|
+
"payloadBytes": {
|
|
1807
|
+
"type": "integer",
|
|
1808
|
+
"minimum": 0,
|
|
1809
|
+
"description": "For message: the size of the whole payload, in UTF-8 for text, also when only its first part is stored."
|
|
1810
|
+
},
|
|
1811
|
+
"stored": {
|
|
1812
|
+
"type": "boolean",
|
|
1813
|
+
"description": "For message: false when no payload is stored, because the app's Redactor left it out or failed on it."
|
|
1814
|
+
},
|
|
1815
|
+
"truncated": {
|
|
1816
|
+
"type": "boolean",
|
|
1817
|
+
"description": "For message: true when the payload passed the capture cap, so only its first part is stored."
|
|
1818
|
+
},
|
|
1819
|
+
"preview": {
|
|
1820
|
+
"type": "string",
|
|
1821
|
+
"description": "For a text message with a stored payload: its first 512 characters, redacted."
|
|
1822
|
+
},
|
|
1823
|
+
"previewComplete": {
|
|
1824
|
+
"type": "boolean",
|
|
1825
|
+
"description": "With preview: true when it is the whole stored text. When false, GET websockets/{id}/events/{seq}/payload has all of it."
|
|
1826
|
+
},
|
|
1827
|
+
"hexPreview": {
|
|
1828
|
+
"type": "string",
|
|
1829
|
+
"description": "For a binary message with a stored payload: its first 32 bytes in hexadecimal. The Redactor's default stores a binary payload as it arrived."
|
|
1830
|
+
},
|
|
1831
|
+
"enqueued": {
|
|
1832
|
+
"type": "boolean",
|
|
1833
|
+
"description": "For a sent message and a sent close: what send() or close() returned. true means that OkHttp queued it, which does not show that the server received it. false means that OkHttp refused it, so it was not sent."
|
|
1834
|
+
},
|
|
1835
|
+
"code": {
|
|
1836
|
+
"type": [
|
|
1837
|
+
"integer",
|
|
1838
|
+
"null"
|
|
1839
|
+
],
|
|
1840
|
+
"description": "For close and closed: the close code."
|
|
1841
|
+
},
|
|
1842
|
+
"reason": {
|
|
1843
|
+
"type": [
|
|
1844
|
+
"string",
|
|
1845
|
+
"null"
|
|
1846
|
+
],
|
|
1847
|
+
"description": "For close and closed: the close reason."
|
|
1848
|
+
},
|
|
1849
|
+
"statusCode": {
|
|
1850
|
+
"type": [
|
|
1851
|
+
"integer",
|
|
1852
|
+
"null"
|
|
1853
|
+
],
|
|
1854
|
+
"description": "For open: the status of the handshake response. For failure: the status of a response that refused the upgrade, or null."
|
|
1855
|
+
},
|
|
1856
|
+
"error": {
|
|
1857
|
+
"type": [
|
|
1858
|
+
"string",
|
|
1859
|
+
"null"
|
|
1860
|
+
],
|
|
1861
|
+
"description": "For failure: the exception, as class and message."
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
},
|
|
1865
|
+
"HarDocument": {
|
|
1866
|
+
"type": "object",
|
|
1867
|
+
"description": "A HAR 1.2 document. Only the parts the export writes are described; the HAR 1.2 specification describes the rest.",
|
|
1868
|
+
"required": [
|
|
1869
|
+
"log"
|
|
1870
|
+
],
|
|
1871
|
+
"properties": {
|
|
1872
|
+
"log": {
|
|
1873
|
+
"type": "object",
|
|
1874
|
+
"required": [
|
|
1875
|
+
"version",
|
|
1876
|
+
"creator",
|
|
1877
|
+
"entries"
|
|
1878
|
+
],
|
|
1879
|
+
"properties": {
|
|
1880
|
+
"version": {
|
|
1881
|
+
"const": "1.2"
|
|
1882
|
+
},
|
|
1883
|
+
"creator": {
|
|
1884
|
+
"type": "object",
|
|
1885
|
+
"required": [
|
|
1886
|
+
"name",
|
|
1887
|
+
"version"
|
|
1888
|
+
],
|
|
1889
|
+
"properties": {
|
|
1890
|
+
"name": {
|
|
1891
|
+
"const": "Lustro"
|
|
1892
|
+
},
|
|
1893
|
+
"version": {
|
|
1894
|
+
"type": "string",
|
|
1895
|
+
"description": "The library version."
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
},
|
|
1899
|
+
"entries": {
|
|
1900
|
+
"type": "array",
|
|
1901
|
+
"items": {
|
|
1902
|
+
"$ref": "#/components/schemas/HarEntry"
|
|
1903
|
+
},
|
|
1904
|
+
"description": "Oldest first."
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
},
|
|
1910
|
+
"HarEntry": {
|
|
1911
|
+
"type": "object",
|
|
1912
|
+
"required": [
|
|
1913
|
+
"startedDateTime",
|
|
1914
|
+
"time",
|
|
1915
|
+
"request",
|
|
1916
|
+
"response",
|
|
1917
|
+
"cache",
|
|
1918
|
+
"timings",
|
|
1919
|
+
"_resourceType",
|
|
1920
|
+
"_lustro"
|
|
1921
|
+
],
|
|
1922
|
+
"properties": {
|
|
1923
|
+
"startedDateTime": {
|
|
1924
|
+
"type": "string",
|
|
1925
|
+
"description": "startedAt in ISO 8601, in UTC with milliseconds, e.g. 2026-09-28T14:22:09.003Z."
|
|
1926
|
+
},
|
|
1927
|
+
"time": {
|
|
1928
|
+
"type": "integer",
|
|
1929
|
+
"minimum": 0,
|
|
1930
|
+
"description": "durationMs plus throttledMs; 0 while the request is in flight, apart from a throttle it has already waited."
|
|
1931
|
+
},
|
|
1932
|
+
"request": {
|
|
1933
|
+
"type": "object",
|
|
1934
|
+
"required": [
|
|
1935
|
+
"method",
|
|
1936
|
+
"url",
|
|
1937
|
+
"httpVersion",
|
|
1938
|
+
"cookies",
|
|
1939
|
+
"headers",
|
|
1940
|
+
"queryString",
|
|
1941
|
+
"headersSize",
|
|
1942
|
+
"bodySize"
|
|
1943
|
+
],
|
|
1944
|
+
"properties": {
|
|
1945
|
+
"method": {
|
|
1946
|
+
"type": "string"
|
|
1947
|
+
},
|
|
1948
|
+
"url": {
|
|
1949
|
+
"type": "string",
|
|
1950
|
+
"description": "Redacted at capture time."
|
|
1951
|
+
},
|
|
1952
|
+
"httpVersion": {
|
|
1953
|
+
"type": "string",
|
|
1954
|
+
"description": "protocol, e.g. h2; empty when it is null."
|
|
1955
|
+
},
|
|
1956
|
+
"cookies": {
|
|
1957
|
+
"type": "array",
|
|
1958
|
+
"maxItems": 0,
|
|
1959
|
+
"description": "Always empty; the Cookie header is in headers."
|
|
1960
|
+
},
|
|
1961
|
+
"headers": {
|
|
1962
|
+
"type": "array",
|
|
1963
|
+
"items": {
|
|
1964
|
+
"$ref": "#/components/schemas/HarNameValue"
|
|
1965
|
+
}
|
|
1966
|
+
},
|
|
1967
|
+
"queryString": {
|
|
1968
|
+
"type": "array",
|
|
1969
|
+
"items": {
|
|
1970
|
+
"$ref": "#/components/schemas/HarNameValue"
|
|
1971
|
+
},
|
|
1972
|
+
"description": "The URL's query parameters, decoded."
|
|
1973
|
+
},
|
|
1974
|
+
"postData": {
|
|
1975
|
+
"type": "object",
|
|
1976
|
+
"description": "Present when the request body was kept, as text or as bytes.",
|
|
1977
|
+
"required": [
|
|
1978
|
+
"mimeType",
|
|
1979
|
+
"text"
|
|
1980
|
+
],
|
|
1981
|
+
"properties": {
|
|
1982
|
+
"mimeType": {
|
|
1983
|
+
"type": "string",
|
|
1984
|
+
"description": "requestContentType; empty when it is null."
|
|
1985
|
+
},
|
|
1986
|
+
"text": {
|
|
1987
|
+
"type": "string",
|
|
1988
|
+
"description": "The redacted text, or the bytes in base64 when _encoding is base64."
|
|
1989
|
+
},
|
|
1990
|
+
"_encoding": {
|
|
1991
|
+
"const": "base64",
|
|
1992
|
+
"description": "Present when the body was kept as bytes."
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
},
|
|
1996
|
+
"headersSize": {
|
|
1997
|
+
"const": -1
|
|
1998
|
+
},
|
|
1999
|
+
"bodySize": {
|
|
2000
|
+
"type": "integer",
|
|
2001
|
+
"description": "requestBodyBytes; -1 when it is null."
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
},
|
|
2005
|
+
"response": {
|
|
2006
|
+
"type": "object",
|
|
2007
|
+
"required": [
|
|
2008
|
+
"status",
|
|
2009
|
+
"statusText",
|
|
2010
|
+
"httpVersion",
|
|
2011
|
+
"cookies",
|
|
2012
|
+
"headers",
|
|
2013
|
+
"content",
|
|
2014
|
+
"redirectURL",
|
|
2015
|
+
"headersSize",
|
|
2016
|
+
"bodySize"
|
|
2017
|
+
],
|
|
2018
|
+
"properties": {
|
|
2019
|
+
"status": {
|
|
2020
|
+
"type": "integer",
|
|
2021
|
+
"description": "statusCode; 0 before a response and for a failed request."
|
|
2022
|
+
},
|
|
2023
|
+
"statusText": {
|
|
2024
|
+
"const": "",
|
|
2025
|
+
"description": "The capture keeps no reason phrase."
|
|
2026
|
+
},
|
|
2027
|
+
"httpVersion": {
|
|
2028
|
+
"type": "string"
|
|
2029
|
+
},
|
|
2030
|
+
"cookies": {
|
|
2031
|
+
"type": "array",
|
|
2032
|
+
"maxItems": 0,
|
|
2033
|
+
"description": "Always empty; the Set-Cookie header is in headers."
|
|
2034
|
+
},
|
|
2035
|
+
"headers": {
|
|
2036
|
+
"type": "array",
|
|
2037
|
+
"items": {
|
|
2038
|
+
"$ref": "#/components/schemas/HarNameValue"
|
|
2039
|
+
}
|
|
2040
|
+
},
|
|
2041
|
+
"content": {
|
|
2042
|
+
"type": "object",
|
|
2043
|
+
"required": [
|
|
2044
|
+
"size",
|
|
2045
|
+
"mimeType"
|
|
2046
|
+
],
|
|
2047
|
+
"properties": {
|
|
2048
|
+
"size": {
|
|
2049
|
+
"type": "integer",
|
|
2050
|
+
"minimum": 0,
|
|
2051
|
+
"description": "The larger of responseBodyBytes and the size of the body kept, which is more for a body kept inflated."
|
|
2052
|
+
},
|
|
2053
|
+
"mimeType": {
|
|
2054
|
+
"type": "string",
|
|
2055
|
+
"description": "responseContentType, or x-unknown when it is null."
|
|
2056
|
+
},
|
|
2057
|
+
"text": {
|
|
2058
|
+
"type": "string",
|
|
2059
|
+
"description": "The redacted text, or the bytes in base64 when encoding is base64. Absent when no body was kept."
|
|
2060
|
+
},
|
|
2061
|
+
"encoding": {
|
|
2062
|
+
"const": "base64"
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
},
|
|
2066
|
+
"redirectURL": {
|
|
2067
|
+
"type": "string",
|
|
2068
|
+
"description": "The Location header, or empty."
|
|
2069
|
+
},
|
|
2070
|
+
"headersSize": {
|
|
2071
|
+
"const": -1
|
|
2072
|
+
},
|
|
2073
|
+
"bodySize": {
|
|
2074
|
+
"type": "integer",
|
|
2075
|
+
"description": "responseBodyBytes; -1 when it is null."
|
|
2076
|
+
},
|
|
2077
|
+
"_error": {
|
|
2078
|
+
"type": "string",
|
|
2079
|
+
"description": "error, for a failed request, where Chrome's own export puts it."
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
},
|
|
2083
|
+
"cache": {
|
|
2084
|
+
"type": "object",
|
|
2085
|
+
"maxProperties": 0
|
|
2086
|
+
},
|
|
2087
|
+
"_resourceType": {
|
|
2088
|
+
"type": "string",
|
|
2089
|
+
"enum": [
|
|
2090
|
+
"fetch",
|
|
2091
|
+
"image",
|
|
2092
|
+
"websocket"
|
|
2093
|
+
],
|
|
2094
|
+
"description": "How Chrome DevTools files the request on import: websocket for the handshake of a listed WebSocket, image for an image/* response, else fetch."
|
|
2095
|
+
},
|
|
2096
|
+
"_webSocketMessages": {
|
|
2097
|
+
"type": "array",
|
|
2098
|
+
"description": "On the handshake of a listed WebSocket: the messages in its log, oldest first, in the form Chrome DevTools writes and reads. A message that send() refused is left out, because it was not sent. The connection's state and counts are in _lustro.webSocket.",
|
|
2099
|
+
"items": {
|
|
2100
|
+
"type": "object",
|
|
2101
|
+
"required": [
|
|
2102
|
+
"type",
|
|
2103
|
+
"time",
|
|
2104
|
+
"opcode",
|
|
2105
|
+
"data"
|
|
2106
|
+
],
|
|
2107
|
+
"properties": {
|
|
2108
|
+
"type": {
|
|
2109
|
+
"type": "string",
|
|
2110
|
+
"enum": [
|
|
2111
|
+
"send",
|
|
2112
|
+
"receive"
|
|
2113
|
+
]
|
|
2114
|
+
},
|
|
2115
|
+
"time": {
|
|
2116
|
+
"type": "number",
|
|
2117
|
+
"description": "When the message was sent or received, in seconds since the Unix epoch."
|
|
2118
|
+
},
|
|
2119
|
+
"opcode": {
|
|
2120
|
+
"type": "integer",
|
|
2121
|
+
"enum": [
|
|
2122
|
+
1,
|
|
2123
|
+
2
|
|
2124
|
+
],
|
|
2125
|
+
"description": "1 for a text message, 2 for a binary one."
|
|
2126
|
+
},
|
|
2127
|
+
"data": {
|
|
2128
|
+
"type": "string",
|
|
2129
|
+
"description": "The redacted text, or the bytes in base64 when opcode is 2. Empty when no payload is stored."
|
|
2130
|
+
},
|
|
2131
|
+
"_payloadBytes": {
|
|
2132
|
+
"type": "integer",
|
|
2133
|
+
"minimum": 0,
|
|
2134
|
+
"description": "The size of the whole payload."
|
|
2135
|
+
},
|
|
2136
|
+
"_truncated": {
|
|
2137
|
+
"const": true,
|
|
2138
|
+
"description": "Present when data has only the first part of the payload."
|
|
2139
|
+
},
|
|
2140
|
+
"_stored": {
|
|
2141
|
+
"const": false,
|
|
2142
|
+
"description": "Present when no payload is stored."
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
},
|
|
2147
|
+
"timings": {
|
|
2148
|
+
"type": "object",
|
|
2149
|
+
"required": [
|
|
2150
|
+
"send",
|
|
2151
|
+
"wait",
|
|
2152
|
+
"receive"
|
|
2153
|
+
],
|
|
2154
|
+
"properties": {
|
|
2155
|
+
"blocked": {
|
|
2156
|
+
"type": "integer",
|
|
2157
|
+
"minimum": -1,
|
|
2158
|
+
"description": "throttledMs, or -1 when the request wasn't throttled."
|
|
2159
|
+
},
|
|
2160
|
+
"dns": {
|
|
2161
|
+
"const": -1
|
|
2162
|
+
},
|
|
2163
|
+
"connect": {
|
|
2164
|
+
"const": -1
|
|
2165
|
+
},
|
|
2166
|
+
"ssl": {
|
|
2167
|
+
"const": -1
|
|
2168
|
+
},
|
|
2169
|
+
"send": {
|
|
2170
|
+
"const": 0
|
|
2171
|
+
},
|
|
2172
|
+
"wait": {
|
|
2173
|
+
"type": "integer",
|
|
2174
|
+
"minimum": 0,
|
|
2175
|
+
"description": "durationMs; 0 while the request is in flight."
|
|
2176
|
+
},
|
|
2177
|
+
"receive": {
|
|
2178
|
+
"const": 0
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
},
|
|
2182
|
+
"_lustro": {
|
|
2183
|
+
"type": "object",
|
|
2184
|
+
"description": "What HAR has no field for. HAR reserves names that start with an underscore for a tool's own fields.",
|
|
2185
|
+
"required": [
|
|
2186
|
+
"id",
|
|
2187
|
+
"isMocked",
|
|
2188
|
+
"source",
|
|
2189
|
+
"categories",
|
|
2190
|
+
"requestBodyTruncated",
|
|
2191
|
+
"responseBodyTruncated",
|
|
2192
|
+
"responseComplete",
|
|
2193
|
+
"finalUrl",
|
|
2194
|
+
"priorResponses",
|
|
2195
|
+
"error"
|
|
2196
|
+
],
|
|
2197
|
+
"properties": {
|
|
2198
|
+
"id": {
|
|
2199
|
+
"type": "string",
|
|
2200
|
+
"description": "The transaction id."
|
|
2201
|
+
},
|
|
2202
|
+
"isMocked": {
|
|
2203
|
+
"type": "boolean"
|
|
2204
|
+
},
|
|
2205
|
+
"source": {
|
|
2206
|
+
"type": "string",
|
|
2207
|
+
"enum": [
|
|
2208
|
+
"okhttp",
|
|
2209
|
+
"platform",
|
|
2210
|
+
"app"
|
|
2211
|
+
],
|
|
2212
|
+
"description": "As the transaction's source. Since protocol 1.6."
|
|
2213
|
+
},
|
|
2214
|
+
"categories": {
|
|
2215
|
+
"type": "array",
|
|
2216
|
+
"items": {
|
|
2217
|
+
"type": "string"
|
|
2218
|
+
}
|
|
2219
|
+
},
|
|
2220
|
+
"requestBodyTruncated": {
|
|
2221
|
+
"type": "boolean",
|
|
2222
|
+
"description": "true when postData has only the first part of the body."
|
|
2223
|
+
},
|
|
2224
|
+
"responseBodyTruncated": {
|
|
2225
|
+
"type": "boolean",
|
|
2226
|
+
"description": "true when content has only the first part of the body."
|
|
2227
|
+
},
|
|
2228
|
+
"responseComplete": {
|
|
2229
|
+
"type": "boolean",
|
|
2230
|
+
"description": "false while the request is in flight, including a streaming response."
|
|
2231
|
+
},
|
|
2232
|
+
"finalUrl": {
|
|
2233
|
+
"type": [
|
|
2234
|
+
"string",
|
|
2235
|
+
"null"
|
|
2236
|
+
],
|
|
2237
|
+
"description": "As the transaction's finalUrl. response.redirectURL is the Location of a redirect the entry itself is, and a redirect the client followed has no entry of its own. Since protocol 1.5."
|
|
2238
|
+
},
|
|
2239
|
+
"priorResponses": {
|
|
2240
|
+
"type": "array",
|
|
2241
|
+
"items": {
|
|
2242
|
+
"$ref": "#/components/schemas/PriorResponse"
|
|
2243
|
+
},
|
|
2244
|
+
"description": "As the transaction's priorResponses. Since protocol 1.5."
|
|
2245
|
+
},
|
|
2246
|
+
"error": {
|
|
2247
|
+
"type": [
|
|
2248
|
+
"string",
|
|
2249
|
+
"null"
|
|
2250
|
+
]
|
|
2251
|
+
},
|
|
2252
|
+
"webSocket": {
|
|
2253
|
+
"type": "object",
|
|
2254
|
+
"description": "On the handshake of a listed WebSocket: the connection, as GET websockets/{id} describes its fields.",
|
|
2255
|
+
"required": [
|
|
2256
|
+
"id",
|
|
2257
|
+
"url",
|
|
2258
|
+
"state"
|
|
2259
|
+
],
|
|
2260
|
+
"properties": {
|
|
2261
|
+
"id": {
|
|
2262
|
+
"type": "string"
|
|
2263
|
+
},
|
|
2264
|
+
"url": {
|
|
2265
|
+
"type": "string"
|
|
2266
|
+
},
|
|
2267
|
+
"state": {
|
|
2268
|
+
"type": "string",
|
|
2269
|
+
"enum": [
|
|
2270
|
+
"connecting",
|
|
2271
|
+
"open",
|
|
2272
|
+
"closing",
|
|
2273
|
+
"closed",
|
|
2274
|
+
"failed"
|
|
2275
|
+
]
|
|
2276
|
+
},
|
|
2277
|
+
"closeCode": {
|
|
2278
|
+
"type": [
|
|
2279
|
+
"integer",
|
|
2280
|
+
"null"
|
|
2281
|
+
]
|
|
2282
|
+
},
|
|
2283
|
+
"closeReason": {
|
|
2284
|
+
"type": [
|
|
2285
|
+
"string",
|
|
2286
|
+
"null"
|
|
2287
|
+
]
|
|
2288
|
+
},
|
|
2289
|
+
"closedBy": {
|
|
2290
|
+
"type": [
|
|
2291
|
+
"string",
|
|
2292
|
+
"null"
|
|
2293
|
+
]
|
|
2294
|
+
},
|
|
2295
|
+
"canceled": {
|
|
2296
|
+
"type": "boolean"
|
|
2297
|
+
},
|
|
2298
|
+
"error": {
|
|
2299
|
+
"type": [
|
|
2300
|
+
"string",
|
|
2301
|
+
"null"
|
|
2302
|
+
]
|
|
2303
|
+
},
|
|
2304
|
+
"sentCount": {
|
|
2305
|
+
"type": "integer"
|
|
2306
|
+
},
|
|
2307
|
+
"receivedCount": {
|
|
2308
|
+
"type": "integer"
|
|
2309
|
+
},
|
|
2310
|
+
"evictedEvents": {
|
|
2311
|
+
"type": "integer",
|
|
2312
|
+
"description": "Events the log no longer has, so _webSocketMessages can miss the socket's first messages."
|
|
2313
|
+
},
|
|
2314
|
+
"droppedEvents": {
|
|
2315
|
+
"type": "integer"
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
},
|
|
2323
|
+
"HarNameValue": {
|
|
2324
|
+
"type": "object",
|
|
2325
|
+
"required": [
|
|
2326
|
+
"name",
|
|
2327
|
+
"value"
|
|
2328
|
+
],
|
|
2329
|
+
"properties": {
|
|
2330
|
+
"name": {
|
|
2331
|
+
"type": "string"
|
|
2332
|
+
},
|
|
2333
|
+
"value": {
|
|
2334
|
+
"type": "string"
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
},
|
|
2338
|
+
"MockRule": {
|
|
2339
|
+
"type": "object",
|
|
2340
|
+
"required": [
|
|
2341
|
+
"id",
|
|
2342
|
+
"urlPattern",
|
|
2343
|
+
"statusCode",
|
|
2344
|
+
"enabled"
|
|
2345
|
+
],
|
|
2346
|
+
"properties": {
|
|
2347
|
+
"id": {
|
|
2348
|
+
"type": "string"
|
|
2349
|
+
},
|
|
2350
|
+
"name": {
|
|
2351
|
+
"type": "string"
|
|
2352
|
+
},
|
|
2353
|
+
"urlPattern": {
|
|
2354
|
+
"type": "string",
|
|
2355
|
+
"description": "Looked for anywhere in the URL: a substring, or a regular expression when prefixed with regex: (anchor it with ^ and $ to match the whole URL)."
|
|
2356
|
+
},
|
|
2357
|
+
"method": {
|
|
2358
|
+
"type": [
|
|
2359
|
+
"string",
|
|
2360
|
+
"null"
|
|
2361
|
+
],
|
|
2362
|
+
"description": "null matches any method."
|
|
2363
|
+
},
|
|
2364
|
+
"statusCode": {
|
|
2365
|
+
"type": "integer"
|
|
2366
|
+
},
|
|
2367
|
+
"responseHeaders": {
|
|
2368
|
+
"type": "object",
|
|
2369
|
+
"additionalProperties": {
|
|
2370
|
+
"type": "string"
|
|
2371
|
+
},
|
|
2372
|
+
"description": "Headers applied to the mocked response (e.g. Content-Type)."
|
|
2373
|
+
},
|
|
2374
|
+
"responseBody": {
|
|
2375
|
+
"type": "string"
|
|
2376
|
+
},
|
|
2377
|
+
"failure": {
|
|
2378
|
+
"type": [
|
|
2379
|
+
"string",
|
|
2380
|
+
"null"
|
|
2381
|
+
],
|
|
2382
|
+
"description": "The connection error the rule fails a matching request with, in place of a response: timeout, unknownHost, connectionRefused, connectionReset, or tls. null for a rule that answers with statusCode, responseHeaders, and responseBody, which a failure rule ignores. Since protocol 1.12; a later protocol can add names."
|
|
2383
|
+
},
|
|
2384
|
+
"enabled": {
|
|
2385
|
+
"type": "boolean"
|
|
2386
|
+
},
|
|
2387
|
+
"hitCount": {
|
|
2388
|
+
"type": "integer",
|
|
2389
|
+
"description": "Runtime-only; not persisted."
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
},
|
|
2393
|
+
"MockRuleInput": {
|
|
2394
|
+
"type": "object",
|
|
2395
|
+
"required": [
|
|
2396
|
+
"urlPattern"
|
|
2397
|
+
],
|
|
2398
|
+
"properties": {
|
|
2399
|
+
"id": {
|
|
2400
|
+
"type": "string",
|
|
2401
|
+
"description": "Optional; generated when omitted. Supplying a stable id makes the write idempotent."
|
|
2402
|
+
},
|
|
2403
|
+
"name": {
|
|
2404
|
+
"type": "string"
|
|
2405
|
+
},
|
|
2406
|
+
"urlPattern": {
|
|
2407
|
+
"type": "string",
|
|
2408
|
+
"description": "Looked for anywhere in the URL: a substring, or a regular expression when prefixed with regex: (anchor it with ^ and $ to match the whole URL). Rejected with 400 when blank, or when a regex: pattern is empty or does not compile."
|
|
2409
|
+
},
|
|
2410
|
+
"method": {
|
|
2411
|
+
"type": [
|
|
2412
|
+
"string",
|
|
2413
|
+
"null"
|
|
2414
|
+
]
|
|
2415
|
+
},
|
|
2416
|
+
"statusCode": {
|
|
2417
|
+
"type": "integer",
|
|
2418
|
+
"default": 200,
|
|
2419
|
+
"minimum": 100,
|
|
2420
|
+
"maximum": 599,
|
|
2421
|
+
"description": "Rejected with 400 outside 100-599."
|
|
2422
|
+
},
|
|
2423
|
+
"responseHeaders": {
|
|
2424
|
+
"type": "object",
|
|
2425
|
+
"additionalProperties": {
|
|
2426
|
+
"type": "string"
|
|
2427
|
+
},
|
|
2428
|
+
"description": "Headers applied to the mocked response (e.g. Content-Type). Names and values must be ones OkHttp accepts and a Content-Type must parse as a media type; otherwise 400. Replaced wholesale, so send them again when editing a rule by id."
|
|
2429
|
+
},
|
|
2430
|
+
"responseBody": {
|
|
2431
|
+
"type": "string"
|
|
2432
|
+
},
|
|
2433
|
+
"failure": {
|
|
2434
|
+
"type": [
|
|
2435
|
+
"string",
|
|
2436
|
+
"null"
|
|
2437
|
+
],
|
|
2438
|
+
"enum": [
|
|
2439
|
+
"timeout",
|
|
2440
|
+
"unknownHost",
|
|
2441
|
+
"connectionRefused",
|
|
2442
|
+
"connectionReset",
|
|
2443
|
+
"tls",
|
|
2444
|
+
null
|
|
2445
|
+
],
|
|
2446
|
+
"default": null,
|
|
2447
|
+
"description": "Fails a matching request with a connection error instead of answering it: Lustro's OkHttp interceptor throws the exception OkHttp throws for that error, SocketTimeoutException, UnknownHostException, ConnectException, SocketException (Connection reset), or SSLHandshakeException, and records the transaction as failed, with error, isMocked true, and the rule's mockRuleId. statusCode, responseHeaders, and responseBody are ignored then. The request fails at once; set a throttle to fail it after a wait. Omit it, or send null, for a rule that answers. Any other value is a 400 with field failure. Replaced wholesale, as enabled is. Since protocol 1.12."
|
|
2448
|
+
},
|
|
2449
|
+
"enabled": {
|
|
2450
|
+
"type": "boolean",
|
|
2451
|
+
"default": true,
|
|
2452
|
+
"description": "Replaced wholesale, so send it again when editing a rule by id or the rule comes back enabled."
|
|
2453
|
+
}
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
}
|