@cryptotaxi247 / CoPilot / commits / fcac50fe

updated connector form file check

Davide Di Modica committed Aug 11, 2023 at 16:48 UTC fcac50fe4da2508a79f7c80f374f45493d5c51a9
3 files changed +5219 -4682
backend/app/static/swagger.json
+5216 -4681
@@ -1,4682 +1,5217 @@
1 {
2 - "openapi": "3.0.3",
3 - "info": {
4 - "title": "SOCFortress CoPilot",
5 - "version": "1.0.0"
6 - },
7 - "servers": [
8 - {
9 - "url": "http://localhost:5000"
10 - }
11 - ],
12 - "tags": [
13 - {
14 - "name": "Connectors",
15 - "description": "Everything about your Connectors",
16 - "externalDocs": {
17 - "description": "Find out more",
18 - "url": "http://swagger.io"
19 - }
20 - },
21 - {
22 - "name": "Customers",
23 - "description": "Everything about your Customers",
24 - "externalDocs": {
25 - "description": "Find out more",
26 - "url": "http://swagger.io"
27 - }
28 - },
29 - {
30 - "name": "Agents",
31 - "description": "Everything about your Agents",
32 - "externalDocs": {
33 - "description": "Find out more",
34 - "url": "http://swagger.io"
35 - }
36 - },
37 - {
38 - "name": "Rules",
39 - "description": "Everything about your Wazuh Rules",
40 - "externalDocs": {
41 - "description": "Find out more",
42 - "url": "http://swagger.io"
43 - }
44 - },
45 - {
46 - "name": "Graylog",
47 - "description": "Everything about Graylog",
48 - "externalDocs": {
49 - "description": "Find out more",
50 - "url": "http://swagger.io"
51 - }
52 - },
53 - {
54 - "name": "Wazuh-Indexer",
55 - "description": "Everything about Wazuh-Indexer",
56 - "externalDocs": {
57 - "description": "Find out more",
58 - "url": "http://swagger.io"
59 - }
60 - },
61 - {
62 - "name": "Shuffle",
63 - "description": "Everything about Shuffle",
64 - "externalDocs": {
65 - "description": "Find out more",
66 - "url": "http://swagger.io"
67 - }
68 - },
69 - {
70 - "name": "Velociraptor",
71 - "description": "Everything about Velociraptor",
72 - "externalDocs": {
73 - "description": "Find out more",
74 - "url": "http://swagger.io"
75 - }
76 - },
77 - {
78 - "name": "DFIR-IRIS",
79 - "description": "Everything about DFIR-IRIS",
80 - "externalDocs": {
81 - "description": "Find out more",
82 - "url": "http://swagger.io"
83 - }
84 - },
85 - {
86 - "name": "Sublime",
87 - "description": "Everything about Sublime",
88 - "externalDocs": {
89 - "description": "Find out more",
90 - "url": "http://swagger.io"
91 - }
92 - },
93 - {
94 - "name": "InfluxDB",
95 - "description": "Everything about InfluxDB",
96 - "externalDocs": {
97 - "description": "Find out more",
98 - "url": "http://swagger.io"
99 - }
100 - },
101 - {
102 - "name": "Healthcheck",
103 - "description": "Everything about Healthcheck",
104 - "externalDocs": {
105 - "description": "Find out more",
106 - "url": "http://swagger.io"
107 - }
108 - },
109 - {
110 - "name": "SMTP",
111 - "description": "Everything about SMTP",
112 - "externalDocs": {
113 - "description": "Find out more",
114 - "url": "http://swagger.io"
115 - }
116 - },
117 - {
118 - "name": "Threat Intel",
119 - "description": "Everything about Threat Intel",
120 - "externalDocs": {
121 - "description": "Find out more",
122 - "url": "http://swagger.io"
123 - }
124 - }
125 - ],
126 - "paths": {
127 - "/connectors": {
128 - "get": {
129 - "tags": ["Connectors"],
130 - "summary": "List all available connectors",
131 - "description": "Endpoint to list all available connectors. It processes each connector to verify the connection and returns the results.",
132 - "responses": {
133 - "200": {
134 - "description": "A JSON response containing the list of all available connectors along with their connection verification status.",
135 - "content": {
136 - "application/json": {
137 - "schema": {
138 - "type": "array",
139 - "items": {
140 - "type": "object",
141 - "properties": {
142 - "connectionSuccessful": {
143 - "type": "boolean"
144 - },
145 - "connector_api_key": {
146 - "type": "string",
147 - "nullable": true
148 - },
149 - "connector_last_updated": {
150 - "type": "string",
151 - "format": "date-time"
152 - },
153 - "connector_name": {
154 - "type": "string"
155 - },
156 - "connector_password": {
157 - "type": "string",
158 - "nullable": true
159 - },
160 - "connector_type": {
161 - "type": "string"
162 - },
163 - "connector_url": {
164 - "type": "string"
165 - },
166 - "connector_username": {
167 - "type": "string",
168 - "nullable": true
169 - },
170 - "id": {
171 - "type": "integer"
172 - },
173 - "name": {
174 - "type": "string"
175 - }
176 - }
177 - }
178 - }
179 - }
180 - }
181 - }
182 - }
183 - }
184 - },
185 - "/connectors/{id}": {
186 - "get": {
187 - "tags": ["Connectors"],
188 - "summary": "Get the details of a specific connector.",
189 - "operationId": "getConnectorDetails",
190 - "parameters": [
191 - {
192 - "name": "id",
193 - "in": "path",
194 - "description": "The id of the connector to be fetched.",
195 - "required": true,
196 - "schema": {
197 - "type": "integer"
198 - }
199 - }
200 - ],
201 - "responses": {
202 - "200": {
203 - "description": "A JSON response containing the details of the connector.",
204 - "content": {
205 - "application/json": {
206 - "schema": {
207 - "type": "object",
208 - "properties": {
209 - "name": {
210 - "type": "string"
211 - },
212 - "connectionSuccessful": {
213 - "type": "boolean"
214 - },
215 - "connector_api_key": {
216 - "type": "string",
217 - "nullable": true
218 - },
219 - "connector_last_updated": {
220 - "type": "string",
221 - "format": "date-time"
222 - },
223 - "connector_name": {
224 - "type": "string"
225 - },
226 - "connector_password": {
227 - "type": "string",
228 - "nullable": true
229 - },
230 - "connector_type": {
231 - "type": "string"
232 - },
233 - "connector_url": {
234 - "type": "string"
235 - },
236 - "connector_username": {
237 - "type": "string",
238 - "nullable": true
239 - },
240 - "id": {
241 - "type": "integer"
242 - }
243 - }
244 - }
245 - }
246 - }
247 - },
248 - "404": {
249 - "description": "The connector could not be found."
250 - }
251 - }
252 - },
253 - "put": {
254 - "tags": ["Connectors"],
255 - "summary": "Update a connector",
256 - "description": "Endpoint to update a connector. If the update operation was successful, it returns the connection verification status for the updated connector.",
257 - "operationId": "update_connector_route",
258 - "parameters": [
259 - {
260 - "name": "id",
261 - "in": "path",
262 - "description": "The id of the connector to be updated.",
263 - "required": true,
264 - "schema": {
265 - "type": "integer"
266 - }
267 - }
268 - ],
269 - "requestBody": {
270 - "content": {
271 - "application/json": {
272 - "schema": {
273 - "type": "object",
274 - "properties": {
275 - "connector_url": {
276 - "type": "string"
277 - },
278 - "connector_username": {
279 - "type": "string",
280 - "nullable": true
281 - },
282 - "connector_password": {
283 - "type": "string",
284 - "nullable": true
285 - },
286 - "connector_api_key": {
287 - "type": "string",
288 - "nullable": true
289 - }
290 - }
291 - }
292 - }
293 - },
294 - "required": true
295 - },
296 - "responses": {
297 - "200": {
298 - "description": "A JSON response containing the connection verification status of the updated connector.",
299 - "content": {
300 - "application/json": {
301 - "schema": {
302 - "type": "object",
303 - "properties": {
304 - "name": {
305 - "type": "string"
306 - },
307 - "connected": {
308 - "type": "boolean"
309 - },
310 - "message": {
311 - "type": "string"
312 - }
313 - }
314 - }
315 - }
316 - }
317 - },
318 - "400": {
319 - "description": "If the request data is invalid, it returns a 400 status with an error message.",
320 - "content": {
321 - "application/json": {
322 - "schema": {
323 - "type": "object",
324 - "properties": {
325 - "message": {
326 - "type": "string"
327 - },
328 - "success": {
329 - "type": "boolean"
330 - }
331 - }
332 - }
333 - }
334 - }
335 - },
336 - "404": {
337 - "description": "If the connector is not found, it returns a 404 status with an error message.",
338 - "content": {
339 - "application/json": {
340 - "schema": {
341 - "type": "object",
342 - "properties": {
343 - "message": {
344 - "type": "string"
345 - },
346 - "success": {
347 - "type": "boolean"
348 - }
349 - }
350 - }
351 - }
352 - }
353 - }
354 - }
355 - }
356 - },
357 - "/connectors/upload": {
358 - "post": {
359 - "tags": ["Connectors"],
360 - "summary": "Upload a file",
361 - "description": "Endpoint to upload a file to the server.",
362 - "requestBody": {
363 - "content": {
364 - "multipart/form-data": {
365 - "schema": {
366 - "type": "object",
367 - "properties": {
368 - "file": {
369 - "type": "string",
370 - "format": "binary"
371 - }
372 - }
373 - }
374 - }
375 - }
376 - },
377 - "responses": {
378 - "200": {
379 - "description": "A JSON response containing the details of the uploaded file.",
380 - "content": {
381 - "application/json": {
382 - "schema": {
383 - "type": "object",
384 - "properties": {
385 - "message": {
386 - "type": "string"
387 - },
388 - "success": {
389 - "type": "boolean"
390 - }
391 - }
392 - }
393 - }
394 - }
395 - }
396 - }
397 - }
398 - },
399 - "/customers/create": {
400 - "post": {
401 - "tags": ["Customers"],
402 - "summary": "Create a new customer",
403 - "description": "Endpoint to store a new customer into the `customers` table.",
404 - "requestBody": {
405 - "content": {
406 - "application/json": {
407 - "schema": {
408 - "type": "object",
409 - "properties": {
410 - "customerCode": { "type": "string", "description": "Customer Code" },
411 - "customerName": { "type": "string", "description": "Customer Name" },
412 - "parentCustomerCode": { "type": "string", "description": "Parent Customer Code" },
413 - "contactLastName": { "type": "string", "description": "Contact Last Name" },
414 - "contactFirstName": { "type": "string", "description": "Contact First Name" },
415 - "phone": { "type": "string", "description": "Phone Number" },
416 - "addressLine1": { "type": "string", "description": "Address Line 1" },
417 - "addressLine2": { "type": "string", "description": "Address Line 2" },
418 - "city": { "type": "string", "description": "City" },
419 - "state": { "type": "string", "description": "State" },
420 - "postalCode": { "type": "string", "description": "Postal Code" },
421 - "country": { "type": "string", "description": "Country" },
422 - "customerType": { "type": "string", "description": "Customer Type" },
423 - "logoFile": { "type": "string", "description": "Logo File" },
424 - "createdAt": { "type": "string", "format": "date-time", "description": "Creation Time" }
425 - },
426 - "required": ["customerCode", "customerName"]
427 - }
428 - }
429 - }
430 - },
431 - "responses": {
432 - "201": {
433 - "description": "Customer created",
434 - "content": {
435 - "application/json": {
436 - "schema": {
437 - "type": "object",
438 - "properties": {
439 - "message": { "type": "string", "example": "Customer created successfully." },
440 - "success": { "type": "boolean", "example": true },
441 - "customer": { "$ref": "#/definitions/Customer" }
442 - }
443 - }
444 - }
445 - }
446 - },
447 - "400": {
448 - "description": "Invalid input",
449 - "content": {
450 - "application/json": {
451 - "schema": {
452 - "type": "object",
453 - "properties": {
454 - "message": { "type": "string", "example": "Invalid input" },
455 - "success": { "type": "boolean", "example": false }
456 - }
457 - }
458 - }
459 - }
460 - }
461 - }
462 - }
463 - },
464 - "/customers/read/all": {
465 - "get": {
466 - "tags": ["Customers"],
467 - "summary": "Get all customers",
468 - "description": "Endpoint to retrieve all customers from the `customers` table.",
469 - "responses": {
470 - "200": {
471 - "description": "Successful operation",
472 - "content": {
473 - "application/json": {
474 - "schema": {
475 - "type": "object",
476 - "properties": {
477 - "message": { "type": "string", "example": "Customers retrieved successfully." },
478 - "success": { "type": "boolean", "example": true },
479 - "customers": {
480 - "type": "array",
481 - "items": { "$ref": "#/definitions/Customer" }
482 - }
483 - }
484 - }
485 - }
486 - }
487 - }
488 - }
489 - }
490 - },
491 - "/customers/read/{id}": {
492 - "get": {
493 - "tags": ["Customers"],
494 - "summary": "Get a customer",
495 - "description": "Endpoint to retrieve a customer from the `customers` table.",
496 - "parameters": [
497 - {
498 - "name": "id",
499 - "in": "path",
500 - "description": "ID of the customer to retrieve",
501 - "required": true,
502 - "type": "integer"
503 - }
504 - ],
505 - "responses": {
506 - "200": {
507 - "description": "Successful operation",
508 - "content": {
509 - "application/json": {
510 - "schema": {
511 - "type": "object",
512 - "properties": {
513 - "message": { "type": "string", "example": "Customer retrieved successfully." },
514 - "success": { "type": "boolean", "example": true },
515 - "customer": { "$ref": "#/definitions/Customer" }
516 - }
517 - }
518 - }
519 - }
520 - },
521 - "404": {
522 - "description": "Customer not found",
523 - "content": {
524 - "application/json": {
525 - "schema": {
526 - "type": "object",
527 - "properties": {
528 - "message": { "type": "string", "example": "Customer not found." },
529 - "success": { "type": "boolean", "example": false }
530 - }
531 - }
532 - }
533 - }
534 - }
535 - }
536 - }
537 - },
538 - "/customers/update/{id}": {
539 - "put": {
540 - "tags": ["Customers"],
541 - "summary": "Update an existing customer",
542 - "description": "Endpoint to update a customer in the `customers` table.",
543 - "parameters": [
544 - {
545 - "name": "id",
546 - "in": "path",
547 - "description": "ID of the customer to update",
548 - "required": true,
549 - "type": "integer"
550 - }
551 - ],
552 - "requestBody": {
553 - "content": {
554 - "application/json": {
555 - "schema": {
556 - "type": "object",
557 - "properties": {
558 - "customerCode": { "type": "string", "description": "Customer Code" },
559 - "customerName": { "type": "string", "description": "Customer Name" },
560 - "parentCustomerCode": { "type": "string", "description": "Parent Customer Code" },
561 - "contactLastName": { "type": "string", "description": "Contact Last Name" },
562 - "contactFirstName": { "type": "string", "description": "Contact First Name" },
563 - "phone": { "type": "string", "description": "Phone Number" },
564 - "addressLine1": { "type": "string", "description": "Address Line 1" },
565 - "addressLine2": { "type": "string", "description": "Address Line 2" },
566 - "city": { "type": "string", "description": "City" },
567 - "state": { "type": "string", "description": "State" },
568 - "postalCode": { "type": "string", "description": "Postal Code" },
569 - "country": { "type": "string", "description": "Country" },
570 - "customerType": { "type": "string", "description": "Customer Type" },
571 - "logoFile": { "type": "string", "description": "Logo File" },
572 - "createdAt": { "type": "string", "format": "date-time", "description": "Creation Time" }
573 - }
574 - }
575 - }
576 - }
577 - },
578 - "responses": {
579 - "201": {
580 - "description": "Customer updated",
581 - "content": {
582 - "application/json": {
583 - "schema": {
584 - "type": "object",
585 - "properties": {
586 - "message": { "type": "string", "example": "Customer updated successfully." },
587 - "success": { "type": "boolean", "example": true },
588 - "customer": { "$ref": "#/definitions/Customer" }
589 - }
590 - }
591 - }
592 - }
593 - },
594 - "400": {
595 - "description": "Invalid input",
596 - "content": {
597 - "application/json": {
598 - "schema": {
599 - "type": "object",
600 - "properties": {
601 - "message": { "type": "string", "example": "Invalid input" },
602 - "success": { "type": "boolean", "example": false }
603 - }
604 - }
605 - }
606 - }
607 - }
608 - }
609 - }
610 - },
611 - "/customers_meta/create": {
612 - "post": {
613 - "tags": ["Customers Meta"],
614 - "summary": "Create a new customer meta",
615 - "description": "Endpoint to store a new customer meta into the `CustomersMeta` table.",
616 - "requestBody": {
617 - "content": {
618 - "application/json": {
619 - "schema": {
620 - "type": "object",
621 - "properties": {
622 - "customerCode": { "type": "string", "description": "Customer Code" },
623 - "clientName": { "type": "string", "description": "Client Name" },
624 - "customerMetaGraylogIndex": { "type": "string", "description": "Customer Meta Graylog Index" },
625 - "customerMetaGraylogStream": { "type": "string", "description": "Customer Meta Graylog Stream" },
626 - "customerMetaInfluxOrg": { "type": "string", "description": "Customer Meta Influx Org" },
627 - "customerMetaGrafanaOrg": { "type": "string", "description": "Customer Meta Grafana Org" },
628 - "customerMetaWazuhGroup": { "type": "string", "description": "Customer Meta Wazuh Group" },
629 - "indexRetention": { "type": "integer", "description": "Index Retention" },
630 - "wazuhRegistrationPort": { "type": "integer", "description": "Wazuh Registration Port" },
631 - "wazuhLogIngestionPort": { "type": "integer", "description": "Wazuh Log Ingestion Port" }
632 - },
633 - "required": ["customerCode"]
634 - }
635 - }
636 - }
637 - },
638 - "responses": {
639 - "201": {
640 - "description": "Customer Meta created",
641 - "content": {
642 - "application/json": {
643 - "schema": {
644 - "type": "object",
645 - "properties": {
646 - "message": { "type": "string", "example": "Customer Meta created successfully." },
647 - "success": { "type": "boolean", "example": true },
648 - "customerMeta": { "$ref": "#/definitions/CustomerMeta" }
649 - }
650 - }
651 - }
652 - }
653 - },
654 - "400": {
655 - "description": "Invalid input",
656 - "content": {
657 - "application/json": {
658 - "schema": {
659 - "type": "object",
660 - "properties": {
661 - "message": { "type": "string", "example": "Invalid input" },
662 - "success": { "type": "boolean", "example": false }
663 - }
664 - }
665 - }
666 - }
667 - }
668 - }
669 - }
670 - },
671 - "/customers_meta/read/all": {
672 - "get": {
673 - "tags": ["Customers Meta"],
674 - "summary": "Get all customers meta",
675 - "description": "Endpoint to retrieve all customers meta from the `CustomersMeta` table.",
676 - "responses": {
677 - "200": {
678 - "description": "Successful operation",
679 - "content": {
680 - "application/json": {
681 - "schema": {
682 - "type": "object",
683 - "properties": {
684 - "message": { "type": "string", "example": "Customers Meta retrieved successfully." },
685 - "success": { "type": "boolean", "example": true },
686 - "customersMeta": {
687 - "type": "array",
688 - "items": { "$ref": "#/definitions/CustomerMeta" }
689 - }
690 - }
691 - }
692 - }
693 - }
694 - }
695 - }
696 - }
697 - },
698 - "/customers_meta/read/{id}": {
699 - "get": {
700 - "tags": ["Customers Meta"],
701 - "summary": "Get a customer",
702 - "description": "Endpoint to retrieve a customer meta details from the `customers_meta` table.",
703 - "parameters": [
704 - {
705 - "name": "id",
706 - "in": "path",
707 - "description": "ID of the customer to retrieve",
708 - "required": true,
709 - "type": "integer"
710 - }
711 - ],
712 - "responses": {
713 - "200": {
714 - "description": "Successful operation",
715 - "content": {
716 - "application/json": {
717 - "schema": {
718 - "type": "object",
719 - "properties": {
720 - "message": { "type": "string", "example": "Customer retrieved successfully." },
721 - "success": { "type": "boolean", "example": true },
722 - "customer": { "$ref": "#/definitions/Customer" }
723 - }
724 - }
725 - }
726 - }
727 - },
728 - "404": {
729 - "description": "Customer not found",
730 - "content": {
731 - "application/json": {
732 - "schema": {
733 - "type": "object",
734 - "properties": {
735 - "message": { "type": "string", "example": "Customer not found." },
736 - "success": { "type": "boolean", "example": false }
737 - }
738 - }
739 - }
740 - }
741 - }
742 - }
743 - }
744 - },
745 - "/customers_meta/update/{id}": {
746 - "put": {
747 - "tags": ["Customers Meta"],
748 - "summary": "Update an existing customer meta",
749 - "description": "Endpoint to update an existing customer meta in the `CustomersMeta` table.",
750 - "parameters": [
751 - {
752 - "name": "id",
753 - "in": "path",
754 - "description": "ID of customer meta to update",
755 - "required": true,
756 - "schema": {
757 - "type": "integer"
758 - }
759 - }
760 - ],
761 - "requestBody": {
762 - "content": {
763 - "application/json": {
764 - "schema": {
765 - "type": "object",
766 - "properties": {
767 - "customerCode": { "type": "string", "description": "Customer Code" },
768 - "clientName": { "type": "string", "description": "Client Name" },
769 - "customerMetaGraylogIndex": { "type": "string", "description": "Customer Meta Graylog Index" },
770 - "customerMetaGraylogStream": { "type": "string", "description": "Customer Meta Graylog Stream" },
771 - "customerMetaInfluxOrg": { "type": "string", "description": "Customer Meta Influx Org" },
772 - "customerMetaGrafanaOrg": { "type": "string", "description": "Customer Meta Grafana Org" },
773 - "customerMetaWazuhGroup": { "type": "string", "description": "Customer Meta Wazuh Group" },
774 - "indexRetention": { "type": "integer", "description": "Index Retention" },
775 - "wazuhRegistrationPort": { "type": "integer", "description": "Wazuh Registration Port" },
776 - "wazuhLogIngestionPort": { "type": "integer", "description": "Wazuh Log Ingestion Port" }
777 - }
778 - }
779 - }
780 - }
781 - },
782 - "responses": {
783 - "200": {
784 - "description": "Customer Meta updated",
785 - "content": {
786 - "application/json": {
787 - "schema": {
788 - "type": "object",
789 - "properties": {
790 - "message": { "type": "string", "example": "Customer Meta updated successfully." },
791 - "success": { "type": "boolean", "example": true },
792 - "customerMeta": { "$ref": "#/definitions/CustomerMeta" }
793 - }
794 - }
795 - }
796 - }
797 - },
798 - "400": {
799 - "description": "Invalid input",
800 - "content": {
801 - "application/json": {
802 - "schema": {
803 - "type": "object",
804 - "properties": {
805 - "message": { "type": "string", "example": "Invalid input" },
806 - "success": { "type": "boolean", "example": false }
807 - }
808 - }
809 - }
810 - }
811 - },
812 - "404": {
813 - "description": "Customer Meta not found",
814 - "content": {
815 - "application/json": {
816 - "schema": {
817 - "type": "object",
818 - "properties": {
819 - "message": { "type": "string", "example": "Customer Meta not found" },
820 - "success": { "type": "boolean", "example": false }
821 - }
822 - }
823 - }
824 - }
825 - }
826 - }
827 - }
828 - },
829 - "/customers/details/{id}": {
830 - "get": {
831 - "tags": ["Customers"],
832 - "summary": "Get a customer",
833 - "description": "Endpoint to retrieve a customer details from the `customers` and `customers_meta` tables.",
834 - "parameters": [
835 - {
836 - "name": "id",
837 - "in": "path",
838 - "description": "ID of the customer to retrieve",
839 - "required": true,
840 - "type": "integer"
841 - }
842 - ],
843 - "responses": {
844 - "200": {
845 - "description": "Successful operation",
846 - "content": {
847 - "application/json": {
848 - "schema": {
849 - "type": "object",
850 - "properties": {
851 - "message": { "type": "string", "example": "Customer retrieved successfully." },
852 - "success": { "type": "boolean", "example": true },
853 - "customer": { "$ref": "#/definitions/Customer" },
854 - "customerMeta": { "$ref": "#/definitions/CustomerMeta" }
855 - }
856 - }
857 - }
858 - }
859 - },
860 - "404": {
861 - "description": "Customer not found",
862 - "content": {
863 - "application/json": {
864 - "schema": {
865 - "type": "object",
866 - "properties": {
867 - "message": { "type": "string", "example": "Customer not found." },
868 - "success": { "type": "boolean", "example": false }
869 - }
870 - }
871 - }
872 - }
873 - }
874 - }
875 - }
876 - },
877 - "/customers/agents/{id}": {
878 - "get": {
879 - "tags": ["Customers"],
880 - "summary": "Get a customer",
881 - "description": "Endpoint to retrieve a customer details from the `customers` and `customers_meta` tables.",
882 - "parameters": [
883 - {
884 - "name": "id",
885 - "in": "path",
886 - "description": "ID of the customer to retrieve",
887 - "required": true,
888 - "type": "integer"
889 - }
890 - ],
891 - "responses": {
892 - "200": {
893 - "description": "Successful operation",
894 - "content": {
895 - "application/json": {
896 - "schema": {
897 - "type": "object",
898 - "properties": {
899 - "message": { "type": "string", "example": "Customer retrieved successfully." },
900 - "success": { "type": "boolean", "example": true },
901 - "customer": { "$ref": "#/definitions/Customer" },
902 - "customerMeta": { "$ref": "#/definitions/CustomerMeta" }
903 - }
904 - }
905 - }
906 - }
907 - },
908 - "404": {
909 - "description": "Customer not found",
910 - "content": {
911 - "application/json": {
912 - "schema": {
913 - "type": "object",
914 - "properties": {
915 - "message": { "type": "string", "example": "Customer not found." },
916 - "success": { "type": "boolean", "example": false }
917 - }
918 - }
919 - }
920 - }
921 - }
922 - }
923 - }
924 - },
925 - "/customers/healthchecks/agents/{id}/wazuh": {
926 - "get": {
927 - "tags": ["Customers"],
928 - "summary": "Get a customer",
929 - "description": "Endpoint to retrieve a customer details from the `customers` and `customers_meta` tables.",
930 - "parameters": [
931 - {
932 - "name": "id",
933 - "in": "path",
934 - "description": "ID of the customer to retrieve",
935 - "required": true,
936 - "type": "integer"
937 - }
938 - ],
939 - "responses": {
940 - "200": {
941 - "description": "Successful operation",
942 - "content": {
943 - "application/json": {
944 - "schema": {
945 - "type": "object",
946 - "properties": {
947 - "message": { "type": "string", "example": "Customer retrieved successfully." },
948 - "success": { "type": "boolean", "example": true },
949 - "customer": { "$ref": "#/definitions/Customer" },
950 - "customerMeta": { "$ref": "#/definitions/CustomerMeta" }
951 - }
952 - }
953 - }
954 - }
955 - },
956 - "404": {
957 - "description": "Customer not found",
958 - "content": {
959 - "application/json": {
960 - "schema": {
961 - "type": "object",
962 - "properties": {
963 - "message": { "type": "string", "example": "Customer not found." },
964 - "success": { "type": "boolean", "example": false }
965 - }
966 - }
967 - }
968 - }
969 - }
970 - }
971 - }
972 - },
973 - "/customers/healthchecks/agents/{id}/velociraptor": {
974 - "get": {
975 - "tags": ["Customers"],
976 - "summary": "Get a customer",
977 - "description": "Endpoint to retrieve a customer details from the `customers` and `customers_meta` tables.",
978 - "parameters": [
979 - {
980 - "name": "id",
981 - "in": "path",
982 - "description": "ID of the customer to retrieve",
983 - "required": true,
984 - "type": "integer"
985 - }
986 - ],
987 - "responses": {
988 - "200": {
989 - "description": "Successful operation",
990 - "content": {
991 - "application/json": {
992 - "schema": {
993 - "type": "object",
994 - "properties": {
995 - "message": { "type": "string", "example": "Customer retrieved successfully." },
996 - "success": { "type": "boolean", "example": true },
997 - "customer": { "$ref": "#/definitions/Customer" },
998 - "customerMeta": { "$ref": "#/definitions/CustomerMeta" }
999 - }
1000 - }
1001 - }
1002 - }
1003 - },
1004 - "404": {
1005 - "description": "Customer not found",
1006 - "content": {
1007 - "application/json": {
1008 - "schema": {
1009 - "type": "object",
1010 - "properties": {
1011 - "message": { "type": "string", "example": "Customer not found." },
1012 - "success": { "type": "boolean", "example": false }
1013 - }
1014 - }
1015 - }
1016 - }
1017 - }
1018 - }
1019 - }
1020 - },
1021 - "/customers/healthchecks/agents/{id}/full": {
1022 - "get": {
1023 - "tags": ["Customers"],
1024 - "summary": "Get a customer",
1025 - "description": "Endpoint to retrieve a customer details from the `customers` and `customers_meta` tables.",
1026 - "parameters": [
1027 - {
1028 - "name": "id",
1029 - "in": "path",
1030 - "description": "ID of the customer to retrieve",
1031 - "required": true,
1032 - "type": "integer"
1033 - }
1034 - ],
1035 - "responses": {
1036 - "200": {
1037 - "description": "Successful operation",
1038 - "content": {
1039 - "application/json": {
1040 - "schema": {
1041 - "type": "object",
1042 - "properties": {
1043 - "message": { "type": "string", "example": "Customer retrieved successfully." },
1044 - "success": { "type": "boolean", "example": true },
1045 - "customer": { "$ref": "#/definitions/Customer" },
1046 - "customerMeta": { "$ref": "#/definitions/CustomerMeta" }
1047 - }
1048 - }
1049 - }
1050 - }
1051 - },
1052 - "404": {
1053 - "description": "Customer not found",
1054 - "content": {
1055 - "application/json": {
1056 - "schema": {
1057 - "type": "object",
1058 - "properties": {
1059 - "message": { "type": "string", "example": "Customer not found." },
1060 - "success": { "type": "boolean", "example": false }
1061 - }
1062 - }
1063 - }
1064 - }
1065 - }
1066 - }
1067 - }
1068 - },
1069 - "/agents": {
1070 - "get": {
1071 - "tags": ["Agents"],
1072 - "summary": "List all available agents",
1073 - "description": "Endpoint to list all available agents. It processes each agent to verify the connection and returns the results.",
1074 - "responses": {
1075 - "200": {
1076 - "description": "Successful operation",
1077 - "content": {
1078 - "application/json": {
1079 - "schema": {
1080 - "type": "array",
1081 - "items": {
1082 - "$ref": "#/components/schemas/Agent"
1083 - }
1084 - }
1085 - }
1086 - }
1087 - }
1088 - }
1089 - }
1090 - },
1091 - "/agents/{id}": {
1092 - "get": {
1093 - "tags": ["Agents"],
1094 - "summary": "Get details of a specific agent",
1095 - "description": "Endpoint to get the details of an agent.",
1096 - "parameters": [
1097 - {
1098 - "name": "id",
1099 - "in": "path",
1100 - "required": true,
1101 - "description": "ID of the agent to be fetched",
1102 - "schema": {
1103 - "type": "string"
1104 - }
1105 - }
1106 - ],
1107 - "responses": {
1108 - "200": {
1109 - "description": "Successful operation",
1110 - "content": {
1111 - "application/json": {
1112 - "schema": {
1113 - "$ref": "#/components/schemas/Agent"
1114 - }
1115 - }
1116 - }
1117 - }
1118 - }
1119 - }
1120 - },
1121 - "/agents/{id}/critical": {
1122 - "post": {
1123 - "tags": ["Agents"],
1124 - "summary": "Marks an agent as critical",
1125 - "description": "Marks an agent as a critical asset in the database.",
1126 - "parameters": [
1127 - {
1128 - "name": "id",
1129 - "in": "path",
1130 - "description": "ID of the agent to be marked as critical",
1131 - "required": true,
1132 - "type": "string"
1133 - }
1134 - ],
1135 - "responses": {
1136 - "200": {
1137 - "description": "Agent marked as critical",
1138 - "schema": {
1139 - "$ref": "#/definitions/Agent"
1140 - }
1141 - },
1142 - "400": {
1143 - "description": "Invalid ID supplied"
1144 - },
1145 - "404": {
1146 - "description": "Agent not found"
1147 - }
1148 - }
1149 - }
1150 - },
1151 - "/agents/{id}/delete": {
1152 - "post": {
1153 - "tags": ["Agents"],
1154 - "summary": "Deletes an agent",
1155 - "description": "Deletes an agent from the database.",
1156 - "parameters": [
1157 - {
1158 - "name": "id",
1159 - "in": "path",
1160 - "description": "ID of the agent to be deleted",
1161 - "required": true,
1162 - "type": "string"
1163 - }
1164 - ],
1165 - "responses": {
1166 - "200": {
1167 - "description": "Agent deleted",
1168 - "schema": {
1169 - "$ref": "#/definitions/Agent"
1170 - }
1171 - },
1172 - "400": {
1173 - "description": "Invalid ID supplied"
1174 - },
1175 - "404": {
1176 - "description": "Agent not found"
1177 - }
1178 - }
1179 - }
1180 - },
1181 - "/agents/{id}/noncritical": {
1182 - "post": {
1183 - "tags": ["Agents"],
1184 - "summary": "Unmarks an agent as critical",
1185 - "description": "Marks an agent as a non-critical asset in the database.",
1186 - "parameters": [
1187 - {
1188 - "name": "id",
1189 - "in": "path",
1190 - "description": "ID of the agent to be unmarked as critical",
1191 - "required": true,
1192 - "type": "string"
1193 - }
1194 - ],
1195 - "responses": {
1196 - "200": {
1197 - "description": "Agent unmarked as critical",
1198 - "schema": {
1199 - "$ref": "#/definitions/Agent"
1200 - }
1201 - },
1202 - "400": {
1203 - "description": "Invalid ID supplied"
1204 - },
1205 - "404": {
1206 - "description": "Agent not found"
1207 - }
1208 - }
1209 - }
1210 - },
1211 - "/agents/sync": {
1212 - "post": {
1213 - "summary": "Sync all agents",
1214 - "description": "Endpoint to sync all agents.",
1215 - "responses": {
1216 - "200": {
1217 - "description": "Successful operation",
1218 - "content": {
1219 - "application/json": {
1220 - "schema": {
1221 - "type": "object",
1222 - "properties": {
1223 - "message": {
1224 - "type": "string",
1225 - "description": "Operation message"
1226 - },
1227 - "success": {
1228 - "type": "boolean",
1229 - "description": "Indicates if the operation was successful"
1230 - },
1231 - "agents_added": {
1232 - "type": "array",
1233 - "items": {
1234 - "type": "object",
1235 - "description": "Agent details"
1236 - }
1237 - }
1238 - }
1239 - }
1240 - }
1241 - }
1242 - },
1243 - "default": {
1244 - "description": "Unexpected error",
1245 - "content": {
1246 - "application/json": {
1247 - "schema": {
1248 - "$ref": "#/components/schemas/Error"
1249 - }
1250 - }
1251 - }
1252 - }
1253 - },
1254 - "operationId": "syncAgents",
1255 - "tags": ["Agents"]
1256 - }
1257 - },
1258 - "/agents/{id}/vulnerabilities": {
1259 - "get": {
1260 - "tags": ["Agents"],
1261 - "summary": "Get vulnerabilities of a specific agent",
1262 - "description": "Endpoint to get the vulnerabilities of an agent.",
1263 - "parameters": [
1264 - {
1265 - "name": "id",
1266 - "in": "path",
1267 - "required": true,
1268 - "description": "ID of the agent to be fetched",
1269 - "schema": {
1270 - "type": "string"
1271 - }
1272 - }
1273 - ],
1274 - "responses": {
1275 - "200": {
1276 - "description": "Successful operation",
1277 - "content": {
1278 - "application/json": {
1279 - "schema": {
1280 - "type": "array",
1281 - "items": {
1282 - "$ref": "#/components/schemas/Vulnerability"
1283 - }
1284 - }
1285 - }
1286 - }
1287 - }
1288 - }
1289 - }
1290 - },
1291 - "/agents/wazuh/outdated": {
1292 - "get": {
1293 - "tags": ["Agents"],
1294 - "summary": "Get outdated Wazuh agents",
1295 - "description": "Endpoint to get the outdated Wazuh agents.",
1296 - "responses": {
1297 - "200": {
1298 - "description": "Successful operation",
1299 - "content": {
1300 - "application/json": {
1301 - "schema": {
1302 - "type": "array",
1303 - "items": {
1304 - "$ref": "#/components/schemas/Agent"
1305 - }
1306 - }
1307 - }
1308 - }
1309 - }
1310 - }
1311 - }
1312 - },
1313 - "/agents/velociraptor/outdated": {
1314 - "get": {
1315 - "tags": ["Agents"],
1316 - "summary": "Get outdated Velociraptor agents",
1317 - "description": "Endpoint to get the outdated Velociraptor agents.",
1318 - "responses": {
1319 - "200": {
1320 - "description": "Successful operation",
1321 - "content": {
1322 - "application/json": {
1323 - "schema": {
1324 - "type": "array",
1325 - "items": {
1326 - "$ref": "#/components/schemas/Agent"
1327 - }
1328 - }
1329 - }
1330 - }
1331 - }
1332 - }
1333 - }
1334 - },
1335 - "/rule/disable": {
1336 - "post": {
1337 - "summary": "Disable a rule",
1338 - "description": "Endpoint to disable a rule.",
1339 - "requestBody": {
1340 - "content": {
1341 - "application/json": {
1342 - "schema": {
1343 - "type": "object",
1344 - "properties": {
1345 - "rule_id": {
1346 - "type": "string",
1347 - "description": "The ID of the rule to be disabled."
1348 - },
1349 - "reason": {
1350 - "type": "string",
1351 - "description": "The reason for disabling the rule."
1352 - },
1353 - "length_of_time": {
1354 - "type": "integer",
1355 - "description": "The length of time the rule should be disabled for."
1356 - }
1357 - }
1358 - }
1359 - }
1360 - }
1361 - },
1362 - "responses": {
1363 - "200": {
1364 - "description": "Successful operation",
1365 - "content": {
1366 - "application/json": {
1367 - "schema": {
1368 - "type": "object",
1369 - "properties": {
1370 - "message": {
1371 - "type": "string",
1372 - "description": "Operation message"
1373 - },
1374 - "success": {
1375 - "type": "boolean",
1376 - "description": "Indicates if the operation was successful"
1377 - }
1378 - }
1379 - }
1380 - }
1381 - }
1382 - },
1383 - "default": {
1384 - "description": "Unexpected error",
1385 - "content": {
1386 - "application/json": {
1387 - "schema": {
1388 - "$ref": "#/components/schemas/Error"
1389 - }
1390 - }
1391 - }
1392 - }
1393 - },
1394 - "operationId": "disableRule",
1395 - "tags": ["Rules"]
1396 - }
1397 - },
1398 - "/rule/enable": {
1399 - "post": {
1400 - "summary": "Enable a rule",
1401 - "description": "Endpoint to enable a rule.",
1402 - "requestBody": {
1403 - "content": {
1404 - "application/json": {
1405 - "schema": {
1406 - "type": "object",
1407 - "properties": {
1408 - "rule_id": {
1409 - "type": "string",
1410 - "description": "The ID of the rule to be enabled."
1411 - }
1412 - }
1413 - }
1414 - }
1415 - }
1416 - },
1417 - "responses": {
1418 - "200": {
1419 - "description": "Successful operation",
1420 - "content": {
1421 - "application/json": {
1422 - "schema": {
1423 - "type": "object",
1424 - "properties": {
1425 - "message": {
1426 - "type": "string",
1427 - "description": "Operation message"
1428 - },
1429 - "success": {
1430 - "type": "boolean",
1431 - "description": "Indicates if the operation was successful"
1432 - }
1433 - }
1434 - }
1435 - }
1436 - }
1437 - },
1438 - "default": {
1439 - "description": "Unexpected error",
1440 - "content": {
1441 - "application/json": {
1442 - "schema": {
1443 - "$ref": "#/components/schemas/Error"
1444 - }
1445 - }
1446 - }
1447 - }
1448 - },
1449 - "operationId": "enableRule",
1450 - "tags": ["Rules"]
1451 - }
1452 - },
1453 - "/graylog/messages": {
1454 - "get": {
1455 - "summary": "Get messages from Graylog",
1456 - "description": "Endpoint to get messages from Graylog.",
1457 - "responses": {
1458 - "200": {
1459 - "description": "Successful operation",
1460 - "content": {
1461 - "application/json": {
1462 - "schema": {
1463 - "type": "object",
1464 - "properties": {
1465 - "messages": {
1466 - "type": "array",
1467 - "items": {
1468 - "type": "object",
1469 - "description": "Message details"
1470 - }
1471 - }
1472 - }
1473 - }
1474 - }
1475 - }
1476 - },
1477 - "default": {
1478 - "description": "Unexpected error",
1479 - "content": {
1480 - "application/json": {
1481 - "schema": {
1482 - "$ref": "#/components/schemas/Error"
1483 - }
1484 - }
1485 - }
1486 - }
1487 - },
1488 - "operationId": "getGraylogMessages",
1489 - "tags": ["Graylog"]
1490 - }
1491 - },
1492 - "/graylog/metrics": {
1493 - "get": {
1494 - "summary": "Get metrics from Graylog",
1495 - "description": "Endpoint to get metrics from Graylog.",
1496 - "responses": {
1497 - "200": {
1498 - "description": "Successful operation",
1499 - "content": {
1500 - "application/json": {
1501 - "schema": {
1502 - "type": "object",
1503 - "properties": {
1504 - "metrics": {
1505 - "type": "array",
1506 - "items": {
1507 - "type": "object",
1508 - "description": "Metric details"
1509 - }
1510 - }
1511 - }
1512 - }
1513 - }
1514 - }
1515 - },
1516 - "default": {
1517 - "description": "Unexpected error",
1518 - "content": {
1519 - "application/json": {
1520 - "schema": {
1521 - "$ref": "#/components/schemas/Error"
1522 - }
1523 - }
1524 - }
1525 - }
1526 - },
1527 - "operationId": "getGraylogMetrics",
1528 - "tags": ["Graylog"]
1529 - }
1530 - },
1531 - "/graylog/indices": {
1532 - "get": {
1533 - "summary": "Get indices from Graylog",
1534 - "description": "Endpoint to get indices from Graylog.",
1535 - "responses": {
1536 - "200": {
1537 - "description": "Successful operation",
1538 - "content": {
1539 - "application/json": {
1540 - "schema": {
1541 - "type": "object",
1542 - "properties": {
1543 - "indices": {
1544 - "type": "array",
1545 - "items": {
1546 - "type": "object",
1547 - "description": "Index details"
1548 - }
1549 - }
1550 - }
1551 - }
1552 - }
1553 - }
1554 - },
1555 - "default": {
1556 - "description": "Unexpected error",
1557 - "content": {
1558 - "application/json": {
1559 - "schema": {
1560 - "$ref": "#/components/schemas/Error"
1561 - }
1562 - }
1563 - }
1564 - }
1565 - },
1566 - "operationId": "getGraylogIndices",
1567 - "tags": ["Graylog"]
1568 - }
1569 - },
1570 - "/graylog/indices/{index_name}/delete": {
1571 - "delete": {
1572 - "tags": ["Graylog"],
1573 - "summary": "Deletes a Graylog index",
1574 - "description": "Endpoint to delete a Graylog index.",
1575 - "parameters": [
1576 - {
1577 - "name": "index_name",
1578 - "in": "path",
1579 - "description": "The name of the index to be deleted.",
1580 - "required": true,
1581 - "type": "string"
1582 - }
1583 - ],
1584 - "responses": {
1585 - "200": {
1586 - "description": "Successful operation",
1587 - "schema": {
1588 - "type": "object",
1589 - "properties": {
1590 - "message": {
1591 - "type": "string"
1592 - },
1593 - "success": {
1594 - "type": "boolean"
1595 - }
1596 - }
1597 - }
1598 - },
1599 - "400": {
1600 - "description": "Bad request",
1601 - "schema": {
1602 - "type": "object",
1603 - "properties": {
1604 - "message": {
1605 - "type": "string"
1606 - },
1607 - "success": {
1608 - "type": "boolean"
1609 - }
1610 - }
1611 - }
1612 - },
1613 - "404": {
1614 - "description": "Index not found",
1615 - "schema": {
1616 - "type": "object",
1617 - "properties": {
1618 - "message": {
1619 - "type": "string"
1620 - },
1621 - "success": {
1622 - "type": "boolean"
1623 - }
1624 - }
1625 - }
1626 - }
1627 - }
1628 - }
1629 - },
1630 - "/graylog/inputs": {
1631 - "get": {
1632 - "summary": "Get inputs from Graylog",
1633 - "description": "Endpoint to get inputs from Graylog.",
1634 - "responses": {
1635 - "200": {
1636 - "description": "Successful operation",
1637 - "content": {
1638 - "application/json": {
1639 - "schema": {
1640 - "type": "object",
1641 - "properties": {
1642 - "inputs": {
1643 - "type": "array",
1644 - "items": {
1645 - "type": "object",
1646 - "description": "Input details"
1647 - }
1648 - }
1649 - }
1650 - }
1651 - }
1652 - }
1653 - },
1654 - "default": {
1655 - "description": "Unexpected error",
1656 - "content": {
1657 - "application/json": {
1658 - "schema": {
1659 - "$ref": "#/components/schemas/Error"
1660 - }
1661 - }
1662 - }
1663 - }
1664 - },
1665 - "operationId": "getGraylogInputs",
1666 - "tags": ["Graylog"]
1667 - }
1668 - },
1669 - "/alerts": {
1670 - "post": {
1671 - "summary": "Create and get alerts",
1672 - "description": "Endpoint to create and get alerts. Retrieves all available alerts from the AlertsService based on the provided parameters.",
1673 - "requestBody": {
1674 - "content": {
1675 - "application/json": {
1676 - "schema": {
1677 - "type": "object",
1678 - "properties": {
1679 - "size": {
1680 - "type": "integer",
1681 - "default": 10,
1682 - "description": "The number of alerts to return. Defaults to 10."
1683 - },
1684 - "timerange": {
1685 - "type": "string",
1686 - "default": "24h",
1687 - "description": "The time range to consider for alerts. Defaults to '24h'."
1688 - },
1689 - "alert_field": {
1690 - "type": "string",
1691 - "default": "syslog_level",
1692 - "description": "Field to filter alerts on. Defaults to 'syslog_level'."
1693 - },
1694 - "alert_value": {
1695 - "type": "string",
1696 - "default": "ALERT",
1697 - "description": "Value to filter alerts on. Defaults to 'ALERT'."
1698 - },
1699 - "timestamp_field": {
1700 - "type": "string",
1701 - "default": "timestamp_utc",
1702 - "description": "Field to filter alerts on. Defaults to '@timestamp'."
1703 - }
1704 - },
1705 - "required": []
1706 - }
1707 - }
1708 - }
1709 - },
1710 - "responses": {
1711 - "200": {
1712 - "description": "Successful operation",
1713 - "content": {
1714 - "application/json": {
1715 - "schema": {
1716 - "type": "object",
1717 - "properties": {
1718 - "alerts": {
1719 - "type": "array",
1720 - "items": {
1721 - "type": "object",
1722 - "description": "Alert details"
1723 - }
1724 - }
1725 - }
1726 - }
1727 - }
1728 - }
1729 - },
1730 - "default": {
1731 - "description": "Unexpected error",
1732 - "content": {
1733 - "application/json": {
1734 - "schema": {
1735 - "$ref": "#/components/schemas/Error"
1736 - }
1737 - }
1738 - }
1739 - }
1740 - },
1741 - "operationId": "createAndGetAlerts",
1742 - "tags": ["Wazuh-Indexer"]
1743 - }
1744 - },
1745 - "/alerts/agent": {
1746 - "post": {
1747 - "summary": "Create and get alerts from a specific agent",
1748 - "description": "Endpoint to create and get alerts from a specific agent. Retrieves all available alerts from the AlertsService based on the provided parameters.",
1749 - "requestBody": {
1750 - "content": {
1751 - "application/json": {
1752 - "schema": {
1753 - "type": "object",
1754 - "properties": {
1755 - "agent_name": {
1756 - "type": "string",
1757 - "default": "WIN-HFOU106TD7K",
1758 - "description": "The name of the host to get alerts from."
1759 - },
1760 - "size": {
1761 - "type": "integer",
1762 - "default": 10,
1763 - "description": "The number of alerts to return. Defaults to 10."
1764 - },
1765 - "timerange": {
1766 - "type": "string",
1767 - "default": "24h",
1768 - "description": "The time range to consider for alerts. Defaults to '24h'."
1769 - },
1770 - "alert_field": {
1771 - "type": "string",
1772 - "default": "syslog_level",
1773 - "description": "Field to filter alerts on. Defaults to 'syslog_level'."
1774 - },
1775 - "alert_value": {
1776 - "type": "string",
1777 - "default": "ALERT",
1778 - "description": "Value to filter alerts on. Defaults to 'ALERT'."
1779 - },
1780 - "timestamp_field": {
1781 - "type": "string",
1782 - "default": "timestamp_utc",
1783 - "description": "Field to filter alerts on. Defaults to '@timestamp'."
1784 - }
1785 - },
1786 - "required": []
1787 - }
1788 - }
1789 - }
1790 - },
1791 - "responses": {
1792 - "200": {
1793 - "description": "Successful operation",
1794 - "content": {
1795 - "application/json": {
1796 - "schema": {
1797 - "type": "object",
1798 - "properties": {
1799 - "alerts": {
1800 - "type": "array",
1801 - "items": {
1802 - "type": "object",
1803 - "description": "Alert details"
1804 - }
1805 - }
1806 - }
1807 - }
1808 - }
1809 - }
1810 - },
1811 - "400": {
1812 - "description": "Bad request",
1813 - "content": {
1814 - "application/json": {
1815 - "schema": {
1816 - "type": "object",
1817 - "properties": {
1818 - "message": {
1819 - "type": "string"
1820 - },
1821 - "success": {
1822 - "type": "boolean"
1823 - }
1824 - }
1825 - }
1826 - }
1827 - }
1828 - },
1829 - "404": {
1830 - "description": "Index not found",
1831 - "content": {
1832 - "application/json": {
1833 - "schema": {
1834 - "type": "object",
1835 - "properties": {
1836 - "message": {
1837 - "type": "string"
1838 - },
1839 - "success": {
1840 - "type": "boolean"
1841 - }
1842 - }
1843 - }
1844 - }
1845 - }
1846 - },
1847 - "default": {
1848 - "description": "Unexpected error",
1849 - "content": {
1850 - "application/json": {
1851 - "schema": {
1852 - "$ref": "#/components/schemas/Error"
1853 - }
1854 - }
1855 - }
1856 - }
1857 - },
1858 - "operationId": "createAndGetAlertsByAgent",
1859 - "tags": ["Wazuh-Indexer"]
1860 - }
1861 - },
1862 - "/alerts/index": {
1863 - "post": {
1864 - "summary": "Create and get alerts from an index",
1865 - "description": "Endpoint to create and get alerts from an index. Retrieves all available alerts from the AlertsService based on the provided parameters.",
1866 - "requestBody": {
1867 - "content": {
1868 - "application/json": {
1869 - "schema": {
1870 - "type": "object",
1871 - "properties": {
1872 - "index_name": {
1873 - "type": "string",
1874 - "default": "wazuh*",
1875 - "description": "The name of the index to get alerts from."
1876 - },
1877 - "size": {
1878 - "type": "integer",
1879 - "default": 10,
1880 - "description": "The number of alerts to return. Defaults to 10."
1881 - },
1882 - "timerange": {
1883 - "type": "string",
1884 - "default": "24h",
1885 - "description": "The time range to consider for alerts. Defaults to '24h'."
1886 - },
1887 - "alert_field": {
1888 - "type": "string",
1889 - "default": "syslog_level",
1890 - "description": "Field to filter alerts on. Defaults to 'syslog_level'."
1891 - },
1892 - "alert_value": {
1893 - "type": "string",
1894 - "default": "ALERT",
1895 - "description": "Value to filter alerts on. Defaults to 'ALERT'."
1896 - },
1897 - "timestamp_field": {
1898 - "type": "string",
1899 - "default": "timestamp_utc",
1900 - "description": "Field to filter alerts on. Defaults to '@timestamp'."
1901 - }
1902 - },
1903 - "required": []
1904 - }
1905 - }
1906 - }
1907 - },
1908 - "responses": {
1909 - "200": {
1910 - "description": "Successful operation",
1911 - "content": {
1912 - "application/json": {
1913 - "schema": {
1914 - "type": "object",
1915 - "properties": {
1916 - "alerts": {
1917 - "type": "array",
1918 - "items": {
1919 - "type": "object",
1920 - "description": "Alert details"
1921 - }
1922 - }
1923 - }
1924 - }
1925 - }
1926 - }
1927 - },
1928 - "400": {
1929 - "description": "Bad request",
1930 - "content": {
1931 - "application/json": {
1932 - "schema": {
1933 - "type": "object",
1934 - "properties": {
1935 - "message": {
1936 - "type": "string"
1937 - },
1938 - "success": {
1939 - "type": "boolean"
1940 - }
1941 - }
1942 - }
1943 - }
1944 - }
1945 - },
1946 - "404": {
1947 - "description": "Index not found",
1948 - "content": {
1949 - "application/json": {
1950 - "schema": {
1951 - "type": "object",
1952 - "properties": {
1953 - "message": {
1954 - "type": "string"
1955 - },
1956 - "success": {
1957 - "type": "boolean"
1958 - }
1959 - }
1960 - }
1961 - }
1962 - }
1963 - },
1964 - "default": {
1965 - "description": "Unexpected error",
1966 - "content": {
1967 - "application/json": {
1968 - "schema": {
1969 - "$ref": "#/components/schemas/Error"
1970 - }
1971 - }
1972 - }
1973 - }
1974 - },
1975 - "operationId": "createAndGetAlertsFromIndex",
1976 - "tags": ["Wazuh-Indexer"]
1977 - }
1978 - },
1979 - "/alerts/hosts": {
1980 - "post": {
1981 - "summary": "Create and get hosts with alerts",
1982 - "description": "Endpoint to create and get hosts with alerts. Retrieves all available hosts from the AlertsService based on the provided parameters.",
1983 - "requestBody": {
1984 - "content": {
1985 - "application/json": {
1986 - "schema": {
1987 - "type": "object",
1988 - "properties": {
1989 - "size": {
1990 - "type": "integer",
1991 - "default": 10,
1992 - "description": "The number of alerts to return. Defaults to 10."
1993 - },
1994 - "timerange": {
1995 - "type": "string",
1996 - "default": "24h",
1997 - "description": "The time range to consider for alerts. Defaults to '24h'."
1998 - },
1999 - "alert_field": {
2000 - "type": "string",
2001 - "default": "syslog_level",
2002 - "description": "Field to filter alerts on. Defaults to 'syslog_level'."
2003 - },
2004 - "alert_value": {
2005 - "type": "string",
2006 - "default": "ALERT",
2007 - "description": "Value to filter alerts on. Defaults to 'ALERT'."
2008 - },
2009 - "timestamp_field": {
2010 - "type": "string",
2011 - "default": "timestamp_utc",
2012 - "description": "Field to filter alerts on. Defaults to '@timestamp'."
2013 - }
2014 - },
2015 - "required": []
2016 - }
2017 - }
2018 - }
2019 - },
2020 - "responses": {
2021 - "200": {
2022 - "description": "Successful operation",
2023 - "content": {
2024 - "application/json": {
2025 - "schema": {
2026 - "type": "object",
2027 - "properties": {
2028 - "hosts": {
2029 - "type": "array",
2030 - "items": {
2031 - "type": "object",
2032 - "description": "Host details"
2033 - }
2034 - }
2035 - }
2036 - }
2037 - }
2038 - }
2039 - },
2040 - "400": {
2041 - "description": "Bad request",
2042 - "content": {
2043 - "application/json": {
2044 - "schema": {
2045 - "type": "object",
2046 - "properties": {
2047 - "message": {
2048 - "type": "string"
2049 - },
2050 - "success": {
2051 - "type": "boolean"
2052 - }
2053 - }
2054 - }
2055 - }
2056 - }
2057 - },
2058 - "404": {
2059 - "description": "Index not found",
2060 - "content": {
2061 - "application/json": {
2062 - "schema": {
2063 - "type": "object",
2064 - "properties": {
2065 - "message": {
2066 - "type": "string"
2067 - },
2068 - "success": {
2069 - "type": "boolean"
2070 - }
2071 - }
2072 - }
2073 - }
2074 - }
2075 - },
2076 - "default": {
2077 - "description": "Unexpected error",
2078 - "content": {
2079 - "application/json": {
2080 - "schema": {
2081 - "$ref": "#/components/schemas/Error"
2082 - }
2083 - }
2084 - }
2085 - }
2086 - },
2087 - "operationId": "createAndGetHostsWithAlerts",
2088 - "tags": ["Wazuh-Indexer"]
2089 - }
2090 - },
2091 - "/alerts/rules": {
2092 - "post": {
2093 - "summary": "Create and get rules with alerts",
2094 - "description": "Endpoint to create and get rules with alerts. Retrieves all available rules from the AlertsService based on the provided parameters.",
2095 - "requestBody": {
2096 - "content": {
2097 - "application/json": {
2098 - "schema": {
2099 - "type": "object",
2100 - "properties": {
2101 - "size": {
2102 - "type": "integer",
2103 - "default": 10,
2104 - "description": "The number of alerts to return. Defaults to 10."
2105 - },
2106 - "timerange": {
2107 - "type": "string",
2108 - "default": "24h",
2109 - "description": "The time range to consider for alerts. Defaults to '24h'."
2110 - },
2111 - "alert_field": {
2112 - "type": "string",
2113 - "default": "syslog_level",
2114 - "description": "Field to filter alerts on. Defaults to 'syslog_level'."
2115 - },
2116 - "alert_value": {
2117 - "type": "string",
2118 - "default": "ALERT",
2119 - "description": "Value to filter alerts on. Defaults to 'ALERT'."
2120 - },
2121 - "timestamp_field": {
2122 - "type": "string",
2123 - "default": "timestamp_utc",
2124 - "description": "Field to filter alerts on. Defaults to '@timestamp'."
2125 - }
2126 - },
2127 - "required": []
2128 - }
2129 - }
2130 - }
2131 - },
2132 - "responses": {
2133 - "200": {
2134 - "description": "Successful operation",
2135 - "content": {
2136 - "application/json": {
2137 - "schema": {
2138 - "type": "object",
2139 - "properties": {
2140 - "rules": {
2141 - "type": "array",
2142 - "items": {
2143 - "type": "object",
2144 - "description": "Rule details"
2145 - }
2146 - }
2147 - }
2148 - }
2149 - }
2150 - }
2151 - },
2152 - "400": {
2153 - "description": "Bad request",
2154 - "content": {
2155 - "application/json": {
2156 - "schema": {
2157 - "type": "object",
2158 - "properties": {
2159 - "message": {
2160 - "type": "string"
2161 - },
2162 - "success": {
2163 - "type": "boolean"
2164 - }
2165 - }
2166 - }
2167 - }
2168 - }
2169 - },
2170 - "404": {
2171 - "description": "Index not found",
2172 - "content": {
2173 - "application/json": {
2174 - "schema": {
2175 - "type": "object",
2176 - "properties": {
2177 - "message": {
2178 - "type": "string"
2179 - },
2180 - "success": {
2181 - "type": "boolean"
2182 - }
2183 - }
2184 - }
2185 - }
2186 - }
2187 - },
2188 - "default": {
2189 - "description": "Unexpected error",
2190 - "content": {
2191 - "application/json": {
2192 - "schema": {
2193 - "$ref": "#/components/schemas/Error"
2194 - }
2195 - }
2196 - }
2197 - }
2198 - },
2199 - "operationId": "createAndGetRulesWithAlerts",
2200 - "tags": ["Wazuh-Indexer"]
2201 - }
2202 - },
2203 - "/alerts/rules/host": {
2204 - "post": {
2205 - "summary": "Create and get rules with alerts per host",
2206 - "description": "Endpoint to create and get rules with alerts per host. Retrieves all available rules from the AlertsService based on the provided parameters and organizes them by host.",
2207 - "requestBody": {
2208 - "content": {
2209 - "application/json": {
2210 - "schema": {
2211 - "type": "object",
2212 - "properties": {
2213 - "size": {
2214 - "type": "integer",
2215 - "default": 10,
2216 - "description": "The number of alerts to return. Defaults to 10."
2217 - },
2218 - "timerange": {
2219 - "type": "string",
2220 - "default": "24h",
2221 - "description": "The time range to consider for alerts. Defaults to '24h'."
2222 - },
2223 - "alert_field": {
2224 - "type": "string",
2225 - "default": "syslog_level",
2226 - "description": "Field to filter alerts on. Defaults to 'syslog_level'."
2227 - },
2228 - "alert_value": {
2229 - "type": "string",
2230 - "default": "ALERT",
2231 - "description": "Value to filter alerts on. Defaults to 'ALERT'."
2232 - },
2233 - "timestamp_field": {
2234 - "type": "string",
2235 - "default": "timestamp_utc",
2236 - "description": "Field to filter alerts on. Defaults to '@timestamp'."
2237 - }
2238 - },
2239 - "required": []
2240 - }
2241 - }
2242 - }
2243 - },
2244 - "responses": {
2245 - "200": {
2246 - "description": "Successful operation",
2247 - "content": {
2248 - "application/json": {
2249 - "schema": {
2250 - "type": "object",
2251 - "properties": {
2252 - "rules": {
2253 - "type": "array",
2254 - "items": {
2255 - "type": "object",
2256 - "description": "Rule details"
2257 - }
2258 - }
2259 - }
2260 - }
2261 - }
2262 - }
2263 - },
2264 - "400": {
2265 - "description": "Bad request",
2266 - "content": {
2267 - "application/json": {
2268 - "schema": {
2269 - "type": "object",
2270 - "properties": {
2271 - "message": {
2272 - "type": "string"
2273 - },
2274 - "success": {
2275 - "type": "boolean"
2276 - }
2277 - }
2278 - }
2279 - }
2280 - }
2281 - },
2282 - "404": {
2283 - "description": "Host not found",
2284 - "content": {
2285 - "application/json": {
2286 - "schema": {
2287 - "type": "object",
2288 - "properties": {
2289 - "message": {
2290 - "type": "string"
2291 - },
2292 - "success": {
2293 - "type": "boolean"
2294 - }
2295 - }
2296 - }
2297 - }
2298 - }
2299 - },
2300 - "default": {
2301 - "description": "Unexpected error",
2302 - "content": {
2303 - "application/json": {
2304 - "schema": {
2305 - "$ref": "#/components/schemas/Error"
2306 - }
2307 - }
2308 - }
2309 - }
2310 - },
2311 - "operationId": "createAndGetRulesWithAlertsFromHost",
2312 - "tags": ["Wazuh-Indexer"]
2313 - }
2314 - },
2315 - "/alerts/escalate": {
2316 - "post": {
2317 - "tags": ["Wazuh-Indexer"],
2318 - "summary": "Escalate an alert.",
2319 - "description": "Collects the alert from the Wazuh-Indexer then creates the alert in DFIR-IRIS",
2320 - "requestBody": {
2321 - "content": {
2322 - "application/json": {
2323 - "schema": {
2324 - "type": "object",
2325 - "properties": {
2326 - "alert_id": {
2327 - "type": "string",
2328 - "description": "Alert ID"
2329 - },
2330 - "index": {
2331 - "type": "string",
2332 - "description": "Index Name"
2333 - }
2334 - },
2335 - "required": ["alert_id", "index"]
2336 - }
2337 - }
2338 - }
2339 - },
2340 - "responses": {
2341 - "200": {
2342 - "description": "Successfully searched for IoCs.",
2343 - "content": {
2344 - "application/json": {
2345 - "schema": {
2346 - "type": "object",
2347 - "properties": {
2348 - "message": {
2349 - "type": "string",
2350 - "example": "Successfully searched for IoCs."
2351 - },
2352 - "success": {
2353 - "type": "boolean",
2354 - "example": true
2355 - }
2356 - }
2357 - }
2358 - }
2359 - }
2360 - },
2361 - "400": {
2362 - "description": "Invalid payload.",
2363 - "content": {
2364 - "application/json": {
2365 - "schema": {
2366 - "type": "object",
2367 - "properties": {
2368 - "message": {
2369 - "type": "string",
2370 - "example": "Invalid payload."
2371 - },
2372 - "success": {
2373 - "type": "boolean",
2374 - "example": false
2375 - }
2376 - }
2377 - }
2378 - }
2379 - }
2380 - }
2381 - }
2382 - }
2383 - },
2384 - "/wazuh_indexer/allocation": {
2385 - "get": {
2386 - "summary": "Get node allocation of the Wazuh-Indexer nodes",
2387 - "description": "Endpoint to get node allocation.",
2388 - "responses": {
2389 - "200": {
2390 - "description": "Successful operation",
2391 - "content": {
2392 - "application/json": {
2393 - "schema": {
2394 - "type": "object",
2395 - "properties": {
2396 - "indices": {
2397 - "type": "array",
2398 - "items": {
2399 - "type": "object",
2400 - "description": "Node details"
2401 - }
2402 - }
2403 - }
2404 - }
2405 - }
2406 - }
2407 - },
2408 - "default": {
2409 - "description": "Unexpected error",
2410 - "content": {
2411 - "application/json": {
2412 - "schema": {
2413 - "$ref": "#/components/schemas/Error"
2414 - }
2415 - }
2416 - }
2417 - }
2418 - },
2419 - "operationId": "getNodeAllocation",
2420 - "tags": ["Wazuh-Indexer"]
2421 - }
2422 - },
2423 - "/wazuh_indexer/indices": {
2424 - "get": {
2425 - "summary": "Get indices from Wazuh-Indexer",
2426 - "description": "Endpoint to get indices from Wazuh-Indexer.",
2427 - "responses": {
2428 - "200": {
2429 - "description": "Successful operation",
2430 - "content": {
2431 - "application/json": {
2432 - "schema": {
2433 - "type": "object",
2434 - "properties": {
2435 - "indices": {
2436 - "type": "array",
2437 - "items": {
2438 - "type": "object",
2439 - "description": "Index details"
2440 - }
2441 - }
2442 - }
2443 - }
2444 - }
2445 - }
2446 - },
2447 - "default": {
2448 - "description": "Unexpected error",
2449 - "content": {
2450 - "application/json": {
2451 - "schema": {
2452 - "$ref": "#/components/schemas/Error"
2453 - }
2454 - }
2455 - }
2456 - }
2457 - },
2458 - "operationId": "getWazuhIndices",
2459 - "tags": ["Wazuh-Indexer"]
2460 - }
2461 - },
2462 - "/wazuh_indexer/health": {
2463 - "get": {
2464 - "summary": "Get health of the Wazuh-Indexer nodes",
2465 - "description": "Endpoint to get health.",
2466 - "responses": {
2467 - "200": {
2468 - "description": "Successful operation",
2469 - "content": {
2470 - "application/json": {
2471 - "schema": {
2472 - "type": "object",
2473 - "properties": {
2474 - "cluster_name": {
2475 - "type": "string"
2476 - },
2477 - "status": {
2478 - "type": "string"
2479 - },
2480 - "number_of_nodes": {
2481 - "type": "integer"
2482 - },
2483 - "number_of_data_nodes": {
2484 - "type": "integer"
2485 - },
2486 - "active_primary_shards": {
2487 - "type": "integer"
2488 - },
2489 - "active_shards": {
2490 - "type": "integer"
2491 - },
2492 - "relocating_shards": {
2493 - "type": "integer"
2494 - },
2495 - "initializing_shards": {
2496 - "type": "integer"
2497 - },
2498 - "unassigned_shards": {
2499 - "type": "integer"
2500 - },
2501 - "delayed_unassigned_shards": {
2502 - "type": "integer"
2503 - },
2504 - "number_of_pending_tasks": {
2505 - "type": "integer"
2506 - },
2507 - "number_of_in_flight_fetch": {
2508 - "type": "integer"
2509 - },
2510 - "task_max_waiting_in_queue_millis": {
2511 - "type": "integer"
2512 - },
2513 - "active_shards_percent_as_number": {
2514 - "type": "integer"
2515 - }
2516 - }
2517 - }
2518 - }
2519 - }
2520 - },
2521 - "default": {
2522 - "description": "Unexpected error",
2523 - "content": {
2524 - "application/json": {
2525 - "schema": {
2526 - "$ref": "#/components/schemas/Error"
2527 - }
2528 - }
2529 - }
2530 - }
2531 - },
2532 - "operationId": "getHealth",
2533 - "tags": ["Wazuh-Indexer"]
2534 - }
2535 - },
2536 - "/wazuh_indexer/shards": {
2537 - "get": {
2538 - "summary": "Get shards from Wazuh-Indexer",
2539 - "description": "Endpoint to get shards from Wazuh-Indexer.",
2540 - "responses": {
2541 - "200": {
2542 - "description": "Successful operation",
2543 - "content": {
2544 - "application/json": {
2545 - "schema": {
2546 - "type": "object",
2547 - "properties": {
2548 - "shards": {
2549 - "type": "array",
2550 - "items": {
2551 - "type": "object",
2552 - "description": "Shard details"
2553 - }
2554 - }
2555 - }
2556 - }
2557 - }
2558 - }
2559 - },
2560 - "default": {
2561 - "description": "Unexpected error",
2562 - "content": {
2563 - "application/json": {
2564 - "schema": {
2565 - "$ref": "#/components/schemas/Error"
2566 - }
2567 - }
2568 - }
2569 - }
2570 - },
2571 - "operationId": "getShards",
2572 - "tags": ["Wazuh-Indexer"]
2573 - }
2574 - },
2575 - "/shuffle/workflows": {
2576 - "get": {
2577 - "summary": "Get all workflows",
2578 - "description": "Endpoint to get all workflows.",
2579 - "responses": {
2580 - "200": {
2581 - "description": "Successful operation",
2582 - "content": {
2583 - "application/json": {
2584 - "schema": {
2585 - "type": "object",
2586 - "properties": {
2587 - "workflows": {
2588 - "type": "array",
2589 - "items": {
2590 - "type": "object",
2591 - "description": "Workflow details"
2592 - }
2593 - }
2594 - }
2595 - }
2596 - }
2597 - }
2598 - },
2599 - "default": {
2600 - "description": "Unexpected error",
2601 - "content": {
2602 - "application/json": {
2603 - "schema": {
2604 - "$ref": "#/components/schemas/Error"
2605 - }
2606 - }
2607 - }
2608 - }
2609 - },
2610 - "operationId": "getAllWorkflows",
2611 - "tags": ["Shuffle"]
2612 - }
2613 - },
2614 - "/shuffle/workflows/executions": {
2615 - "get": {
2616 - "summary": "Get all workflow executions",
2617 - "description": "Endpoint to get all workflow executions.",
2618 - "responses": {
2619 - "200": {
2620 - "description": "Successful operation",
2621 - "content": {
2622 - "application/json": {
2623 - "schema": {
2624 - "type": "object",
2625 - "properties": {
2626 - "executions": {
2627 - "type": "array",
2628 - "items": {
2629 - "type": "object",
2630 - "description": "Workflow execution details"
2631 - }
2632 - }
2633 - }
2634 - }
2635 - }
2636 - }
2637 - },
2638 - "default": {
2639 - "description": "Unexpected error",
2640 - "content": {
2641 - "application/json": {
2642 - "schema": {
2643 - "$ref": "#/components/schemas/Error"
2644 - }
2645 - }
2646 - }
2647 - }
2648 - },
2649 - "operationId": "getAllWorkflowExecutions",
2650 - "tags": ["Shuffle"]
2651 - }
2652 - },
2653 - "/shuffle/workflows/executions/{workflow_id}": {
2654 - "get": {
2655 - "summary": "Get workflow executions by workflow id",
2656 - "description": "Endpoint to get workflow executions by workflow id.",
2657 - "parameters": [
2658 - {
2659 - "name": "workflow_id",
2660 - "in": "path",
2661 - "description": "The workflow id",
2662 - "required": true,
2663 - "schema": {
2664 - "type": "string"
2665 - }
2666 - }
2667 - ],
2668 - "responses": {
2669 - "200": {
2670 - "description": "Successful operation",
2671 - "content": {
2672 - "application/json": {
2673 - "schema": {
2674 - "type": "object",
2675 - "properties": {
2676 - "executions": {
2677 - "type": "array",
2678 - "items": {
2679 - "type": "object",
2680 - "description": "Workflow execution details"
2681 - }
2682 - }
2683 - }
2684 - }
2685 - }
2686 - }
2687 - },
2688 - "default": {
2689 - "description": "Unexpected error",
2690 - "content": {
2691 - "application/json": {
2692 - "schema": {
2693 - "$ref": "#/components/schemas/Error"
2694 - }
2695 - }
2696 - }
2697 - }
2698 - },
2699 - "operationId": "getWorkflowExecutionsByWorkflowId",
2700 - "tags": ["Shuffle"]
2701 - }
2702 - },
2703 - "/velociraptor/artifacts": {
2704 - "get": {
2705 - "summary": "Get all artifacts",
2706 - "description": "Endpoint to get all artifacts.",
2707 - "responses": {
2708 - "200": {
2709 - "description": "Successful operation",
2710 - "content": {
2711 - "application/json": {
2712 - "schema": {
2713 - "type": "object",
2714 - "properties": {
2715 - "artifacts": {
2716 - "type": "array",
2717 - "items": {
2718 - "type": "object",
2719 - "description": "Artifact details"
2720 - }
2721 - }
2722 - }
2723 - }
2724 - }
2725 - }
2726 - },
2727 - "default": {
2728 - "description": "Unexpected error",
2729 - "content": {
2730 - "application/json": {
2731 - "schema": {
2732 - "$ref": "#/components/schemas/Error"
2733 - }
2734 - }
2735 - }
2736 - }
2737 - },
2738 - "operationId": "getAllArtifacts",
2739 - "tags": ["Velociraptor"]
2740 - }
2741 - },
2742 - "/velociraptor/artifacts/linux": {
2743 - "get": {
2744 - "summary": "Get all linux artifacts",
2745 - "description": "Endpoint to get all linux artifacts.",
2746 - "responses": {
2747 - "200": {
2748 - "description": "Successful operation",
2749 - "content": {
2750 - "application/json": {
2751 - "schema": {
2752 - "type": "object",
2753 - "properties": {
2754 - "artifacts": {
2755 - "type": "array",
2756 - "items": {
2757 - "type": "object",
2758 - "description": "Artifact details"
2759 - }
2760 - }
2761 - }
2762 - }
2763 - }
2764 - }
2765 - },
2766 - "default": {
2767 - "description": "Unexpected error",
2768 - "content": {
2769 - "application/json": {
2770 - "schema": {
2771 - "$ref": "#/components/schemas/Error"
2772 - }
2773 - }
2774 - }
2775 - }
2776 - },
2777 - "operationId": "getAllLinuxArtifacts",
2778 - "tags": ["Velociraptor"]
2779 - }
2780 - },
2781 - "/velociraptor/artifacts/windows": {
2782 - "get": {
2783 - "summary": "Get all windows artifacts",
2784 - "description": "Endpoint to get all windows artifacts.",
2785 - "responses": {
2786 - "200": {
2787 - "description": "Successful operation",
2788 - "content": {
2789 - "application/json": {
2790 - "schema": {
2791 - "type": "object",
2792 - "properties": {
2793 - "artifacts": {
2794 - "type": "array",
2795 - "items": {
2796 - "type": "object",
2797 - "description": "Artifact details"
2798 - }
2799 - }
2800 - }
2801 - }
2802 - }
2803 - }
2804 - },
2805 - "default": {
2806 - "description": "Unexpected error",
2807 - "content": {
2808 - "application/json": {
2809 - "schema": {
2810 - "$ref": "#/components/schemas/Error"
2811 - }
2812 - }
2813 - }
2814 - }
2815 - },
2816 - "operationId": "getAllWindowsArtifacts",
2817 - "tags": ["Velociraptor"]
2818 - }
2819 - },
2820 - "/velociraptor/artifacts/mac": {
2821 - "get": {
2822 - "summary": "Get all mac artifacts",
2823 - "description": "Endpoint to get all mac artifacts.",
2824 - "responses": {
2825 - "200": {
2826 - "description": "Successful operation",
2827 - "content": {
2828 - "application/json": {
2829 - "schema": {
2830 - "type": "object",
2831 - "properties": {
2832 - "artifacts": {
2833 - "type": "array",
2834 - "items": {
2835 - "type": "object",
2836 - "description": "Artifact details"
2837 - }
2838 - }
2839 - }
2840 - }
2841 - }
2842 - }
2843 - },
2844 - "default": {
2845 - "description": "Unexpected error",
2846 - "content": {
2847 - "application/json": {
2848 - "schema": {
2849 - "$ref": "#/components/schemas/Error"
2850 - }
2851 - }
2852 - }
2853 - }
2854 - },
2855 - "operationId": "getAllMacArtifacts",
2856 - "tags": ["Velociraptor"]
2857 - }
2858 - },
2859 - "/velociraptor/artifacts/{hostname}": {
2860 - "get": {
2861 - "summary": "Get all artifacts for a hostname",
2862 - "description": "Endpoint to get all artifacts for a hostname.",
2863 - "parameters": [
2864 - {
2865 - "name": "hostname",
2866 - "in": "path",
2867 - "description": "The client name",
2868 - "required": true,
2869 - "schema": {
2870 - "type": "string"
2871 - }
2872 - }
2873 - ],
2874 - "responses": {
2875 - "200": {
2876 - "description": "Successful operation",
2877 - "content": {
2878 - "application/json": {
2879 - "schema": {
2880 - "type": "object",
2881 - "properties": {
2882 - "artifacts": {
2883 - "type": "array",
2884 - "items": {
2885 - "type": "object",
2886 - "description": "Artifact details"
2887 - }
2888 - }
2889 - }
2890 - }
2891 - }
2892 - }
2893 - },
2894 - "default": {
2895 - "description": "Unexpected error",
2896 - "content": {
2897 - "application/json": {
2898 - "schema": {
2899 - "$ref": "#/components/schemas/Error"
2900 - }
2901 - }
2902 - }
2903 - }
2904 - },
2905 - "operationId": "getAllArtifactsForHostname",
2906 - "tags": ["Velociraptor"]
2907 - }
2908 - },
2909 - "/velociraptor/artifacts/collection": {
2910 - "post": {
2911 - "summary": "Create a new artifact collection",
2912 - "description": "Endpoint to create a new artifact collection.",
2913 - "requestBody": {
2914 - "description": "Artifact collection details",
2915 - "content": {
2916 - "application/json": {
2917 - "schema": {
2918 - "type": "object",
2919 - "properties": {
2920 - "artifact_name": {
2921 - "type": "string",
2922 - "description": "The name of the artifact collection."
2923 - },
2924 - "client_name": {
2925 - "type": "string",
2926 - "description": "The name of the client to collect the artifact for."
2927 - }
2928 - }
2929 - }
2930 - }
2931 - }
2932 - },
2933 - "responses": {
2934 - "200": {
2935 - "description": "Successful operation",
2936 - "content": {
2937 - "application/json": {
2938 - "schema": {
2939 - "type": "object",
2940 - "properties": {
2941 - "collection": {
2942 - "type": "object",
2943 - "description": "Artifact collection details"
2944 - }
2945 - }
2946 - }
2947 - }
2948 - }
2949 - },
2950 - "default": {
2951 - "description": "Unexpected error",
2952 - "content": {
2953 - "application/json": {
2954 - "schema": {
2955 - "$ref": "#/components/schemas/Error"
2956 - }
2957 - }
2958 - }
2959 - }
2960 - },
2961 - "operationId": "createArtifactCollection",
2962 - "tags": ["Velociraptor"]
2963 - }
2964 - },
2965 - "/velociraptor/remotecommand": {
2966 - "post": {
2967 - "summary": "Run a remote command",
2968 - "description": "Endpoint to run a remote command.",
2969 - "requestBody": {
2970 - "description": "Remote command details",
2971 - "content": {
2972 - "application/json": {
2973 - "schema": {
2974 - "type": "object",
2975 - "properties": {
2976 - "client_name": {
2977 - "type": "string",
2978 - "value": "WIN-39O01J5F7G5",
2979 - "description": "The hostname of the client to run the command on."
2980 - },
2981 - "artifact_name": {
2982 - "type": "string",
2983 - "value": "Windows.System.PowerShell",
2984 - "description": "The name of the artifact to run."
2985 - },
2986 - "command": {
2987 - "type": "string",
2988 - "value": "ping 8.8.8.8",
2989 - "description": "The powershell command to run."
2990 - }
2991 - }
2992 - }
2993 - }
2994 - }
2995 - },
2996 - "responses": {
2997 - "200": {
2998 - "description": "Successful operation",
2999 - "content": {
3000 - "application/json": {
3001 - "schema": {
3002 - "type": "object",
3003 - "properties": {
3004 - "output": {
3005 - "type": "string",
3006 - "description": "The output of the command."
3007 - }
3008 - }
3009 - }
3010 - }
3011 - }
3012 - },
3013 - "default": {
3014 - "description": "Unexpected error",
3015 - "content": {
3016 - "application/json": {
3017 - "schema": {
3018 - "$ref": "#/components/schemas/Error"
3019 - }
3020 - }
3021 - }
3022 - }
3023 - },
3024 - "operationId": "runPowershellCommand",
3025 - "tags": ["Velociraptor"]
3026 - }
3027 - },
3028 - "/dfir_iris/cases": {
3029 - "get": {
3030 - "summary": "Get all cases",
3031 - "description": "Endpoint to get all cases.",
3032 - "responses": {
3033 - "200": {
3034 - "description": "Successful operation",
3035 - "content": {
3036 - "application/json": {
3037 - "schema": {
3038 - "type": "object",
3039 - "properties": {
3040 - "cases": {
3041 - "type": "array",
3042 - "items": {
3043 - "type": "object",
3044 - "description": "Case details"
3045 - }
3046 - }
3047 - }
3048 - }
3049 - }
3050 - }
3051 - },
3052 - "default": {
3053 - "description": "Unexpected error",
3054 - "content": {
3055 - "application/json": {
3056 - "schema": {
3057 - "$ref": "#/components/schemas/Error"
3058 - }
3059 - }
3060 - }
3061 - }
3062 - },
3063 - "operationId": "getAllCases",
3064 - "tags": ["DFIR Iris"]
3065 - }
3066 - },
3067 - "/dfir_iris/cases/kpi": {
3068 - "get": {
3069 - "summary": "Get KPIs for all cases",
3070 - "description": "Endpoint to get KPIs for all cases.",
3071 - "responses": {
3072 - "200": {
3073 - "description": "Successful operation",
3074 - "content": {
3075 - "application/json": {
3076 - "schema": {
3077 - "type": "object",
3078 - "properties": {
3079 - "cases": {
3080 - "type": "array",
3081 - "items": {
3082 - "type": "object",
3083 - "description": "Case details"
3084 - }
3085 - }
3086 - }
3087 - }
3088 - }
3089 - }
3090 - },
3091 - "default": {
3092 - "description": "Unexpected error",
3093 - "content": {
3094 - "application/json": {
3095 - "schema": {
3096 - "$ref": "#/components/schemas/Error"
3097 - }
3098 - }
3099 - }
3100 - }
3101 - },
3102 - "operationId": "getKPIsForAllCases",
3103 - "tags": ["DFIR Iris"]
3104 - }
3105 - },
3106 - "/dfir_iris/cases/{case_id}": {
3107 - "get": {
3108 - "summary": "Get a case",
3109 - "description": "Endpoint to get a case.",
3110 - "parameters": [
3111 - {
3112 - "name": "case_id",
3113 - "in": "path",
3114 - "description": "The ID of the case.",
3115 - "required": true,
3116 - "schema": {
3117 - "type": "integer"
3118 - }
3119 - }
3120 - ],
3121 - "responses": {
3122 - "200": {
3123 - "description": "Successful operation",
3124 - "content": {
3125 - "application/json": {
3126 - "schema": {
3127 - "type": "object",
3128 - "properties": {
3129 - "case": {
3130 - "type": "object",
3131 - "description": "Case details"
3132 - }
3133 - }
3134 - }
3135 - }
3136 - }
3137 - },
3138 - "404": {
3139 - "description": "Case not found",
3140 - "content": {
3141 - "application/json": {
3142 - "schema": {
3143 - "$ref": "#/components/schemas/Error"
3144 - }
3145 - }
3146 - }
3147 - },
3148 - "default": {
3149 - "description": "Unexpected error",
3150 - "content": {
3151 - "application/json": {
3152 - "schema": {
3153 - "$ref": "#/components/schemas/Error"
3154 - }
3155 - }
3156 - }
3157 - }
3158 - },
3159 - "operationId": "getCase",
3160 - "tags": ["DFIR Iris"]
3161 - }
3162 - },
3163 - "/dfir_iris/cases/{case_id}/notes": {
3164 - "get": {
3165 - "summary": "Get all notes for a case",
3166 - "description": "Endpoint to get all notes for a case.",
3167 - "parameters": [
3168 - {
3169 - "name": "case_id",
3170 - "in": "path",
3171 - "description": "The ID of the case.",
3172 - "required": true,
3173 - "schema": {
3174 - "type": "integer"
3175 - }
3176 - }
3177 - ],
3178 - "responses": {
3179 - "200": {
3180 - "description": "Successful operation",
3181 - "content": {
3182 - "application/json": {
3183 - "schema": {
3184 - "type": "object",
3185 - "properties": {
3186 - "notes": {
3187 - "type": "array",
3188 - "items": {
3189 - "type": "object",
3190 - "description": "Note details"
3191 - }
3192 - }
3193 - }
3194 - }
3195 - }
3196 - }
3197 - },
3198 - "404": {
3199 - "description": "Case not found",
3200 - "content": {
3201 - "application/json": {
3202 - "schema": {
3203 - "$ref": "#/components/schemas/Error"
3204 - }
3205 - }
3206 - }
3207 - },
3208 - "default": {
3209 - "description": "Unexpected error",
3210 - "content": {
3211 - "application/json": {
3212 - "schema": {
3213 - "$ref": "#/components/schemas/Error"
3214 - }
3215 - }
3216 - }
3217 - }
3218 - },
3219 - "operationId": "getAllNotesForCase",
3220 - "tags": ["DFIR Iris"]
3221 - }
3222 - },
3223 - "/dfir_iris/cases/{case_id}/note": {
3224 - "post": {
3225 - "summary": "Create a note for a case",
3226 - "description": "Endpoint to create a note for a case.",
3227 - "parameters": [
3228 - {
3229 - "name": "case_id",
3230 - "in": "path",
3231 - "description": "The ID of the case.",
3232 - "required": true,
3233 - "schema": {
3234 - "type": "integer"
3235 - }
3236 - }
3237 - ],
3238 - "requestBody": {
3239 - "description": "Note details",
3240 - "content": {
3241 - "application/json": {
3242 - "schema": {
3243 - "type": "object",
3244 - "properties": {
3245 - "note_title": {
3246 - "type": "string",
3247 - "description": "The title of the note"
3248 - },
3249 - "note_content": {
3250 - "type": "string",
3251 - "description": "The content of the note"
3252 - }
3253 - },
3254 - "description": "Note details"
3255 - }
3256 - }
3257 - }
3258 - },
3259 - "responses": {
3260 - "200": {
3261 - "description": "Successful operation",
3262 - "content": {
3263 - "application/json": {
3264 - "schema": {
3265 - "type": "object",
3266 - "properties": {
3267 - "note": {
3268 - "type": "object",
3269 - "properties": {
3270 - "title": {
3271 - "type": "string",
3272 - "description": "The title of the note"
3273 - },
3274 - "content": {
3275 - "type": "string",
3276 - "description": "The content of the note"
3277 - }
3278 - },
3279 - "description": "Note details"
3280 - }
3281 - }
3282 - }
3283 - }
3284 - }
3285 - },
3286 - "404": {
3287 - "description": "Case not found",
3288 - "content": {
3289 - "application/json": {
3290 - "schema": {
3291 - "$ref": "#/components/schemas/Error"
3292 - }
3293 - }
3294 - }
3295 - },
3296 - "default": {
3297 - "description": "Unexpected error",
3298 - "content": {
3299 - "application/json": {
3300 - "schema": {
3301 - "$ref": "#/components/schemas/Error"
3302 - }
3303 - }
3304 - }
3305 - }
3306 - },
3307 - "operationId": "createNoteForCase",
3308 - "tags": ["DFIR Iris"]
3309 - }
3310 - },
3311 - "/dfir_iris/cases/{case_id}/assets": {
3312 - "get": {
3313 - "summary": "Get all assets for a case",
3314 - "description": "Endpoint to get all assets for a case.",
3315 - "parameters": [
3316 - {
3317 - "name": "case_id",
3318 - "in": "path",
3319 - "description": "The ID of the case.",
3320 - "required": true,
3321 - "schema": {
3322 - "type": "integer"
3323 - }
3324 - }
3325 - ],
3326 - "responses": {
3327 - "200": {
3328 - "description": "Successful operation",
3329 - "content": {
3330 - "application/json": {
3331 - "schema": {
3332 - "type": "object",
3333 - "properties": {
3334 - "assets": {
3335 - "type": "array",
3336 - "items": {
3337 - "type": "object",
3338 - "description": "Asset details"
3339 - }
3340 - }
3341 - }
3342 - }
3343 - }
3344 - }
3345 - },
3346 - "404": {
3347 - "description": "Case not found",
3348 - "content": {
3349 - "application/json": {
3350 - "schema": {
3351 - "$ref": "#/components/schemas/Error"
3352 - }
3353 - }
3354 - }
3355 - },
3356 - "default": {
3357 - "description": "Unexpected error",
3358 - "content": {
3359 - "application/json": {
3360 - "schema": {
3361 - "$ref": "#/components/schemas/Error"
3362 - }
3363 - }
3364 - }
3365 - }
3366 - },
3367 - "operationId": "getAllAssetsForCase",
3368 - "tags": ["DFIR Iris"]
3369 - }
3370 - },
3371 - "/dfir_iris/alerts": {
3372 - "get": {
3373 - "summary": "Get all alerts",
3374 - "description": "Endpoint to get all alerts.",
3375 - "parameters": [
3376 - {
3377 - "name": "limit",
3378 - "in": "query",
3379 - "description": "The maximum number of alerts to return.",
3380 - "required": false,
3381 - "schema": {
3382 - "type": "integer"
3383 - }
3384 - },
3385 - {
3386 - "name": "offset",
3387 - "in": "query",
3388 - "description": "The offset to start returning alerts from.",
3389 - "required": false,
3390 - "schema": {
3391 - "type": "integer"
3392 - }
3393 - },
3394 - {
3395 - "name": "sort",
3396 - "in": "query",
3397 - "description": "The field to sort alerts by.",
3398 - "required": false,
3399 - "schema": {
3400 - "type": "string"
3401 - }
3402 - },
3403 - {
3404 - "name": "order",
3405 - "in": "query",
3406 - "description": "The order to sort alerts by.",
3407 - "required": false,
3408 - "schema": {
3409 - "type": "string"
3410 - }
3411 - },
3412 - {
3413 - "name": "filter",
3414 - "in": "query",
3415 - "description": "The filter to apply to the alerts.",
3416 - "required": false,
3417 - "schema": {
3418 - "type": "string"
3419 - }
3420 - }
3421 - ],
3422 - "responses": {
3423 - "200": {
3424 - "description": "Successful operation",
3425 - "content": {
3426 - "application/json": {
3427 - "schema": {
3428 - "type": "object",
3429 - "properties": {
3430 - "alerts": {
3431 - "type": "array",
3432 - "items": {
3433 - "type": "object",
3434 - "description": "Alert details"
3435 - }
3436 - }
3437 - }
3438 - }
3439 - }
3440 - }
3441 - },
3442 - "default": {
3443 - "description": "Unexpected error",
3444 - "content": {
3445 - "application/json": {
3446 - "schema": {
3447 - "$ref": "#/components/schemas/Error"
3448 - }
3449 - }
3450 - }
3451 - }
3452 - },
3453 - "operationId": "getAllAlerts",
3454 - "tags": ["DFIR Iris"]
3455 - }
3456 - },
3457 - "/dfir_iris/alerts/bookmark/{alert_id}": {
3458 - "post": {
3459 - "summary": "Assign a bookmark to an alert which adds it as an alert tag",
3460 - "description": "Assign a bookmark to an alert which adds it as an alert tag.",
3461 - "parameters": [
3462 - {
3463 - "name": "alert_id",
3464 - "in": "path",
3465 - "description": "ID of the alert to bookmark.",
3466 - "required": true,
3467 - "schema": {
3468 - "type": "string"
3469 - }
3470 - }
3471 - ],
3472 - "responses": {
3473 - "200": {
3474 - "description": "Successful operation",
3475 - "content": {
3476 - "application/json": {
3477 - "schema": {
3478 - "type": "object",
3479 - "properties": {
3480 - "output": {
3481 - "type": "string",
3482 - "description": "The output of the command."
3483 - }
3484 - }
3485 - }
3486 - }
3487 - }
3488 - },
3489 - "default": {
3490 - "description": "Unexpected error",
3491 - "content": {
3492 - "application/json": {
3493 - "schema": {
3494 - "$ref": "#/components/schemas/Error"
3495 - }
3496 - }
3497 - }
3498 - }
3499 - },
3500 - "operationId": "assignUserToAlert",
3501 - "tags": ["DFIR Iris"]
3502 - }
3503 - },
3504 - "/dfir_iris/alerts/unbookmark/{alert_id}": {
3505 - "post": {
3506 - "summary": "Unbookmark an alert",
3507 - "description": "Unbookmark an alert.",
3508 - "parameters": [
3509 - {
3510 - "name": "alert_id",
3511 - "in": "path",
3512 - "description": "ID of the alert to unbookmark.",
3513 - "required": true,
3514 - "schema": {
3515 - "type": "string"
3516 - }
3517 - }
3518 - ],
3519 - "responses": {
3520 - "200": {
3521 - "description": "Successful operation",
3522 - "content": {
3523 - "application/json": {
3524 - "schema": {
3525 - "type": "object",
3526 - "properties": {
3527 - "output": {
3528 - "type": "string",
3529 - "description": "The output of the command."
3530 - }
3531 - }
3532 - }
3533 - }
3534 - }
3535 - },
3536 - "default": {
3537 - "description": "Unexpected error",
3538 - "content": {
3539 - "application/json": {
3540 - "schema": {
3541 - "$ref": "#/components/schemas/Error"
3542 - }
3543 - }
3544 - }
3545 - }
3546 - },
3547 - "operationId": "unbookmarkAlert",
3548 - "tags": ["DFIR Iris"]
3549 - }
3550 - },
3551 - "/dfir_iris/alerts/bookmarked": {
3552 - "get": {
3553 - "summary": "Get all bookmarked alerts",
3554 - "description": "Endpoint to get all bookmarked alerts.",
3555 - "responses": {
3556 - "200": {
3557 - "description": "Successful operation",
3558 - "content": {
3559 - "application/json": {
3560 - "schema": {
3561 - "type": "object",
3562 - "properties": {
3563 - "alerts": {
3564 - "type": "array",
3565 - "items": {
3566 - "type": "object",
3567 - "description": "Alert details"
3568 - }
3569 - }
3570 - }
3571 - }
3572 - }
3573 - }
3574 - },
3575 - "default": {
3576 - "description": "Unexpected error",
3577 - "content": {
3578 - "application/json": {
3579 - "schema": {
3580 - "$ref": "#/components/schemas/Error"
3581 - }
3582 - }
3583 - }
3584 - }
3585 - },
3586 - "operationId": "getAllBookmarkedAlerts",
3587 - "tags": ["DFIR Iris"]
3588 - }
3589 - },
3590 - "/dfir_iris/users": {
3591 - "get": {
3592 - "summary": "Get all users",
3593 - "description": "Endpoint to get all users.",
3594 - "responses": {
3595 - "200": {
3596 - "description": "Successful operation",
3597 - "content": {
3598 - "application/json": {
3599 - "schema": {
3600 - "type": "object",
3601 - "properties": {
3602 - "users": {
3603 - "type": "array",
3604 - "items": {
3605 - "type": "object",
3606 - "description": "User details"
3607 - }
3608 - }
3609 - }
3610 - }
3611 - }
3612 - }
3613 - },
3614 - "default": {
3615 - "description": "Unexpected error",
3616 - "content": {
3617 - "application/json": {
3618 - "schema": {
3619 - "$ref": "#/components/schemas/Error"
3620 - }
3621 - }
3622 - }
3623 - }
3624 - },
3625 - "operationId": "getAllUsers",
3626 - "tags": ["DFIR Iris"]
3627 - }
3628 - },
3629 - "/dfir_iris/users/assign/{alert_id}": {
3630 - "post": {
3631 - "summary": "Assign a user to a DFIR-IRIS Alert",
3632 - "description": "Assign a user to a DFIR-IRIS Alert.",
3633 - "parameters": [
3634 - {
3635 - "name": "alert_id",
3636 - "in": "path",
3637 - "description": "ID of the alert to assign.",
3638 - "required": true,
3639 - "schema": {
3640 - "type": "string"
3641 - }
3642 - }
3643 - ],
3644 - "requestBody": {
3645 - "description": "Assignee details",
3646 - "content": {
3647 - "application/json": {
3648 - "schema": {
3649 - "type": "object",
3650 - "properties": {
3651 - "alert_owner_id": {
3652 - "type": "integer",
3653 - "description": "The owner id of who to assign the alert to. Invoke the `/dfir_iris/users` to obtain the owner id."
3654 - }
3655 - }
3656 - }
3657 - }
3658 - }
3659 - },
3660 - "responses": {
3661 - "200": {
3662 - "description": "Successful operation",
3663 - "content": {
3664 - "application/json": {
3665 - "schema": {
3666 - "type": "object",
3667 - "properties": {
3668 - "output": {
3669 - "type": "string",
3670 - "description": "The output of the command."
3671 - }
3672 - }
3673 - }
3674 - }
3675 - }
3676 - },
3677 - "default": {
3678 - "description": "Unexpected error",
3679 - "content": {
3680 - "application/json": {
3681 - "schema": {
3682 - "$ref": "#/components/schemas/Error"
3683 - }
3684 - }
3685 - }
3686 - }
3687 - },
3688 - "operationId": "assignUserToAlert",
3689 - "tags": ["DFIR Iris"]
3690 - }
3691 - },
3692 - "/sublime/alerts": {
3693 - "get": {
3694 - "summary": "Get all alerts",
3695 - "description": "Endpoint to get all alerts.",
3696 - "responses": {
3697 - "200": {
3698 - "description": "Successful operation",
3699 - "content": {
3700 - "application/json": {
3701 - "schema": {
3702 - "type": "object",
3703 - "properties": {
3704 - "alerts": {
3705 - "type": "array",
3706 - "items": {
3707 - "type": "object",
3708 - "description": "Alert details"
3709 - }
3710 - }
3711 - }
3712 - }
3713 - }
3714 - }
3715 - },
3716 - "default": {
3717 - "description": "Unexpected error",
3718 - "content": {
3719 - "application/json": {
3720 - "schema": {
3721 - "$ref": "#/components/schemas/Error"
3722 - }
3723 - }
3724 - }
3725 - }
3726 - },
3727 - "operationId": "getAllAlerts",
3728 - "tags": ["Sublime"]
3729 - }
3730 - },
3731 - "/sublime/alert": {
3732 - "post": {
3733 - "summary": "Create an alert",
3734 - "description": "Endpoint to create an alert.",
3735 - "requestBody": {
3736 - "description": "Alert details",
3737 - "content": {
3738 - "application/json": {
3739 - "schema": {
3740 - "type": "object",
3741 - "properties": {
3742 - "api_version": {
3743 - "type": "string",
3744 - "example": "1"
3745 - },
3746 - "created_at": {
3747 - "type": "string",
3748 - "format": "date-time",
3749 - "example": "2023-06-28T20:45:01.619833409Z"
3750 - },
3751 - "data": {
3752 - "type": "object",
3753 - "properties": {
3754 - "flagged_rules": {
3755 - "type": "array",
3756 - "items": {
3757 - "type": "object",
3758 - "properties": {
3759 - "id": {
3760 - "type": "string",
3761 - "example": "1845f3e6-e446-4f1a-b256-83539f850ed3"
3762 - },
3763 - "name": {
3764 - "type": "string",
3765 - "example": "Test rule"
3766 - },
3767 - "severity": {
3768 - "type": "string",
3769 - "nullable": true
3770 - },
3771 - "tags": {
3772 - "type": "array",
3773 - "items": {
3774 - "type": "string"
3775 - }
3776 - }
3777 - }
3778 - }
3779 - },
3780 - "message": {
3781 - "type": "object",
3782 - "properties": {
3783 - "canonical_id": {
3784 - "type": "string",
3785 - "example": "c6a577585601e9ac17c949a33f73956ec7ee9f2ad1c4209d7e69dda819a62969"
3786 - },
3787 - "external_id": {
3788 - "type": "string",
3789 - "example": "29082"
3790 - },
3791 - "id": {
3792 - "type": "string",
3793 - "example": "4a29ffda-3efe-4418-b9a0-c4e40878b7c5"
3794 - },
3795 - "mailbox": {
3796 - "type": "object",
3797 - "properties": {
3798 - "external_id": {
3799 - "type": "string",
3800 - "nullable": true
3801 - },
3802 - "id": {
3803 - "type": "string",
3804 - "example": "e921c909-e72a-4c9c-b56c-0dd59c7f49c3"
3805 - }
3806 - }
3807 - },
3808 - "message_source_id": {
3809 - "type": "string",
3810 - "example": "d4bc5aef-ee26-4c54-a43e-de5faa794575"
3811 - }
3812 - }
3813 - },
3814 - "triggered_actions": {
3815 - "type": "array",
3816 - "items": {
3817 - "type": "object",
3818 - "properties": {
3819 - "id": {
3820 - "type": "string",
3821 - "example": "2c16da90-6f79-496b-886a-bf382423762a"
3822 - },
3823 - "name": {
3824 - "type": "string",
3825 - "example": "Shuffle"
3826 - },
3827 - "type": {
3828 - "type": "string",
3829 - "example": "webhook"
3830 - }
3831 - }
3832 - }
3833 - }
3834 - }
3835 - },
3836 - "id": {
3837 - "type": "string",
3838 - "example": "30aae129-ec7a-4797-bcd4-a1e6e924e5db"
3839 - },
3840 - "type": {
3841 - "type": "string",
3842 - "example": "message.flagged"
3843 - }
3844 - }
3845 - }
3846 - }
3847 - }
3848 - },
3849 - "responses": {
3850 - "200": {
3851 - "description": "Successful operation",
3852 - "content": {
3853 - "application/json": {
3854 - "schema": {
3855 - "type": "object",
3856 - "properties": {
3857 - "alert": {
3858 - "type": "object",
3859 - "description": "Alert details"
3860 - }
3861 - }
3862 - }
3863 - }
3864 - }
3865 - },
3866 - "default": {
3867 - "description": "Unexpected error",
3868 - "content": {
3869 - "application/json": {
3870 - "schema": {
3871 - "$ref": "#/components/schemas/Error"
3872 - }
3873 - }
3874 - }
3875 - }
3876 - },
3877 - "operationId": "createAlert",
3878 - "tags": ["Sublime"]
3879 - }
3880 - },
3881 - "/influxdb/checks": {
3882 - "get": {
3883 - "summary": "Get all checks",
3884 - "description": "Endpoint to get all checks.",
3885 - "responses": {
3886 - "200": {
3887 - "description": "Successful operation",
3888 - "content": {
3889 - "application/json": {
3890 - "schema": {
3891 - "type": "object",
3892 - "properties": {
3893 - "checks": {
3894 - "type": "array",
3895 - "items": {
3896 - "type": "object",
3897 - "description": "Check details"
3898 - }
3899 - }
3900 - }
3901 - }
3902 - }
3903 - }
3904 - },
3905 - "default": {
3906 - "description": "Unexpected error",
3907 - "content": {
3908 - "application/json": {
3909 - "schema": {
3910 - "$ref": "#/components/schemas/Error"
3911 - }
3912 - }
3913 - }
3914 - }
3915 - },
3916 - "operationId": "getAllChecks",
3917 - "tags": ["InfluxDB"]
3918 - }
3919 - },
3920 - "/influxdb/checks/{check_id}": {
3921 - "get": {
3922 - "summary": "Get check query",
3923 - "description": "Endpoint to get check query.",
3924 - "parameters": [
3925 - {
3926 - "name": "check_id",
3927 - "in": "path",
3928 - "description": "The ID of the check.",
3929 - "required": true,
3930 - "schema": {
3931 - "type": "string"
3932 - }
3933 - }
3934 - ],
3935 - "responses": {
3936 - "200": {
3937 - "description": "Successful operation",
3938 - "content": {
3939 - "application/json": {
3940 - "schema": {
3941 - "type": "object",
3942 - "properties": {
3943 - "query": {
3944 - "type": "string",
3945 - "description": "The query of the check."
3946 - }
3947 - }
3948 - }
3949 - }
3950 - }
3951 - },
3952 - "default": {
3953 - "description": "Unexpected error",
3954 - "content": {
3955 - "application/json": {
3956 - "schema": {
3957 - "$ref": "#/components/schemas/Error"
3958 - }
3959 - }
3960 - }
3961 - }
3962 - },
3963 - "operationId": "getCheckQuery",
3964 - "tags": ["InfluxDB"]
3965 - }
3966 - },
3967 - "/influxdb/alert": {
3968 - "post": {
3969 - "tags": ["InfluxDB"],
3970 - "summary": "Create alert",
3971 - "description": "Endpoint to create alert.",
3972 - "requestBody": {
3973 - "content": {
3974 - "application/json": {
3975 - "schema": {
3976 - "type": "object",
3977 - "properties": {
3978 - "_check_name": {
3979 - "type": "string",
3980 - "description": "The name of the check."
3981 - },
3982 - "_message": {
3983 - "type": "string",
3984 - "description": "The alert message."
3985 - }
3986 - },
3987 - "required": ["_check_name", "_message"]
3988 - }
3989 - }
3990 - }
3991 - },
3992 - "responses": {
3993 - "200": {
3994 - "description": "Successfully stored alert.",
3995 - "content": {
3996 - "application/json": {
3997 - "schema": {
3998 - "type": "object",
3999 - "properties": {
4000 - "message": {
4001 - "type": "string",
4002 - "example": "Successfully stored alert."
4003 - },
4004 - "success": {
4005 - "type": "boolean",
4006 - "example": true
4007 - }
4008 - }
4009 - }
4010 - }
4011 - }
4012 - },
4013 - "400": {
4014 - "description": "Invalid payload.",
4015 - "content": {
4016 - "application/json": {
4017 - "schema": {
4018 - "type": "object",
4019 - "properties": {
4020 - "message": {
4021 - "type": "string",
4022 - "example": "Invalid payload."
4023 - },
4024 - "success": {
4025 - "type": "boolean",
4026 - "example": false
4027 - }
4028 - }
4029 - }
4030 - }
4031 - }
4032 - }
4033 - }
4034 - }
4035 - },
4036 - "/influxdb/alerts": {
4037 - "get": {
4038 - "summary": "Get all alerts",
4039 - "description": "Endpoint to get all alerts.",
4040 - "responses": {
4041 - "200": {
4042 - "description": "Successful operation",
4043 - "content": {
4044 - "application/json": {
4045 - "schema": {
4046 - "type": "object",
4047 - "properties": {
4048 - "alerts": {
4049 - "type": "array",
4050 - "items": {
4051 - "type": "object",
4052 - "description": "Alert details"
4053 - }
4054 - }
4055 - }
4056 - }
4057 - }
4058 - }
4059 - },
4060 - "default": {
4061 - "description": "Unexpected error",
4062 - "content": {
4063 - "application/json": {
4064 - "schema": {
4065 - "$ref": "#/components/schemas/Error"
4066 - }
4067 - }
4068 - }
4069 - }
4070 - },
4071 - "operationId": "getAllAlerts",
4072 - "tags": ["InfluxDB"]
4073 - }
4074 - },
4075 - "/smtp/credential": {
4076 - "post": {
4077 - "tags": ["SMTP"],
4078 - "summary": "Create credentials to store in database",
4079 - "description": "Endpoint to create credentials to store in database.",
4080 - "requestBody": {
4081 - "content": {
4082 - "application/json": {
4083 - "schema": {
4084 - "type": "object",
4085 - "properties": {
4086 - "email": {
4087 - "type": "string",
4088 - "description": "Email Address"
4089 - },
4090 - "password": {
4091 - "type": "string",
4092 - "description": "Password"
4093 - },
4094 - "smtp_server": {
4095 - "type": "string",
4096 - "description": "SMTP Server"
4097 - },
4098 - "smtp_port": {
4099 - "type": "string",
4100 - "description": "SMTP Port"
4101 - }
4102 - },
4103 - "required": ["email", "password", "smtp_server", "smtp_port"]
4104 - }
4105 - }
4106 - }
4107 - },
4108 - "responses": {
4109 - "200": {
4110 - "description": "Successfully stored credentials.",
4111 - "content": {
4112 - "application/json": {
4113 - "schema": {
4114 - "type": "object",
4115 - "properties": {
4116 - "message": {
4117 - "type": "string",
4118 - "example": "Successfully stored credentials."
4119 - },
4120 - "success": {
4121 - "type": "boolean",
4122 - "example": true
4123 - }
4124 - }
4125 - }
4126 - }
4127 - }
4128 - },
4129 - "400": {
4130 - "description": "Invalid payload.",
4131 - "content": {
4132 - "application/json": {
4133 - "schema": {
4134 - "type": "object",
4135 - "properties": {
4136 - "message": {
4137 - "type": "string",
4138 - "example": "Invalid payload."
4139 - },
4140 - "success": {
4141 - "type": "boolean",
4142 - "example": false
4143 - }
4144 - }
4145 - }
4146 - }
4147 - }
4148 - }
4149 - }
4150 - }
4151 - },
4152 - "/smtp/credentials": {
4153 - "get": {
4154 - "summary": "Get all credentials",
4155 - "description": "Endpoint to get all credentials.",
4156 - "responses": {
4157 - "200": {
4158 - "description": "Successful operation",
4159 - "content": {
4160 - "application/json": {
4161 - "schema": {
4162 - "type": "object",
4163 - "properties": {
4164 - "credentials": {
4165 - "type": "array",
4166 - "items": {
4167 - "type": "object",
4168 - "description": "Credentials details"
4169 - }
4170 - }
4171 - }
4172 - }
4173 - }
4174 - }
4175 - },
4176 - "default": {
4177 - "description": "Unexpected error",
4178 - "content": {
4179 - "application/json": {
4180 - "schema": {
4181 - "$ref": "#/components/schemas/Error"
4182 - }
4183 - }
4184 - }
4185 - }
4186 - },
4187 - "operationId": "getAllCredentials",
4188 - "tags": ["SMTP"]
4189 - }
4190 - },
4191 - "/smtp/report": {
4192 - "post": {
4193 - "tags": ["SMTP"],
4194 - "summary": "Send report",
4195 - "description": "Send report",
4196 - "requestBody": {
4197 - "content": {
4198 - "application/json": {
4199 - "schema": {
4200 - "type": "object",
4201 - "properties": {
4202 - "to_email": {
4203 - "type": "string",
4204 - "description": "Name of recipient"
4205 - }
4206 - },
4207 - "required": ["to_email"]
4208 - }
4209 - }
4210 - }
4211 - },
4212 - "responses": {
4213 - "200": {
4214 - "description": "Successfully stored credentials.",
4215 - "content": {
4216 - "application/json": {
4217 - "schema": {
4218 - "type": "object",
4219 - "properties": {
4220 - "message": {
4221 - "type": "string",
4222 - "example": "Successfully stored credentials."
4223 - },
4224 - "success": {
4225 - "type": "boolean",
4226 - "example": true
4227 - }
4228 - }
4229 - }
4230 - }
4231 - }
4232 - },
4233 - "400": {
4234 - "description": "Invalid payload.",
4235 - "content": {
4236 - "application/json": {
4237 - "schema": {
4238 - "type": "object",
4239 - "properties": {
4240 - "message": {
4241 - "type": "string",
4242 - "example": "Invalid payload."
4243 - },
4244 - "success": {
4245 - "type": "boolean",
4246 - "example": false
4247 - }
4248 - }
4249 - }
4250 - }
4251 - }
4252 - }
4253 - }
4254 - }
4255 - },
4256 - "/healthcheck/agent/full": {
4257 - "get": {
4258 - "summary": "Get full agent healthcheck",
4259 - "description": "Endpoint to get full agent healthcheck.",
4260 - "responses": {
4261 - "200": {
4262 - "description": "Successful operation",
4263 - "content": {
4264 - "application/json": {
4265 - "schema": {
4266 - "type": "object",
4267 - "properties": {
4268 - "agent_healthcheck": {
4269 - "type": "array",
4270 - "items": {
4271 - "type": "object",
4272 - "description": "Agent healthcheck details"
4273 - }
4274 - }
4275 - }
4276 - }
4277 - }
4278 - }
4279 - },
4280 - "default": {
4281 - "description": "Unexpected error",
4282 - "content": {
4283 - "application/json": {
4284 - "schema": {
4285 - "$ref": "#/components/schemas/Error"
4286 - }
4287 - }
4288 - }
4289 - }
4290 - },
4291 - "operationId": "getFullAgentHealthcheck",
4292 - "tags": ["Healthcheck"]
4293 - }
4294 - },
4295 - "/healthcheck/agent/{agent_id}/full": {
4296 - "get": {
4297 - "summary": "Get full agent healthcheck by agent ID",
4298 - "description": "Endpoint to get full agent healthcheck by agent ID.",
4299 - "parameters": [
4300 - {
4301 - "name": "agent_id",
4302 - "in": "path",
4303 - "description": "The ID of the agent.",
4304 - "required": true,
4305 - "schema": {
4306 - "type": "string"
4307 - }
4308 - }
4309 - ],
4310 - "responses": {
4311 - "200": {
4312 - "description": "Successful operation",
4313 - "content": {
4314 - "application/json": {
4315 - "schema": {
4316 - "type": "object",
4317 - "properties": {
4318 - "agent_healthcheck": {
4319 - "type": "array",
4320 - "items": {
4321 - "type": "object",
4322 - "description": "Agent healthcheck details"
4323 - }
4324 - }
4325 - }
4326 - }
4327 - }
4328 - }
4329 - },
4330 - "default": {
4331 - "description": "Unexpected error",
4332 - "content": {
4333 - "application/json": {
4334 - "schema": {
4335 - "$ref": "#/components/schemas/Error"
4336 - }
4337 - }
4338 - }
4339 - }
4340 - },
4341 - "operationId": "getFullAgentHealthcheckByAgentID",
4342 - "tags": ["Healthcheck"]
4343 - }
4344 - },
4345 - "/healthcheck/agent/wazuh": {
4346 - "get": {
4347 - "summary": "Get Wazuh agent healthcheck",
4348 - "description": "Endpoint to get Wazuh agent healthcheck.",
4349 - "responses": {
4350 - "200": {
4351 - "description": "Successful operation",
4352 - "content": {
4353 - "application/json": {
4354 - "schema": {
4355 - "type": "object",
4356 - "properties": {
4357 - "agent_healthcheck": {
4358 - "type": "array",
4359 - "items": {
4360 - "type": "object",
4361 - "description": "Agent healthcheck details"
4362 - }
4363 - }
4364 - }
4365 - }
4366 - }
4367 - }
4368 - },
4369 - "default": {
4370 - "description": "Unexpected error",
4371 - "content": {
4372 - "application/json": {
4373 - "schema": {
4374 - "$ref": "#/components/schemas/Error"
4375 - }
4376 - }
4377 - }
4378 - }
4379 - },
4380 - "operationId": "getWazuhAgentHealthcheck",
4381 - "tags": ["Healthcheck"]
4382 - }
4383 - },
4384 - "/healthcheck/agent/{agent_id}/wazuh": {
4385 - "get": {
4386 - "summary": "Get Wazuh agent healthcheck by agent ID",
4387 - "description": "Endpoint to get Wazuh agent healthcheck by agent ID.",
4388 - "parameters": [
4389 - {
4390 - "name": "agent_id",
4391 - "in": "path",
4392 - "description": "The ID of the agent.",
4393 - "required": true,
4394 - "schema": {
4395 - "type": "string"
4396 - }
4397 - }
4398 - ],
4399 - "responses": {
4400 - "200": {
4401 - "description": "Successful operation",
4402 - "content": {
4403 - "application/json": {
4404 - "schema": {
4405 - "type": "object",
4406 - "properties": {
4407 - "agent_healthcheck": {
4408 - "type": "array",
4409 - "items": {
4410 - "type": "object",
4411 - "description": "Agent healthcheck details"
4412 - }
4413 - }
4414 - }
4415 - }
4416 - }
4417 - }
4418 - },
4419 - "default": {
4420 - "description": "Unexpected error",
4421 - "content": {
4422 - "application/json": {
4423 - "schema": {
4424 - "$ref": "#/components/schemas/Error"
4425 - }
4426 - }
4427 - }
4428 - }
4429 - },
4430 - "operationId": "getWazuhAgentHealthcheckByAgentID",
4431 - "tags": ["Healthcheck"]
4432 - }
4433 - },
4434 - "/healthcheck/agent/velociraptor": {
4435 - "get": {
4436 - "summary": "Get Velociraptor agent healthcheck",
4437 - "description": "Endpoint to get Velociraptor agent healthcheck.",
4438 - "responses": {
4439 - "200": {
4440 - "description": "Successful operation",
4441 - "content": {
4442 - "application/json": {
4443 - "schema": {
4444 - "type": "object",
4445 - "properties": {
4446 - "agent_healthcheck": {
4447 - "type": "array",
4448 - "items": {
4449 - "type": "object",
4450 - "description": "Agent healthcheck details"
4451 - }
4452 - }
4453 - }
4454 - }
4455 - }
4456 - }
4457 - },
4458 - "default": {
4459 - "description": "Unexpected error",
4460 - "content": {
4461 - "application/json": {
4462 - "schema": {
4463 - "$ref": "#/components/schemas/Error"
4464 - }
4465 - }
4466 - }
4467 - }
4468 - },
4469 - "operationId": "getVelociraptorAgentHealthcheck",
4470 - "tags": ["Healthcheck"]
4471 - }
4472 - },
4473 - "/healthcheck/agent/{agent_id}/velociraptor": {
4474 - "get": {
4475 - "summary": "Get Velociraptor agent healthcheck by agent ID",
4476 - "description": "Endpoint to get Velociraptor agent healthcheck by agent ID.",
4477 - "parameters": [
4478 - {
4479 - "name": "agent_id",
4480 - "in": "path",
4481 - "description": "The ID of the agent.",
4482 - "required": true,
4483 - "schema": {
4484 - "type": "string"
4485 - }
4486 - }
4487 - ],
4488 - "responses": {
4489 - "200": {
4490 - "description": "Successful operation",
4491 - "content": {
4492 - "application/json": {
4493 - "schema": {
4494 - "type": "object",
4495 - "properties": {
4496 - "agent_healthcheck": {
4497 - "type": "array",
4498 - "items": {
4499 - "type": "object",
4500 - "description": "Agent healthcheck details"
4501 - }
4502 - }
4503 - }
4504 - }
4505 - }
4506 - }
4507 - },
4508 - "default": {
4509 - "description": "Unexpected error",
4510 - "content": {
4511 - "application/json": {
4512 - "schema": {
4513 - "$ref": "#/components/schemas/Error"
4514 - }
4515 - }
4516 - }
4517 - }
4518 - },
4519 - "operationId": "getVelociraptorAgentHealthcheckByAgentID",
4520 - "tags": ["Healthcheck"]
4521 - }
4522 - },
4523 - "/threatintel/socfortress/{ioc_value}": {
4524 - "get": {
4525 - "summary": "Get SOC Fortress threat intelligence by IOC value",
4526 - "description": "Endpoint to get SOC Fortress threat intelligence by IOC value.",
4527 - "parameters": [
4528 - {
4529 - "name": "ioc_value",
4530 - "in": "path",
4531 - "description": "The IOC value.",
4532 - "required": true,
4533 - "schema": {
4534 - "type": "string"
4535 - }
4536 - }
4537 - ],
4538 - "responses": {
4539 - "200": {
4540 - "description": "Successful operation",
4541 - "content": {
4542 - "application/json": {
4543 - "schema": {
4544 - "type": "object",
4545 - "properties": {
4546 - "threat_intel": {
4547 - "type": "array",
4548 - "items": {
4549 - "type": "object",
4550 - "description": "Threat intelligence details"
4551 - }
4552 - }
4553 - }
4554 - }
4555 - }
4556 - }
4557 - },
4558 - "default": {
4559 - "description": "Unexpected error",
4560 - "content": {
4561 - "application/json": {
4562 - "schema": {
4563 - "$ref": "#/components/schemas/Error"
4564 - }
4565 - }
4566 - }
4567 - }
4568 - },
4569 - "operationId": "getSOCFortressThreatIntelByIOCValue",
4570 - "tags": ["Threat Intel"]
4571 - }
4572 - },
4573 - "/threatintel/socfortress/search/wazuh": {
4574 - "post": {
4575 - "tags": ["Threat Intel"],
4576 - "summary": "Search field name for IoCs in Wazuh Indicies",
4577 - "description": "Search field name for IoCs in Wazuh Indicies.",
4578 - "requestBody": {
4579 - "content": {
4580 - "application/json": {
4581 - "schema": {
4582 - "type": "object",
4583 - "properties": {
4584 - "field_name": {
4585 - "type": "dns_query",
4586 - "description": "Field name to search for IoCs"
4587 - },
4588 - "time_range": {
4589 - "type": "24h",
4590 - "description": "Time range to search for IoCs"
4591 - }
4592 - },
4593 - "required": ["field_name", "time_range"]
4594 - }
4595 - }
4596 - }
4597 - },
4598 - "responses": {
4599 - "200": {
4600 - "description": "Successfully searched for IoCs.",
4601 - "content": {
4602 - "application/json": {
4603 - "schema": {
4604 - "type": "object",
4605 - "properties": {
4606 - "message": {
4607 - "type": "string",
4608 - "example": "Successfully searched for IoCs."
4609 - },
4610 - "success": {
4611 - "type": "boolean",
4612 - "example": true
4613 - }
4614 - }
4615 - }
4616 - }
4617 - }
4618 - },
4619 - "400": {
4620 - "description": "Invalid payload.",
4621 - "content": {
4622 - "application/json": {
4623 - "schema": {
4624 - "type": "object",
4625 - "properties": {
4626 - "message": {
4627 - "type": "string",
4628 - "example": "Invalid payload."
4629 - },
4630 - "success": {
4631 - "type": "boolean",
4632 - "example": false
4633 - }
4634 - }
4635 - }
4636 - }
4637 - }
4638 - }
4639 - }
4640 - }
4641 - }
4642 - },
4643 - "components": {
4644 - "schemas": {
4645 - "Agent": {
4646 - "type": "object",
4647 - "properties": {
4648 - "agent_id": {
4649 - "type": "string",
4650 - "description": "The ID of the agent."
4651 - },
4652 - "critical_asset": {
4653 - "type": "boolean",
4654 - "description": "Flag indicating if the agent is a critical asset."
4655 - },
4656 - "hostname": {
4657 - "type": "string",
4658 - "description": "The hostname of the agent."
4659 - },
4660 - "id": {
4661 - "type": "integer",
4662 - "description": "The primary key of the agent."
4663 - },
4664 - "ip_address": {
4665 - "type": "string",
4666 - "description": "The IP address of the agent."
4667 - },
4668 - "last_seen": {
4669 - "type": "string",
4670 - "format": "date-time",
4671 - "description": "The last time the agent was seen."
4672 - },
4673 - "os": {
4674 - "type": "string",
4675 - "description": "The operating system of the agent."
4676 - }
4677 - },
4678 - "required": ["agent_id", "hostname", "id", "ip_address", "last_seen", "os"]
4679 - }
4680 - }
4681 - }
4682 -}
2 + "openapi": "3.0.3",
3 + "info": {
4 + "title": "SOCFortress CoPilot",
5 + "version": "1.0.0"
6 + },
7 + "servers": [
8 + {
9 + "url": "http://localhost:5000"
10 + },
11 + {
12 + "url": "http://127.0.0.1:5000"
13 + }
14 + ],
15 + "tags": [
16 + {
17 + "name": "Connectors",
18 + "description": "Everything about your Connectors",
19 + "externalDocs": {
20 + "description": "Find out more",
21 + "url": "http://swagger.io"
22 + }
23 + },
24 + {
25 + "name": "Customers",
26 + "description": "Everything about your Customers",
27 + "externalDocs": {
28 + "description": "Find out more",
29 + "url": "http://swagger.io"
30 + }
31 + },
32 + {
33 + "name": "Agents",
34 + "description": "Everything about your Agents",
35 + "externalDocs": {
36 + "description": "Find out more",
37 + "url": "http://swagger.io"
38 + }
39 + },
40 + {
41 + "name": "Rules",
42 + "description": "Everything about your Wazuh Rules",
43 + "externalDocs": {
44 + "description": "Find out more",
45 + "url": "http://swagger.io"
46 + }
47 + },
48 + {
49 + "name": "Graylog",
50 + "description": "Everything about Graylog",
51 + "externalDocs": {
52 + "description": "Find out more",
53 + "url": "http://swagger.io"
54 + }
55 + },
56 + {
57 + "name": "Wazuh-Indexer",
58 + "description": "Everything about Wazuh-Indexer",
59 + "externalDocs": {
60 + "description": "Find out more",
61 + "url": "http://swagger.io"
62 + }
63 + },
64 + {
65 + "name": "Shuffle",
66 + "description": "Everything about Shuffle",
67 + "externalDocs": {
68 + "description": "Find out more",
69 + "url": "http://swagger.io"
70 + }
71 + },
72 + {
73 + "name": "Velociraptor",
74 + "description": "Everything about Velociraptor",
75 + "externalDocs": {
76 + "description": "Find out more",
77 + "url": "http://swagger.io"
78 + }
79 + },
80 + {
81 + "name": "DFIR-IRIS",
82 + "description": "Everything about DFIR-IRIS",
83 + "externalDocs": {
84 + "description": "Find out more",
85 + "url": "http://swagger.io"
86 + }
87 + },
88 + {
89 + "name": "Sublime",
90 + "description": "Everything about Sublime",
91 + "externalDocs": {
92 + "description": "Find out more",
93 + "url": "http://swagger.io"
94 + }
95 + },
96 + {
97 + "name": "InfluxDB",
98 + "description": "Everything about InfluxDB",
99 + "externalDocs": {
100 + "description": "Find out more",
101 + "url": "http://swagger.io"
102 + }
103 + },
104 + {
105 + "name": "Healthcheck",
106 + "description": "Everything about Healthcheck",
107 + "externalDocs": {
108 + "description": "Find out more",
109 + "url": "http://swagger.io"
110 + }
111 + },
112 + {
113 + "name": "SMTP",
114 + "description": "Everything about SMTP",
115 + "externalDocs": {
116 + "description": "Find out more",
117 + "url": "http://swagger.io"
118 + }
119 + },
120 + {
121 + "name": "Threat Intel",
122 + "description": "Everything about Threat Intel",
123 + "externalDocs": {
124 + "description": "Find out more",
125 + "url": "http://swagger.io"
126 + }
127 + }
128 + ],
129 + "paths": {
130 + "/connectors": {
131 + "get": {
132 + "tags": [
133 + "Connectors"
134 + ],
135 + "summary": "List all available connectors",
136 + "description": "Endpoint to list all available connectors. It processes each connector to verify the connection and returns the results.",
137 + "responses": {
138 + "200": {
139 + "description": "A JSON response containing the list of all available connectors along with their connection verification status.",
140 + "content": {
141 + "application/json": {
142 + "schema": {
143 + "type": "array",
144 + "items": {
145 + "type": "object",
146 + "properties": {
147 + "connectionSuccessful": {
148 + "type": "boolean"
149 + },
150 + "connector_api_key": {
151 + "type": "string",
152 + "nullable": true
153 + },
154 + "connector_last_updated": {
155 + "type": "string",
156 + "format": "date-time"
157 + },
158 + "connector_name": {
159 + "type": "string"
160 + },
161 + "connector_password": {
162 + "type": "string",
163 + "nullable": true
164 + },
165 + "connector_type": {
166 + "type": "string"
167 + },
168 + "connector_url": {
169 + "type": "string"
170 + },
171 + "connector_username": {
172 + "type": "string",
173 + "nullable": true
174 + },
175 + "id": {
176 + "type": "integer"
177 + },
178 + "name": {
179 + "type": "string"
180 + }
181 + }
182 + }
183 + }
184 + }
185 + }
186 + }
187 + }
188 + }
189 + },
190 + "/connectors/{id}": {
191 + "get": {
192 + "tags": [
193 + "Connectors"
194 + ],
195 + "summary": "Get the details of a specific connector.",
196 + "operationId": "getConnectorDetails",
197 + "parameters": [
198 + {
199 + "name": "id",
200 + "in": "path",
201 + "description": "The id of the connector to be fetched.",
202 + "required": true,
203 + "schema": {
204 + "type": "integer"
205 + }
206 + }
207 + ],
208 + "responses": {
209 + "200": {
210 + "description": "A JSON response containing the details of the connector.",
211 + "content": {
212 + "application/json": {
213 + "schema": {
214 + "type": "object",
215 + "properties": {
216 + "name": {
217 + "type": "string"
218 + },
219 + "connectionSuccessful": {
220 + "type": "boolean"
221 + },
222 + "connector_api_key": {
223 + "type": "string",
224 + "nullable": true
225 + },
226 + "connector_last_updated": {
227 + "type": "string",
228 + "format": "date-time"
229 + },
230 + "connector_name": {
231 + "type": "string"
232 + },
233 + "connector_password": {
234 + "type": "string",
235 + "nullable": true
236 + },
237 + "connector_type": {
238 + "type": "string"
239 + },
240 + "connector_url": {
241 + "type": "string"
242 + },
243 + "connector_username": {
244 + "type": "string",
245 + "nullable": true
246 + },
247 + "id": {
248 + "type": "integer"
249 + }
250 + }
251 + }
252 + }
253 + }
254 + },
255 + "404": {
256 + "description": "The connector could not be found."
257 + }
258 + }
259 + },
260 + "put": {
261 + "tags": [
262 + "Connectors"
263 + ],
264 + "summary": "Update a connector",
265 + "description": "Endpoint to update a connector. If the update operation was successful, it returns the connection verification status for the updated connector.",
266 + "operationId": "update_connector_route",
267 + "parameters": [
268 + {
269 + "name": "id",
270 + "in": "path",
271 + "description": "The id of the connector to be updated.",
272 + "required": true,
273 + "schema": {
274 + "type": "integer"
275 + }
276 + }
277 + ],
278 + "requestBody": {
279 + "content": {
280 + "application/json": {
281 + "schema": {
282 + "type": "object",
283 + "properties": {
284 + "connector_url": {
285 + "type": "string"
286 + },
287 + "connector_username": {
288 + "type": "string",
289 + "nullable": true
290 + },
291 + "connector_password": {
292 + "type": "string",
293 + "nullable": true
294 + },
295 + "connector_api_key": {
296 + "type": "string",
297 + "nullable": true
298 + }
299 + }
300 + }
301 + }
302 + },
303 + "required": true
304 + },
305 + "responses": {
306 + "200": {
307 + "description": "A JSON response containing the connection verification status of the updated connector.",
308 + "content": {
309 + "application/json": {
310 + "schema": {
311 + "type": "object",
312 + "properties": {
313 + "name": {
314 + "type": "string"
315 + },
316 + "connected": {
317 + "type": "boolean"
318 + },

This file is too large to show in full.

backend/copilot.db-journal
Binary files a/backend/copilot.db-journal and /dev/null differ
src/components/connectors/ConfigForm/FormTypes/FileType.vue
+3 -1
@@ -58,7 +58,9 @@ const validateFile = (rule: any, value: File, callback: any) => {
58 return callback(new Error("Please input a valid File"))
59 }
60
61 - if (value.type.indexOf("yaml") === -1) {
61 + const stringCheck = value.name + value.type
62 +
63 + if (stringCheck.indexOf("yaml") === -1) {
64 return callback(new Error("Please input a valid File"))
65 }
66