@itentialopensource/adapter-hyas_protect 0.1.1 → 0.2.1

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.
Files changed (41) hide show
  1. package/CALLS.md +9 -9
  2. package/CHANGELOG.md +16 -1
  3. package/CONTRIBUTING.md +1 -160
  4. package/ENHANCE.md +2 -2
  5. package/README.md +31 -22
  6. package/adapter.js +159 -330
  7. package/adapterBase.js +538 -873
  8. package/changelogs/changelog.md +9 -0
  9. package/metadata.json +49 -0
  10. package/package.json +22 -25
  11. package/pronghorn.json +474 -142
  12. package/propertiesSchema.json +453 -40
  13. package/refs?service=git-upload-pack +0 -0
  14. package/report/adapter-openapi.json +1400 -0
  15. package/report/adapter-openapi.yaml +1067 -0
  16. package/report/adapterInfo.json +8 -8
  17. package/report/updateReport1691508672052.json +120 -0
  18. package/report/updateReport1692203123169.json +120 -0
  19. package/report/updateReport1694467753903.json +120 -0
  20. package/report/updateReport1698422406410.json +120 -0
  21. package/sampleProperties.json +63 -2
  22. package/test/integration/adapterTestBasicGet.js +1 -1
  23. package/test/integration/adapterTestConnectivity.js +91 -42
  24. package/test/integration/adapterTestIntegration.js +130 -2
  25. package/test/unit/adapterBaseTestUnit.js +388 -313
  26. package/test/unit/adapterTestUnit.js +306 -109
  27. package/utils/adapterInfo.js +1 -1
  28. package/utils/addAuth.js +1 -1
  29. package/utils/artifactize.js +1 -1
  30. package/utils/checkMigrate.js +1 -1
  31. package/utils/entitiesToDB.js +1 -0
  32. package/utils/findPath.js +1 -1
  33. package/utils/methodDocumentor.js +71 -23
  34. package/utils/modify.js +13 -15
  35. package/utils/packModificationScript.js +1 -1
  36. package/utils/taskMover.js +309 -0
  37. package/utils/tbScript.js +3 -10
  38. package/utils/tbUtils.js +2 -3
  39. package/utils/testRunner.js +1 -1
  40. package/utils/troubleshootingAdapter.js +1 -3
  41. package/workflows/README.md +0 -3
@@ -0,0 +1,1400 @@
1
+ {
2
+ "openapi": "3.0.0",
3
+ "info": {
4
+ "title": "HYAS Protect API",
5
+ "description": "# Endpoint\n\nThe base endpoint is `https://apps.hyas.com/api/protect/ext`, which all of the following REST routes will follow.\n\n\n# Authentication\n\nAuthentication is performed using X-API-Key header with provided PSK API key on each request\n\n# cURL Example\n\n```curl --header \"X-API-Key: <your API key>\" https://apps.hyas.com/api/protect/ext/reports```\n",
6
+ "contact": {},
7
+ "version": "1.0.0"
8
+ },
9
+ "servers": [
10
+ {
11
+ "url": "https://apps.hyas.com/api/protect/ext",
12
+ "variables": {}
13
+ }
14
+ ],
15
+ "paths": {
16
+ "/aggregates": {
17
+ "post": {
18
+ "tags": [
19
+ "Overview"
20
+ ],
21
+ "summary": "newcastle.protect.top_charts.aggregates",
22
+ "description": "Get count aggregates for the top charts",
23
+ "operationId": "newcastle.protect.top_charts.aggregates",
24
+ "parameters": [],
25
+ "requestBody": {
26
+ "description": "The filter used to perform aggregate queries",
27
+ "content": {
28
+ "application/json": {
29
+ "schema": {
30
+ "allOf": [
31
+ {
32
+ "$ref": "#/components/schemas/aggregate_params"
33
+ },
34
+ {
35
+ "description": "The filter used to perform aggregate queries"
36
+ }
37
+ ]
38
+ }
39
+ }
40
+ },
41
+ "required": true
42
+ },
43
+ "responses": {
44
+ "200": {
45
+ "description": "Top Charts",
46
+ "headers": {},
47
+ "content": {
48
+ "application/json": {
49
+ "schema": {
50
+ "allOf": [
51
+ {
52
+ "$ref": "#/components/schemas/aggregate_response"
53
+ },
54
+ {
55
+ "description": "Aggregate response"
56
+ }
57
+ ]
58
+ }
59
+ }
60
+ }
61
+ }
62
+ },
63
+ "deprecated": false
64
+ }
65
+ },
66
+ "/bar": {
67
+ "post": {
68
+ "tags": [
69
+ "Overview"
70
+ ],
71
+ "summary": "newcastle.protect.bar_charts.bar",
72
+ "description": "Get bar chart data",
73
+ "operationId": "newcastle.protect.bar_charts.bar",
74
+ "parameters": [],
75
+ "requestBody": {
76
+ "description": "The filter used to perform bar chart queries",
77
+ "content": {
78
+ "application/json": {
79
+ "schema": {
80
+ "allOf": [
81
+ {
82
+ "$ref": "#/components/schemas/bar_params"
83
+ },
84
+ {
85
+ "description": "The filter used to perform bar chart queries"
86
+ }
87
+ ]
88
+ }
89
+ }
90
+ },
91
+ "required": true
92
+ },
93
+ "responses": {
94
+ "200": {
95
+ "description": "Bar Chart",
96
+ "headers": {},
97
+ "content": {
98
+ "application/json": {
99
+ "schema": {
100
+ "allOf": [
101
+ {
102
+ "$ref": "#/components/schemas/bar_response"
103
+ },
104
+ {
105
+ "description": "Bar chart response"
106
+ }
107
+ ]
108
+ }
109
+ }
110
+ }
111
+ }
112
+ },
113
+ "deprecated": false
114
+ }
115
+ },
116
+ "/histogram": {
117
+ "post": {
118
+ "tags": [
119
+ "Overview"
120
+ ],
121
+ "summary": "newcastle.protect.histograms.histogram",
122
+ "description": "Get histogram data for the real time charts",
123
+ "operationId": "newcastle.protect.histograms.histogram",
124
+ "parameters": [],
125
+ "requestBody": {
126
+ "description": "The filter used to perform histogram queries",
127
+ "content": {
128
+ "application/json": {
129
+ "schema": {
130
+ "allOf": [
131
+ {
132
+ "$ref": "#/components/schemas/histogram_params"
133
+ },
134
+ {
135
+ "description": "The filter used to perform histogram queries"
136
+ }
137
+ ]
138
+ }
139
+ }
140
+ },
141
+ "required": true
142
+ },
143
+ "responses": {
144
+ "200": {
145
+ "description": "Historgram",
146
+ "headers": {},
147
+ "content": {
148
+ "application/json": {
149
+ "schema": {
150
+ "allOf": [
151
+ {
152
+ "$ref": "#/components/schemas/histogram_response"
153
+ },
154
+ {
155
+ "description": "Histogram response"
156
+ }
157
+ ]
158
+ }
159
+ }
160
+ }
161
+ }
162
+ },
163
+ "deprecated": false
164
+ }
165
+ },
166
+ "/summary": {
167
+ "post": {
168
+ "tags": [
169
+ "Overview"
170
+ ],
171
+ "summary": "newcastle.protect.summaries.summary",
172
+ "description": "Get request summaries",
173
+ "operationId": "newcastle.protect.summaries.summary",
174
+ "parameters": [],
175
+ "requestBody": {
176
+ "description": "The filter used to perform summary queries",
177
+ "content": {
178
+ "application/json": {
179
+ "schema": {
180
+ "allOf": [
181
+ {
182
+ "$ref": "#/components/schemas/summary_params"
183
+ },
184
+ {
185
+ "description": "The filter used to perform summary queries"
186
+ }
187
+ ]
188
+ }
189
+ }
190
+ },
191
+ "required": true
192
+ },
193
+ "responses": {
194
+ "200": {
195
+ "description": "Summary",
196
+ "headers": {},
197
+ "content": {
198
+ "application/json": {
199
+ "schema": {
200
+ "allOf": [
201
+ {
202
+ "$ref": "#/components/schemas/summary_response"
203
+ },
204
+ {
205
+ "description": "Summary response"
206
+ }
207
+ ]
208
+ }
209
+ }
210
+ }
211
+ }
212
+ },
213
+ "deprecated": false
214
+ }
215
+ },
216
+ "/histogram/artifact": {
217
+ "post": {
218
+ "tags": [
219
+ "Logs"
220
+ ],
221
+ "summary": "newcastle.protect.histograms.histogram_artifact",
222
+ "description": "Get histogram data for the pop out panel timeline chart",
223
+ "operationId": "newcastle.protect.histograms.histogram_artifact",
224
+ "parameters": [],
225
+ "requestBody": {
226
+ "description": "The filter used to perform histogram queries",
227
+ "content": {
228
+ "application/json": {
229
+ "schema": {
230
+ "allOf": [
231
+ {
232
+ "$ref": "#/components/schemas/histogram_artifact_params"
233
+ },
234
+ {
235
+ "description": "The filter used to perform histogram queries"
236
+ }
237
+ ]
238
+ }
239
+ }
240
+ },
241
+ "required": true
242
+ },
243
+ "responses": {
244
+ "200": {
245
+ "description": "Flyout Panel Artifact Historgram",
246
+ "headers": {},
247
+ "content": {
248
+ "application/json": {
249
+ "schema": {
250
+ "allOf": [
251
+ {
252
+ "$ref": "#/components/schemas/histogram_artifact_response"
253
+ },
254
+ {
255
+ "description": "Histogram response"
256
+ }
257
+ ]
258
+ }
259
+ }
260
+ }
261
+ }
262
+ },
263
+ "deprecated": false
264
+ }
265
+ },
266
+ "/logs": {
267
+ "post": {
268
+ "tags": [
269
+ "Logs"
270
+ ],
271
+ "summary": "newcastle.protect.logs.logs",
272
+ "description": "Get logs",
273
+ "operationId": "newcastle.protect.logs.logs",
274
+ "parameters": [],
275
+ "requestBody": {
276
+ "description": "The filter used to perform log queries",
277
+ "content": {
278
+ "application/json": {
279
+ "schema": {
280
+ "allOf": [
281
+ {
282
+ "$ref": "#/components/schemas/log_params"
283
+ },
284
+ {
285
+ "description": "The filter used to perform log queries"
286
+ }
287
+ ]
288
+ }
289
+ }
290
+ },
291
+ "required": true
292
+ },
293
+ "responses": {
294
+ "200": {
295
+ "description": "Logs",
296
+ "headers": {},
297
+ "content": {
298
+ "application/json": {
299
+ "schema": {
300
+ "allOf": [
301
+ {
302
+ "$ref": "#/components/schemas/log_response"
303
+ },
304
+ {
305
+ "description": "Summary response"
306
+ }
307
+ ]
308
+ }
309
+ }
310
+ }
311
+ }
312
+ },
313
+ "deprecated": false
314
+ }
315
+ },
316
+ "/passthrough": {
317
+ "post": {
318
+ "tags": [
319
+ "Passthrough"
320
+ ],
321
+ "summary": "newcastle.protect.passthrough.passthrough",
322
+ "description": "Get passthrough records",
323
+ "operationId": "newcastle.protect.passthrough.passthrough",
324
+ "parameters": [],
325
+ "requestBody": {
326
+ "description": "The filter used to perform passthrough queries",
327
+ "content": {
328
+ "application/json": {
329
+ "schema": {
330
+ "allOf": [
331
+ {
332
+ "$ref": "#/components/schemas/passthrough_params"
333
+ },
334
+ {
335
+ "description": "The filter used to perform passthrough queries"
336
+ }
337
+ ]
338
+ }
339
+ }
340
+ },
341
+ "required": true
342
+ },
343
+ "responses": {
344
+ "200": {
345
+ "description": "Logs",
346
+ "headers": {},
347
+ "content": {
348
+ "application/json": {
349
+ "schema": {
350
+ "allOf": [
351
+ {
352
+ "$ref": "#/components/schemas/passthrough_response"
353
+ },
354
+ {
355
+ "description": "Passthrough response"
356
+ }
357
+ ]
358
+ }
359
+ }
360
+ }
361
+ }
362
+ },
363
+ "deprecated": false
364
+ }
365
+ },
366
+ "/report": {
367
+ "post": {
368
+ "tags": [
369
+ "Reports"
370
+ ],
371
+ "summary": "newcastle.protect.reports.get_report",
372
+ "description": "Get executive report",
373
+ "operationId": "newcastle.protect.reports.get_report",
374
+ "parameters": [],
375
+ "requestBody": {
376
+ "description": "The filter used to generate the report",
377
+ "content": {
378
+ "application/json": {
379
+ "schema": {
380
+ "allOf": [
381
+ {
382
+ "$ref": "#/components/schemas/report_params"
383
+ },
384
+ {
385
+ "description": "The filter used to generate the report"
386
+ }
387
+ ]
388
+ }
389
+ }
390
+ },
391
+ "required": true
392
+ },
393
+ "responses": {
394
+ "200": {
395
+ "description": "A report in pdf format",
396
+ "headers": {},
397
+ "content": {
398
+ "application/pdf": {
399
+ "schema": {}
400
+ }
401
+ }
402
+ }
403
+ },
404
+ "deprecated": false
405
+ }
406
+ },
407
+ "/reports": {
408
+ "post": {
409
+ "tags": [
410
+ "Reports"
411
+ ],
412
+ "summary": "newcastle.protect.reports.get_reports",
413
+ "description": "Get list of executive reports",
414
+ "operationId": "newcastle.protect.reports.get_reports",
415
+ "parameters": [],
416
+ "responses": {
417
+ "200": {
418
+ "description": "Bar Chart",
419
+ "headers": {},
420
+ "content": {
421
+ "application/json": {
422
+ "schema": {
423
+ "allOf": [
424
+ {
425
+ "$ref": "#/components/schemas/reports_response"
426
+ },
427
+ {
428
+ "description": "List of reports and count"
429
+ }
430
+ ]
431
+ }
432
+ }
433
+ }
434
+ }
435
+ },
436
+ "deprecated": false
437
+ }
438
+ }
439
+ },
440
+ "components": {
441
+ "schemas": {
442
+ "aggregate_params": {
443
+ "title": "aggregate_params",
444
+ "type": "object",
445
+ "properties": {
446
+ "applied_filters": {
447
+ "allOf": [
448
+ {
449
+ "$ref": "#/components/schemas/AppliedFilters"
450
+ },
451
+ {
452
+ "description": "A filter object specific to the query endpoint."
453
+ }
454
+ ]
455
+ }
456
+ }
457
+ },
458
+ "aggregate_response": {
459
+ "title": "aggregate_response",
460
+ "type": "object",
461
+ "properties": {
462
+ "query_type": {
463
+ "type": "string",
464
+ "description": "The query type that the aggregate is for",
465
+ "example": "fqdn"
466
+ },
467
+ "top_items": {
468
+ "type": "array",
469
+ "items": {
470
+ "$ref": "#/components/schemas/TopItem"
471
+ },
472
+ "description": "Top items"
473
+ }
474
+ },
475
+ "description": "Aggregate response"
476
+ },
477
+ "bar_params": {
478
+ "title": "bar_params",
479
+ "type": "object",
480
+ "properties": {
481
+ "applied_filters": {
482
+ "allOf": [
483
+ {
484
+ "$ref": "#/components/schemas/AppliedFilters1"
485
+ },
486
+ {
487
+ "description": "A filter object specific to the query endpoint."
488
+ }
489
+ ]
490
+ }
491
+ }
492
+ },
493
+ "bar_response": {
494
+ "title": "bar_response",
495
+ "type": "object",
496
+ "properties": {
497
+ "query_type": {
498
+ "type": "string",
499
+ "description": "The query type that the aggregate is for",
500
+ "example": "no_answer_queries"
501
+ },
502
+ "top_items": {
503
+ "type": "array",
504
+ "items": {
505
+ "$ref": "#/components/schemas/TopItem1"
506
+ },
507
+ "description": "Top items"
508
+ }
509
+ },
510
+ "description": "Bar chart response"
511
+ },
512
+ "histogram_artifact_params": {
513
+ "title": "histogram_artifact_params",
514
+ "type": "object",
515
+ "properties": {
516
+ "applied_filters": {
517
+ "allOf": [
518
+ {
519
+ "$ref": "#/components/schemas/AppliedFilters2"
520
+ },
521
+ {
522
+ "description": "A filter object specific to the query endpoint."
523
+ }
524
+ ]
525
+ }
526
+ }
527
+ },
528
+ "histogram_artifact_response": {
529
+ "title": "histogram_artifact_response",
530
+ "type": "object",
531
+ "properties": {
532
+ "days": {
533
+ "type": "integer",
534
+ "description": "The number of days the histogram is for",
535
+ "format": "int32"
536
+ },
537
+ "query_type": {
538
+ "type": "string",
539
+ "description": "The query type that the histogram is for"
540
+ }
541
+ },
542
+ "description": "Histogram response"
543
+ },
544
+ "histogram_params": {
545
+ "title": "histogram_params",
546
+ "type": "object",
547
+ "properties": {
548
+ "applied_filters": {
549
+ "allOf": [
550
+ {
551
+ "$ref": "#/components/schemas/AppliedFilters3"
552
+ },
553
+ {
554
+ "description": "A filter object specific to the query endpoint."
555
+ }
556
+ ]
557
+ }
558
+ }
559
+ },
560
+ "histogram_response": {
561
+ "title": "histogram_response",
562
+ "type": "object",
563
+ "properties": {
564
+ "query_type": {
565
+ "type": "string",
566
+ "description": "The query type that the aggregate is for",
567
+ "example": "queries"
568
+ },
569
+ "top_items": {
570
+ "type": "array",
571
+ "items": {
572
+ "$ref": "#/components/schemas/TopItem"
573
+ },
574
+ "description": "Top items"
575
+ }
576
+ },
577
+ "description": "Histogram response"
578
+ },
579
+ "log_params": {
580
+ "title": "log_params",
581
+ "type": "object",
582
+ "properties": {
583
+ "applied_filters": {
584
+ "type": "array",
585
+ "items": {
586
+ "$ref": "#/components/schemas/AppliedFilters4"
587
+ },
588
+ "description": ""
589
+ }
590
+ }
591
+ },
592
+ "log_params_query_type_values": {
593
+ "title": "log_params_query_type_values",
594
+ "enum": [
595
+ "A",
596
+ "A6",
597
+ "AAAA",
598
+ "AFSDB",
599
+ "AMTRELAY",
600
+ "ANY",
601
+ "APL",
602
+ "ATMA",
603
+ "AVC",
604
+ "AXFR",
605
+ "CAA",
606
+ "CDS",
607
+ "CDNSKEY",
608
+ "CERT",
609
+ "CNAME",
610
+ "CSYNC",
611
+ "DHCID",
612
+ "DLV",
613
+ "DNAME",
614
+ "DNSKEY",
615
+ "DOA",
616
+ "DS",
617
+ "EID",
618
+ "EUI48",
619
+ "EUI64",
620
+ "GID",
621
+ "GPOS",
622
+ "HINFO",
623
+ "HIP",
624
+ "HTTPS",
625
+ "IPSECKEY",
626
+ "ISDN",
627
+ "IXFR",
628
+ "KEY",
629
+ "KX",
630
+ "L32",
631
+ "L64",
632
+ "LP",
633
+ "LOC",
634
+ "MAILA",
635
+ "MAILB",
636
+ "MB",
637
+ "MD",
638
+ "MF",
639
+ "MG",
640
+ "MINFO",
641
+ "MR",
642
+ "MX",
643
+ "NAPTR",
644
+ "NID",
645
+ "NIMLOC",
646
+ "NINFO",
647
+ "NS",
648
+ "NSAP",
649
+ "NSAP-PTR",
650
+ "NSEC",
651
+ "NSEC3",
652
+ "NSEC3PARAM",
653
+ "NXT",
654
+ "OPENPGPKEY",
655
+ "OPT",
656
+ "PTR",
657
+ "PX",
658
+ "RKEY",
659
+ "RP",
660
+ "RRSIG",
661
+ "RT",
662
+ "RV",
663
+ "SIG",
664
+ "SINK",
665
+ "SMIMEA",
666
+ "SOA",
667
+ "SPF",
668
+ "SSHFP",
669
+ "SVCB",
670
+ "TA",
671
+ "TALINK",
672
+ "TKEY",
673
+ "TLSA",
674
+ "TSIG",
675
+ "TXT",
676
+ "UID",
677
+ "UINFO",
678
+ "Unassigned",
679
+ "UNSPEC",
680
+ "URI",
681
+ "WKS",
682
+ "X25",
683
+ "ZONEMD"
684
+ ],
685
+ "type": "string"
686
+ },
687
+ "log_params_reputation_values": {
688
+ "title": "log_params_reputation_values",
689
+ "enum": [
690
+ "blocked",
691
+ "malicious",
692
+ "suspicious",
693
+ "permitted"
694
+ ],
695
+ "type": "string"
696
+ },
697
+ "log_response": {
698
+ "title": "log_response",
699
+ "type": "object",
700
+ "properties": {
701
+ "aggregates": {
702
+ "allOf": [
703
+ {
704
+ "$ref": "#/components/schemas/Aggregates"
705
+ },
706
+ {
707
+ "description": "Aggregates for the filter drop downs"
708
+ }
709
+ ]
710
+ },
711
+ "total_count": {
712
+ "type": "integer",
713
+ "description": "total count of records without pagination",
714
+ "format": "int32",
715
+ "example": 197
716
+ }
717
+ },
718
+ "description": "Summary response"
719
+ },
720
+ "passthrough_params": {
721
+ "title": "passthrough_params",
722
+ "type": "object",
723
+ "properties": {
724
+ "applied_filters": {
725
+ "type": "array",
726
+ "items": {
727
+ "$ref": "#/components/schemas/AppliedFilters5"
728
+ },
729
+ "description": ""
730
+ }
731
+ }
732
+ },
733
+ "passthrough_response": {
734
+ "title": "passthrough_response",
735
+ "type": "object",
736
+ "properties": {
737
+ "logs": {
738
+ "type": "array",
739
+ "items": {
740
+ "$ref": "#/components/schemas/Log"
741
+ },
742
+ "description": "Collection of passthrough records"
743
+ },
744
+ "total_count": {
745
+ "type": "integer",
746
+ "description": "total count of records without pagination",
747
+ "format": "int32",
748
+ "example": 197
749
+ }
750
+ },
751
+ "description": "Passthrough response"
752
+ },
753
+ "query": {
754
+ "title": "query",
755
+ "type": "object",
756
+ "properties": {
757
+ "applied_filters": {
758
+ "type": "object",
759
+ "description": "A filter object specific to the query endpoint."
760
+ }
761
+ }
762
+ },
763
+ "report_params": {
764
+ "title": "report_params",
765
+ "type": "object",
766
+ "properties": {
767
+ "applied_filters": {
768
+ "allOf": [
769
+ {
770
+ "$ref": "#/components/schemas/AppliedFilters6"
771
+ },
772
+ {
773
+ "description": "A filter object specific to the query endpoint."
774
+ }
775
+ ]
776
+ }
777
+ }
778
+ },
779
+ "reports_response": {
780
+ "title": "reports_response",
781
+ "type": "object",
782
+ "properties": {
783
+ "reports": {
784
+ "type": "array",
785
+ "items": {
786
+ "$ref": "#/components/schemas/Report"
787
+ },
788
+ "description": "Collection of reports"
789
+ },
790
+ "total_count": {
791
+ "type": "integer",
792
+ "description": "The total report count",
793
+ "format": "int32"
794
+ }
795
+ },
796
+ "description": "List of reports and count"
797
+ },
798
+ "summary_params": {
799
+ "title": "summary_params",
800
+ "type": "object",
801
+ "properties": {
802
+ "applied_filters": {
803
+ "allOf": [
804
+ {
805
+ "$ref": "#/components/schemas/AppliedFilters7"
806
+ },
807
+ {
808
+ "description": "A filter object specific to the query endpoint."
809
+ }
810
+ ]
811
+ }
812
+ }
813
+ },
814
+ "summary_response": {
815
+ "title": "summary_response",
816
+ "type": "object",
817
+ "properties": {
818
+ "day_count": {
819
+ "type": "integer",
820
+ "format": "int32",
821
+ "example": 1
822
+ },
823
+ "query_type": {
824
+ "type": "string",
825
+ "description": "The query type that the aggregate is for",
826
+ "example": "blocked"
827
+ },
828
+ "total_count": {
829
+ "type": "integer",
830
+ "format": "int32",
831
+ "example": 0
832
+ }
833
+ },
834
+ "description": "Summary response"
835
+ },
836
+ "Aggregates": {
837
+ "title": "Aggregates",
838
+ "type": "object",
839
+ "properties": {
840
+ "queries": {
841
+ "type": "array",
842
+ "items": {
843
+ "$ref": "#/components/schemas/Query2"
844
+ },
845
+ "description": "Collection of query type codes and counts"
846
+ },
847
+ "responses": {
848
+ "type": "array",
849
+ "items": {
850
+ "$ref": "#/components/schemas/Response"
851
+ },
852
+ "description": "Collection of response codes and counts"
853
+ }
854
+ },
855
+ "description": "Aggregates for the filter drop downs"
856
+ },
857
+ "AppliedFilters": {
858
+ "title": "AppliedFilters",
859
+ "type": "object",
860
+ "properties": {
861
+ "query_type": {
862
+ "allOf": [
863
+ {
864
+ "$ref": "#/components/schemas/QueryType"
865
+ },
866
+ {
867
+ "description": "The type of aggregate query to perform"
868
+ }
869
+ ]
870
+ },
871
+ "top_count": {
872
+ "type": "integer",
873
+ "description": "How many aggregate values to get",
874
+ "format": "int32",
875
+ "example": 25
876
+ }
877
+ },
878
+ "description": "A filter object specific to the query endpoint."
879
+ },
880
+ "AppliedFilters1": {
881
+ "title": "AppliedFilters1",
882
+ "type": "object",
883
+ "properties": {
884
+ "query_type": {
885
+ "allOf": [
886
+ {
887
+ "$ref": "#/components/schemas/QueryType1"
888
+ },
889
+ {
890
+ "description": "The type of bar chart query to perform"
891
+ }
892
+ ]
893
+ }
894
+ },
895
+ "description": "A filter object specific to the query endpoint."
896
+ },
897
+ "AppliedFilters2": {
898
+ "title": "AppliedFilters2",
899
+ "type": "object",
900
+ "properties": {
901
+ "artifact": {
902
+ "type": "string",
903
+ "description": "The artifact",
904
+ "example": "google.com"
905
+ },
906
+ "artifact_type": {
907
+ "allOf": [
908
+ {
909
+ "$ref": "#/components/schemas/ArtifactType"
910
+ },
911
+ {
912
+ "description": "The artifact type",
913
+ "example": "domain.keyword"
914
+ }
915
+ ]
916
+ },
917
+ "end_date": {
918
+ "type": "string",
919
+ "description": "The end window",
920
+ "example": "2021-09-29"
921
+ },
922
+ "interval": {
923
+ "type": "string",
924
+ "description": "The optional interval for the aggregate",
925
+ "example": "1d"
926
+ },
927
+ "query_type": {
928
+ "allOf": [
929
+ {
930
+ "$ref": "#/components/schemas/QueryType2"
931
+ },
932
+ {
933
+ "description": "The type of query",
934
+ "example": "queries"
935
+ }
936
+ ]
937
+ },
938
+ "start_date": {
939
+ "type": "string",
940
+ "description": "The start window",
941
+ "example": "2021-09-22"
942
+ }
943
+ },
944
+ "description": "A filter object specific to the query endpoint."
945
+ },
946
+ "AppliedFilters3": {
947
+ "title": "AppliedFilters3",
948
+ "type": "object",
949
+ "properties": {
950
+ "query_type": {
951
+ "allOf": [
952
+ {
953
+ "$ref": "#/components/schemas/QueryType3"
954
+ },
955
+ {
956
+ "description": "The type of histogram query to perform"
957
+ }
958
+ ]
959
+ }
960
+ },
961
+ "description": "A filter object specific to the query endpoint."
962
+ },
963
+ "AppliedFilters4": {
964
+ "title": "AppliedFilters4",
965
+ "type": "object",
966
+ "properties": {
967
+ "exclude": {
968
+ "type": "boolean",
969
+ "description": "Flag to indicate if the filter value should be excluded",
970
+ "example": false
971
+ },
972
+ "id": {
973
+ "allOf": [
974
+ {
975
+ "$ref": "#/components/schemas/Id"
976
+ },
977
+ {
978
+ "description": "The filter id",
979
+ "example": "domain"
980
+ }
981
+ ]
982
+ },
983
+ "isRange": {
984
+ "type": "boolean",
985
+ "description": "Flag to indicate if the filter value is a range",
986
+ "example": false
987
+ },
988
+ "partial": {
989
+ "type": "boolean",
990
+ "description": "If the filter should do partial matching",
991
+ "example": true
992
+ },
993
+ "rangeValue": {
994
+ "allOf": [
995
+ {
996
+ "oneOf": [
997
+ {
998
+ "nullable": true
999
+ },
1000
+ {
1001
+ "$ref": "#/components/schemas/RangeValue"
1002
+ }
1003
+ ]
1004
+ },
1005
+ {}
1006
+ ]
1007
+ },
1008
+ "value": {
1009
+ "type": "string",
1010
+ "description": "The filter value",
1011
+ "nullable": true,
1012
+ "example": "google"
1013
+ }
1014
+ }
1015
+ },
1016
+ "AppliedFilters5": {
1017
+ "title": "AppliedFilters5",
1018
+ "type": "object",
1019
+ "properties": {
1020
+ "exclude": {
1021
+ "type": "boolean",
1022
+ "description": "Flag to indicate if the filter value should be excluded",
1023
+ "example": false
1024
+ },
1025
+ "id": {
1026
+ "allOf": [
1027
+ {
1028
+ "$ref": "#/components/schemas/Id1"
1029
+ },
1030
+ {
1031
+ "description": "The filter id",
1032
+ "example": "last_seen"
1033
+ }
1034
+ ]
1035
+ },
1036
+ "isRange": {
1037
+ "type": "boolean",
1038
+ "description": "Flag to indicate if the filter value is a range",
1039
+ "example": true
1040
+ },
1041
+ "partial": {
1042
+ "type": "boolean",
1043
+ "description": "If the filter should do partial matching",
1044
+ "example": false
1045
+ },
1046
+ "rangeValue": {
1047
+ "allOf": [
1048
+ {
1049
+ "oneOf": [
1050
+ {
1051
+ "nullable": true
1052
+ },
1053
+ {
1054
+ "$ref": "#/components/schemas/RangeValue"
1055
+ }
1056
+ ]
1057
+ },
1058
+ {}
1059
+ ]
1060
+ },
1061
+ "value": {
1062
+ "type": "string",
1063
+ "description": "The filter value",
1064
+ "nullable": true
1065
+ }
1066
+ }
1067
+ },
1068
+ "AppliedFilters6": {
1069
+ "title": "AppliedFilters6",
1070
+ "type": "object",
1071
+ "properties": {
1072
+ "report_id": {
1073
+ "type": "string",
1074
+ "description": "ID (uuid) of the report",
1075
+ "example": "00000000-00000000-00000000-00000000"
1076
+ }
1077
+ },
1078
+ "description": "A filter object specific to the query endpoint."
1079
+ },
1080
+ "AppliedFilters7": {
1081
+ "title": "AppliedFilters7",
1082
+ "type": "object",
1083
+ "properties": {
1084
+ "query_type": {
1085
+ "allOf": [
1086
+ {
1087
+ "$ref": "#/components/schemas/QueryType4"
1088
+ },
1089
+ {
1090
+ "description": "The type of summary query to perform"
1091
+ }
1092
+ ]
1093
+ }
1094
+ },
1095
+ "description": "A filter object specific to the query endpoint."
1096
+ },
1097
+ "ArtifactType": {
1098
+ "title": "ArtifactType",
1099
+ "enum": [
1100
+ "domain.keyword",
1101
+ "domain_2tld.keyword",
1102
+ "nameserver_tld.keyword",
1103
+ "nameserver.keyword",
1104
+ "nameserver_ip.keyword",
1105
+ "response.a.keyword",
1106
+ "response.aaaa.keyword",
1107
+ "response.cname.keyword",
1108
+ "response.cname_2tld.keyword"
1109
+ ],
1110
+ "type": "string",
1111
+ "description": "The artifact type",
1112
+ "example": "domain.keyword"
1113
+ },
1114
+ "Id": {
1115
+ "title": "Id",
1116
+ "enum": [
1117
+ "domain",
1118
+ "domain_2tld",
1119
+ "domain_tld",
1120
+ "domain_age",
1121
+ "query_type",
1122
+ "response_code",
1123
+ "ttl",
1124
+ "nameserver",
1125
+ "nameserver_2tld",
1126
+ "nameserver_tld",
1127
+ "nameserver_ip",
1128
+ "a_record",
1129
+ "aaaa_record",
1130
+ "c_name",
1131
+ "c_name_2tld",
1132
+ "c_name_tld",
1133
+ "registrar",
1134
+ "reputation",
1135
+ "datetime"
1136
+ ],
1137
+ "type": "string",
1138
+ "description": "The filter id",
1139
+ "example": "domain"
1140
+ },
1141
+ "Id1": {
1142
+ "title": "Id1",
1143
+ "enum": [
1144
+ "last_seen",
1145
+ "artifact",
1146
+ "hyas_status",
1147
+ "alt_status",
1148
+ "query_count"
1149
+ ],
1150
+ "type": "string",
1151
+ "description": "The filter id",
1152
+ "example": "last_seen"
1153
+ },
1154
+ "Log": {
1155
+ "title": "Log",
1156
+ "type": "object",
1157
+ "properties": {
1158
+ "alt_status": {
1159
+ "type": "string",
1160
+ "description": "The status of the request made through ALT [blocked, allow]",
1161
+ "example": "allow"
1162
+ },
1163
+ "artifact": {
1164
+ "type": "string",
1165
+ "description": "The artifact looked up",
1166
+ "example": "google.com"
1167
+ },
1168
+ "hyas_status": {
1169
+ "type": "string",
1170
+ "description": "The status of the request made through HYAS [blocked, allow]",
1171
+ "example": "blocked"
1172
+ },
1173
+ "last_seen": {
1174
+ "type": "string",
1175
+ "description": "The most recent query for the artifact",
1176
+ "example": "2021-11-05T05:00:00"
1177
+ },
1178
+ "query_count": {
1179
+ "type": "integer",
1180
+ "description": "The aggregated count of how many times the artifact was looked up, limited to the current params",
1181
+ "format": "int32",
1182
+ "example": 100
1183
+ }
1184
+ }
1185
+ },
1186
+ "Query2": {
1187
+ "title": "Query2",
1188
+ "type": "object",
1189
+ "properties": {
1190
+ "count": {
1191
+ "type": "integer",
1192
+ "description": "Query type count",
1193
+ "format": "int32",
1194
+ "example": 2058
1195
+ },
1196
+ "key": {
1197
+ "type": "string",
1198
+ "description": "Query type key",
1199
+ "example": "AAAA"
1200
+ },
1201
+ "name": {
1202
+ "type": "string",
1203
+ "description": "Query type display name",
1204
+ "example": "AAAA"
1205
+ }
1206
+ },
1207
+ "description": "Query type"
1208
+ },
1209
+ "QueryType": {
1210
+ "title": "QueryType",
1211
+ "enum": [
1212
+ "domain",
1213
+ "fqdn",
1214
+ "country",
1215
+ "tld",
1216
+ "registrar"
1217
+ ],
1218
+ "type": "string",
1219
+ "description": "The type of aggregate query to perform"
1220
+ },
1221
+ "QueryType1": {
1222
+ "title": "QueryType1",
1223
+ "enum": [
1224
+ "block_queries",
1225
+ "no_answer_queries",
1226
+ "tor_prox_vpn_queries",
1227
+ "suspicious_nameserver_queries"
1228
+ ],
1229
+ "type": "string",
1230
+ "description": "The type of bar chart query to perform"
1231
+ },
1232
+ "QueryType2": {
1233
+ "title": "QueryType2",
1234
+ "enum": [
1235
+ "queries",
1236
+ "queries_over_day",
1237
+ "queries_over_hour"
1238
+ ],
1239
+ "type": "string",
1240
+ "description": "The type of query",
1241
+ "example": "queries"
1242
+ },
1243
+ "QueryType3": {
1244
+ "title": "QueryType3",
1245
+ "enum": [
1246
+ "queries",
1247
+ "blocked_queries"
1248
+ ],
1249
+ "type": "string",
1250
+ "description": "The type of histogram query to perform"
1251
+ },
1252
+ "QueryType4": {
1253
+ "title": "QueryType4",
1254
+ "enum": [
1255
+ "total",
1256
+ "blocked",
1257
+ "indicators"
1258
+ ],
1259
+ "type": "string",
1260
+ "description": "The type of summary query to perform"
1261
+ },
1262
+ "RangeValue": {
1263
+ "title": "RangeValue",
1264
+ "type": "object",
1265
+ "properties": {
1266
+ "end": {
1267
+ "type": "string",
1268
+ "description": "The range end value",
1269
+ "example": "2021-09-24T01:21:58.283Z"
1270
+ },
1271
+ "start": {
1272
+ "type": "string",
1273
+ "description": "The range start value",
1274
+ "example": "2021-09-17T01:21:58.283Z"
1275
+ }
1276
+ }
1277
+ },
1278
+ "Report": {
1279
+ "title": "Report",
1280
+ "type": "object",
1281
+ "properties": {
1282
+ "client_id": {
1283
+ "type": "string",
1284
+ "description": "Client ID"
1285
+ },
1286
+ "datetime": {
1287
+ "type": "string",
1288
+ "description": "Report generation datetime"
1289
+ },
1290
+ "datetime_end": {
1291
+ "type": "string",
1292
+ "description": "Report end date"
1293
+ },
1294
+ "datetime_start": {
1295
+ "type": "string",
1296
+ "description": "Report start date"
1297
+ },
1298
+ "report_id": {
1299
+ "type": "string",
1300
+ "description": "Report ID"
1301
+ }
1302
+ },
1303
+ "description": "Report"
1304
+ },
1305
+ "Response": {
1306
+ "title": "Response",
1307
+ "type": "object",
1308
+ "properties": {
1309
+ "count": {
1310
+ "type": "integer",
1311
+ "description": "Response code count",
1312
+ "format": "int32",
1313
+ "example": 8980
1314
+ },
1315
+ "key": {
1316
+ "type": "string",
1317
+ "description": "Response code key",
1318
+ "example": "NoError"
1319
+ },
1320
+ "name": {
1321
+ "type": "string",
1322
+ "description": "Response code display name",
1323
+ "example": "NoError"
1324
+ }
1325
+ },
1326
+ "description": "Response codes"
1327
+ },
1328
+ "TopItem": {
1329
+ "title": "TopItem",
1330
+ "type": "object",
1331
+ "properties": {
1332
+ "current_doc_count": {
1333
+ "type": "integer",
1334
+ "format": "int32",
1335
+ "example": 9116
1336
+ },
1337
+ "key": {
1338
+ "type": "string",
1339
+ "example": "debug.opendns.com"
1340
+ },
1341
+ "previous_doc_count": {
1342
+ "type": "integer",
1343
+ "format": "int32",
1344
+ "example": 7151
1345
+ }
1346
+ }
1347
+ },
1348
+ "TopItem1": {
1349
+ "title": "TopItem1",
1350
+ "type": "object",
1351
+ "properties": {
1352
+ "current_doc_count": {
1353
+ "type": "integer",
1354
+ "format": "int32",
1355
+ "example": 369
1356
+ },
1357
+ "key": {
1358
+ "type": "string",
1359
+ "example": "2021-09-20 00:00:00"
1360
+ },
1361
+ "previous_doc_count": {
1362
+ "type": "integer",
1363
+ "format": "int32",
1364
+ "example": 303
1365
+ },
1366
+ "previous_key": {
1367
+ "type": "string",
1368
+ "example": "2021-09-13 00:00:00"
1369
+ }
1370
+ }
1371
+ }
1372
+ },
1373
+ "securitySchemes": {
1374
+ "external_auth": {
1375
+ "type": "apiKey",
1376
+ "name": "X-API-Key",
1377
+ "in": "header"
1378
+ }
1379
+ }
1380
+ },
1381
+ "security": [
1382
+ {
1383
+ "external_auth": []
1384
+ }
1385
+ ],
1386
+ "tags": [
1387
+ {
1388
+ "name": "Overview"
1389
+ },
1390
+ {
1391
+ "name": "Logs"
1392
+ },
1393
+ {
1394
+ "name": "Passthrough"
1395
+ },
1396
+ {
1397
+ "name": "Reports"
1398
+ }
1399
+ ]
1400
+ }