-
Notifications
You must be signed in to change notification settings - Fork 0
/
message-explorer-openapi.json
518 lines (518 loc) · 14.2 KB
/
message-explorer-openapi.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
{
"openapi": "3.0.3",
"info": {
"title": "SUSEE Message Explorer",
"description": "Explore messages of SUSEE nodes",
"license": {
"name": "Apache-2.0/MIT"
},
"version": "0.1.2"
},
"paths": {
"/messages": {
"get": {
"tags": [
"messages"
],
"summary": "List messages of a node",
"description": "List messages of a node\n\nList messages of a Streams channel of a specific node.",
"operationId": "messages_index",
"parameters": [
{
"name": "channel_id",
"in": "query",
"description": "Filter by Streams channel-id. Find existing channel-id of existing nodes using the '/node' endpoint",
"required": true,
"schema": {
"type": "string",
"nullable": true,
"maxLength": 80,
"minLength": 80
},
"example": "cbd12e732e3c6df93c6fc189bf0d0553c2219d644402bae7caa8968aa5ba15dc0000000000000000"
},
{
"name": "page",
"in": "query",
"description": "Which page to get. Index range is [0 ...]",
"required": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 0,
"minimum": 0
},
"style": "form"
},
{
"name": "limit",
"in": "query",
"description": "Maximum number of items per page",
"required": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 10,
"minimum": 0
},
"style": "form"
}
],
"responses": {
"200": {
"description": "Successfully responded with list of Messages"
},
"400": {
"description": "Channel with specified channel-id does not exist"
}
}
}
},
"/messages/{message_id}": {
"get": {
"tags": [
"messages"
],
"summary": "Get a specific message",
"description": "Get a specific message",
"operationId": "messages_get",
"parameters": [
{
"name": "message_id",
"in": "path",
"description": "Streams message id (includes the channel id). Message ids can be listed using the '/messages' endpoint.",
"required": true,
"schema": {
"type": "string",
"maxLength": 105,
"minLength": 105
},
"allowReserved": true,
"example": "cbd12e732e3c6df93c6fc189bf0d0553c2219d644402bae7caa8968aa5ba15dc0000000000000000:84d48c0cc279564b467f7e74"
}
],
"responses": {
"200": {
"description": "Successfully responded requested message",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
}
}
}
}
},
"404": {
"description": "Message with specified msg_id does not exist"
}
}
}
},
"/nodes": {
"get": {
"tags": [
"nodes"
],
"summary": "Search for Nodes",
"description": "Search for Nodes\n\nSearch for Nodes by Streams channel id, Name or external id",
"operationId": "nodes_index",
"parameters": [
{
"name": "channel_id_start",
"in": "query",
"description": "Streams channels ID starts with the specified value",
"required": false,
"schema": {
"type": "string",
"nullable": true,
"maxLength": 80,
"minLength": 1
},
"example": "0ec"
},
{
"name": "external_id",
"in": "query",
"description": "External id equals the specified value",
"required": false,
"schema": {
"type": "string",
"nullable": true,
"minLength": 1
}
},
{
"name": "name_start",
"in": "query",
"description": "Name starts with the specified value",
"required": false,
"schema": {
"type": "string",
"nullable": true,
"minLength": 1
}
},
{
"name": "page",
"in": "query",
"description": "Which page to get. Index range is [0 ...]",
"required": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 0,
"minimum": 0
},
"style": "form"
},
{
"name": "limit",
"in": "query",
"description": "Maximum number of items per page",
"required": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 10,
"minimum": 0
},
"style": "form"
}
],
"responses": {
"200": {
"description": "Successfully responded with list of Nodes"
}
}
}
},
"/nodes/{channel_id}": {
"get": {
"tags": [
"nodes"
],
"summary": "Get a specific Node",
"description": "Get a specific Node",
"operationId": "nodes_get",
"parameters": [
{
"name": "channel_id",
"in": "path",
"description": "Streams channel-id. Channel ids of existing nodes can be listed using the '/node' endpoint",
"required": true,
"schema": {
"type": "string",
"maxLength": 80,
"minLength": 80
},
"example": "cbd12e732e3c6df93c6fc189bf0d0553c2219d644402bae7caa8968aa5ba15dc0000000000000000"
}
],
"responses": {
"200": {
"description": "Successfully responded requested node",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Node"
}
}
}
}
},
"400": {
"description": "Node with specified channel_id does not exist"
}
}
},
"put": {
"tags": [
"nodes"
],
"summary": "Update a specific Node",
"description": "Update a specific Node\n\nUpdate the Node specified by the 'channel_id' path parameter.\nThe 'channel_id' field of the Node provided in the request body will be ignored.\nOnly Node fields 'external_id' and 'name' will be updated.",
"operationId": "nodes_put",
"parameters": [
{
"name": "channel_id",
"in": "path",
"description": "Streams channel-id. Channel ids of existing nodes can be listed using the '/node' endpoint",
"required": true,
"schema": {
"type": "string",
"maxLength": 80,
"minLength": 80
},
"example": "cbd12e732e3c6df93c6fc189bf0d0553c2219d644402bae7caa8968aa5ba15dc0000000000000000"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Node"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successfully updated requested node",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Node"
}
}
}
}
},
"400": {
"description": "Node with specified channel_id does not exist"
}
}
}
},
"/payload/decode": {
"post": {
"tags": [
"payload"
],
"summary": "Decode a payload",
"description": "Decode a payload\n\nDecode a payload that has been send by a Node that is identified by its 'external_id'.\nThe payload needs to be provided in the request body.",
"operationId": "decode_post",
"parameters": [
{
"name": "external_id",
"in": "query",
"description": "External ID (in example a LoRaWAN DevEUI). Find external ids of existing Nodes using the '/node' endpoint",
"required": true,
"schema": {
"type": "string",
"maxLength": 1023,
"minLength": 1
},
"example": "504F53E833055C50"
}
],
"requestBody": {
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successfully decoded uploaded payload",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"description": "The uploaded payload could not be parsed because it is syntactically not correct"
},
"404": {
"description": "A Node with the specified external_id does not exist"
}
}
}
}
},
"components": {
"schemas": {
"AppError": {
"oneOf": [
{
"type": "object",
"required": [
"InternalServerError"
],
"properties": {
"InternalServerError": {
"type": "string",
"description": "An internal server error occurred"
}
}
},
{
"type": "object",
"required": [
"AtLeastOneConditionNeeded"
],
"properties": {
"AtLeastOneConditionNeeded": {
"type": "string",
"description": "At least one condition query parameter is needed"
}
}
},
{
"type": "object",
"required": [
"ChannelDoesNotExist"
],
"properties": {
"ChannelDoesNotExist": {
"type": "string",
"description": "A channel with the specified channel-id does not exist"
}
}
},
{
"type": "object",
"required": [
"GenericWithMessage"
],
"properties": {
"GenericWithMessage": {
"type": "array",
"items": {
"type": "object"
},
"description": "A generic error occurred, see http status code and message for more details",
"maxItems": 2,
"minItems": 2
}
}
}
]
},
"DataT": {
"type": "object",
"title": "JSON array"
},
"Message": {
"type": "object",
"required": [
"id",
"public_text",
"private_text_decrypted",
"msg_index",
"streams_content"
],
"properties": {
"id": {
"type": "string"
},
"msg_index": {
"type": "string"
},
"private_text_decrypted": {
"type": "string"
},
"public_text": {
"type": "string"
},
"streams_content": {
"type": "string"
}
}
},
"Node": {
"type": "object",
"required": [
"channel_id",
"name",
"external_id"
],
"properties": {
"channel_id": {
"type": "string"
},
"external_id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"Page": {
"type": "object",
"required": [
"data",
"meta"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DataT"
}
},
"meta": {
"$ref": "#/components/schemas/PageMeta"
}
}
},
"PageMeta": {
"type": "object",
"required": [
"page_indx",
"items_count",
"items_limit",
"page_count_total",
"items_count_total",
"has_prev_page",
"has_next_page"
],
"properties": {
"has_next_page": {
"type": "boolean"
},
"has_prev_page": {
"type": "boolean"
},
"items_count": {
"type": "integer",
"format": "int32",
"minimum": 0
},
"items_count_total": {
"type": "integer",
"format": "int32",
"minimum": 0
},
"items_limit": {
"type": "integer",
"format": "int32",
"minimum": 0
},
"page_count_total": {
"type": "integer",
"format": "int32",
"minimum": 0
},
"page_indx": {
"type": "integer",
"format": "int32",
"minimum": 0
}
}
}
}
},
"tags": [
{
"name": "susee message explorer"
}
]
}