From 39a7d11ddd4fbf2aaa70bbc244bee66bcf9e23e8 Mon Sep 17 00:00:00 2001
From: Johanna Szepanski <johanna.szepanski@softhouse.se>
Date: Thu, 15 Aug 2024 15:02:13 +0200
Subject: [PATCH] adjusted IOC details story and mockdata to accomodate api
 changes

---
 src/mocks/fixtures/IOCAlerts.json             | 103 ++
 src/mocks/fixtures/IOCDetails.json            | 120 +--
 src/mocks/fixtures/IOCStatus.json             |  85 +-
 src/mocks/fixtures/ccce-api.json              | 994 +++++++++++-------
 src/mocks/mockAPI.js                          |  19 +
 .../views/IOC/IocDetailsView.stories.js       |   2 +-
 6 files changed, 733 insertions(+), 590 deletions(-)
 create mode 100644 src/mocks/fixtures/IOCAlerts.json

diff --git a/src/mocks/fixtures/IOCAlerts.json b/src/mocks/fixtures/IOCAlerts.json
new file mode 100644
index 00000000..c59b7949
--- /dev/null
+++ b/src/mocks/fixtures/IOCAlerts.json
@@ -0,0 +1,103 @@
+[
+  {
+    "iocId": 14,
+    "alertSeverity": "ERROR",
+    "alerts": [
+      {
+        "type": "ERROR",
+        "message": "IOC's latest deployment failed, IOC may be in inconsistent state",
+        "link": null
+      },
+      {
+        "type": "WARNING",
+        "message": "This is a warning message",
+        "link": null
+      }
+    ]
+  },
+  {
+    "iocId": 15,
+    "alertSeverity": "WARNING",
+    "alerts": [
+      {
+        "type": "WARNING",
+        "message": "This is warning 1",
+        "link": null
+      },
+      {
+        "type": "WARNING",
+        "message": "This is warning 2",
+        "link": null
+      }
+    ]
+  },
+  {
+    "iocId": 18,
+    "alertSeverity": "INFO",
+    "alerts": [
+      {
+        "type": "INFO",
+        "message": "IOC is not deployed",
+        "link": null
+      }
+    ]
+  },
+  {
+    "iocId": 39,
+    "alertSeverity": "WARNING",
+    "alerts": [
+      {
+        "type": "WARNING",
+        "message": "IOC is active with warning message",
+        "link": null
+      }
+    ]
+  },
+  {
+    "iocId": 21,
+    "alertSeverity": null,
+    "alerts": []
+  },
+  {
+    "iocId": 49,
+    "alertSeverity": "INFO",
+    "alerts": [
+      {
+        "type": "INFO",
+        "message": "IOC is not deployed",
+        "link": null
+      }
+    ]
+  },
+  {
+    "iocId": 40,
+    "alertSeverity": null,
+    "alerts": []
+  },
+  {
+    "iocId": 41,
+    "alertSeverity": null,
+    "alerts": []
+  },
+  {
+    "iocId": 42,
+    "alertSeverity": null,
+    "alerts": []
+  },
+  {
+    "iocId": 43,
+    "alertSeverity": "ERROR",
+    "alerts": [
+      {
+        "type": "ERROR",
+        "message": "IOC's latest deployment failed, IOC may be in inconsistent state",
+        "link": null
+      },
+      {
+        "type": "WARNING",
+        "message": "This is a warning message",
+        "link": null
+      }
+    ]
+  }
+]
diff --git a/src/mocks/fixtures/IOCDetails.json b/src/mocks/fixtures/IOCDetails.json
index d597a512..61f6cb8a 100644
--- a/src/mocks/fixtures/IOCDetails.json
+++ b/src/mocks/fixtures/IOCDetails.json
@@ -7,26 +7,6 @@
     "namingUuid": "82a01351-2892-491e-932b-6fe438216cfd",
     "gitProjectId": 5959,
     "sourceUrl": "https://gitlab.esss.lu.se/ccce/dev/iocs/instances/e3-ioc-test-01.git",
-    "activeDeployment": null,
-    "deployedWithOldPlaybook": true,
-    "alerts": [
-      {
-        "type": "INFO",
-        "message": "IOC is not deployed",
-        "link": null
-      }
-    ],
-    "operationInProgress": false,
-    "active": null
-  },
-  {
-    "id": 15,
-    "description": "Test IOC for CCCE",
-    "namingName": "CCCE:MOCK2",
-    "createdBy": "mock user 2",
-    "namingUuid": "0a7fdee4-cfa6-447f-ab85-ae9335507fd3",
-    "gitProjectId": 5970,
-    "sourceUrl": "https://gitlab.esss.lu.se/ccce/dev/iocs/instances/e3-ioc-test-02.git",
     "activeDeployment": {
       "id": 410,
       "createdBy": "johannaszepanski",
@@ -46,26 +26,21 @@
         "hostName": "ccce-test-ioc-01",
         "network": "CSLab-GeneralLab"
       },
-      "jobId": 6588,
-      "sourceUrl": "https://gitlab.esss.lu.se/ccce/dev/iocs/instances/e3-ioc-test-02.git",
-      "sourceVersionShort": "d4df546c",
-      "operationStatus": "FAILED"
-    },
+      "deployedWithOldPlaybook": true,
+      "operationInProgress": false
+    }
+  },
+  {
+    "id": 15,
+    "description": "Test IOC for CCCE",
+    "namingName": "CCCE:MOCK2",
+    "createdBy": "mock user 2",
+    "namingUuid": "0a7fdee4-cfa6-447f-ab85-ae9335507fd3",
+    "gitProjectId": 5970,
+    "sourceUrl": "https://gitlab.esss.lu.se/ccce/dev/iocs/instances/e3-ioc-test-02.git",
+    "activeDeployment": null,
     "deployedWithOldPlaybook": false,
-    "alerts": [
-      {
-        "type": "ERROR",
-        "message": "Example alert without link",
-        "link": null
-      },
-      {
-        "type": "ERROR",
-        "message": "Example alert with link",
-        "link": "https://google.com"
-      }
-    ],
-    "operationInProgress": false,
-    "active": null
+    "operationInProgress": false
   },
   {
     "id": 18,
@@ -77,13 +52,6 @@
     "sourceUrl": "https://gitlab.esss.lu.se/ccce/dev/iocs/instances/e3-ioc-test-03.git",
     "activeDeployment": null,
     "deployedWithOldPlaybook": false,
-    "alerts": [
-      {
-        "type": "INFO",
-        "message": "IOC is not deployed",
-        "link": null
-      }
-    ],
     "operationInProgress": false,
     "active": null
   },
@@ -120,7 +88,6 @@
       "operationStatus": "FAILED"
     },
     "deployedWithOldPlaybook": false,
-    "alerts": [],
     "operationInProgress": false,
     "active": null
   },
@@ -156,7 +123,6 @@
       "operationStatus": "SUCCESSFUL"
     },
     "deployedWithOldPlaybook": false,
-    "alerts": [],
     "operationInProgress": false,
     "active": null
   },
@@ -170,13 +136,6 @@
     "sourceUrl": "https://gitlab.esss.lu.se/ccce/dev/iocs/instances/e3-ioc-jsztest-3.git",
     "activeDeployment": null,
     "deployedWithOldPlaybook": true,
-    "alerts": [
-      {
-        "type": "INFO",
-        "message": "IOC is not deployed",
-        "link": null
-      }
-    ],
     "operationInProgress": false,
     "active": null
   },
@@ -189,18 +148,6 @@
     "sourceUrl": null,
     "activeDeployment": null,
     "deployedWithOldPlaybook": true,
-    "alerts": [
-      {
-        "type": "ERROR",
-        "message": "Cannot find the repository in Gitlab",
-        "link": null
-      },
-      {
-        "type": "INFO",
-        "message": "IOC is not deployed",
-        "link": null
-      }
-    ],
     "operationInProgress": false,
     "active": null
   },
@@ -213,18 +160,6 @@
     "sourceUrl": null,
     "activeDeployment": null,
     "deployedWithOldPlaybook": true,
-    "alerts": [
-      {
-        "type": "ERROR",
-        "message": "Cannot find the repository in Gitlab",
-        "link": null
-      },
-      {
-        "type": "INFO",
-        "message": "IOC is not deployed",
-        "link": null
-      }
-    ],
     "operationInProgress": false,
     "active": null
   },
@@ -238,18 +173,6 @@
     "sourceUrl": null,
     "activeDeployment": null,
     "deployedWithOldPlaybook": true,
-    "alerts": [
-      {
-        "type": "ERROR",
-        "message": "Cannot find the repository in Gitlab",
-        "link": null
-      },
-      {
-        "type": "INFO",
-        "message": "IOC is not deployed",
-        "link": null
-      }
-    ],
     "operationInProgress": false,
     "active": null
   },
@@ -263,19 +186,6 @@
     "sourceUrl": null,
     "activeDeployment": null,
     "deployedWithOldPlaybook": true,
-    "alerts": [
-      {
-        "type": "ERROR",
-        "message": "Cannot find the repository in Gitlab",
-        "link": null
-      },
-      {
-        "type": "INFO",
-        "message": "IOC is not deployed",
-        "link": null
-      }
-    ],
-    "operationInProgress": false,
-    "active": null
+    "operationInProgress": false
   }
 ]
diff --git a/src/mocks/fixtures/IOCStatus.json b/src/mocks/fixtures/IOCStatus.json
index b2fdc506..c3da9093 100644
--- a/src/mocks/fixtures/IOCStatus.json
+++ b/src/mocks/fixtures/IOCStatus.json
@@ -1,107 +1,42 @@
 [
   {
     "iocId": 14,
-    "alertSeverity": "ERROR",
-    "alerts": [
-      {
-        "type": "ERROR",
-        "message": "IOC's latest deployment failed, IOC may be in inconsistent state",
-        "link": null
-      },
-      {
-        "type": "WARNING",
-        "message": "This is a warning message",
-        "link": null
-      }
-    ],
-    "active": true
+    "isActive": true
   },
   {
     "iocId": 15,
-    "alertSeverity": "WARNING",
-    "alerts": [
-      {
-        "type": "WARNING",
-        "message": "This is warning 1",
-        "link": null
-      },
-      {
-        "type": "WARNING",
-        "message": "This is warning 2",
-        "link": null
-      }
-    ],
-    "active": null
+    "isActive": null
   },
   {
     "iocId": 18,
-    "alertSeverity": "INFO",
-    "alerts": [
-      {
-        "type": "INFO",
-        "message": "IOC is not deployed",
-        "link": null
-      }
-    ],
-    "active": null
+    "isActive": null
   },
   {
     "iocId": 39,
-    "alertSeverity": null,
-    "alerts": [],
-    "active": null
+    "isActive": true
   },
   {
     "iocId": 21,
-    "alertSeverity": null,
-    "alerts": [],
-    "active": null
+    "isActive": null
   },
   {
     "iocId": 49,
-    "alertSeverity": "INFO",
-    "alerts": [
-      {
-        "type": "INFO",
-        "message": "IOC is not deployed",
-        "link": null
-      }
-    ],
-    "active": null
+    "isActive": null
   },
   {
     "iocId": 40,
-    "alertSeverity": null,
-    "alerts": [],
-    "active": true
+    "isActive": true
   },
   {
     "iocId": 41,
-    "alertSeverity": null,
-    "alerts": [],
-    "active": true
+    "isActive": true
   },
   {
     "iocId": 42,
-    "alertSeverity": null,
-    "alerts": [],
-    "active": true
+    "isActive": true
   },
   {
     "iocId": 43,
-    "alertSeverity": "ERROR",
-    "alerts": [
-      {
-        "type": "ERROR",
-        "message": "Cannot find the repository in Gitlab",
-        "link": null
-      },
-      {
-        "type": "INFO",
-        "message": "IOC is not deployed",
-        "link": null
-      }
-    ],
-    "active": null
+    "isActive": null
   }
 ]
diff --git a/src/mocks/fixtures/ccce-api.json b/src/mocks/fixtures/ccce-api.json
index d0ec99b4..f7105e4b 100644
--- a/src/mocks/fixtures/ccce-api.json
+++ b/src/mocks/fixtures/ccce-api.json
@@ -24,6 +24,9 @@
     {
       "name": "Authentication"
     },
+    {
+      "name": "AWX"
+    },
     {
       "name": "Records"
     },
@@ -57,12 +60,12 @@
           "required": true
         },
         "responses": {
-          "201": {
-            "description": "Maintenance Mode Changed",
+          "422": {
+            "description": "Unprocessable request",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/MaintenanceMode"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -77,8 +80,8 @@
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -97,18 +100,18 @@
               }
             }
           },
-          "409": {
-            "description": "Maintenance Mode already set to that value",
+          "201": {
+            "description": "Maintenance Mode Changed",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/MaintenanceMode"
                 }
               }
             }
           },
-          "422": {
-            "description": "Unprocessable request",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -117,8 +120,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "409": {
+            "description": "Maintenance Mode already set to that value",
             "content": {
               "application/json": {
                 "schema": {
@@ -151,12 +154,12 @@
         "summary": "Get Current Maintenance Mode",
         "operationId": "getCurrentMode",
         "responses": {
-          "200": {
-            "description": "Found Mode",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/MaintenanceMode"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -171,12 +174,12 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "200": {
+            "description": "Found Mode",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/MaintenanceMode"
                 }
               }
             }
@@ -188,12 +191,12 @@
         "summary": "End Current Maintenance Mode",
         "operationId": "endCurrentMaintenanceMode",
         "responses": {
-          "201": {
-            "description": "Maintenance Mode Changed",
+          "422": {
+            "description": "Unprocessable request",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/MaintenanceMode"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -208,8 +211,8 @@
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -228,18 +231,18 @@
               }
             }
           },
-          "409": {
-            "description": "Maintenance Mode already set to that value",
+          "201": {
+            "description": "Maintenance Mode Changed",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/MaintenanceMode"
                 }
               }
             }
           },
-          "422": {
-            "description": "Unprocessable request",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -248,8 +251,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "409": {
+            "description": "Maintenance Mode already set to that value",
             "content": {
               "application/json": {
                 "schema": {
@@ -409,8 +412,8 @@
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -419,8 +422,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -446,18 +449,18 @@
           "required": true
         },
         "responses": {
-          "201": {
-            "description": "IOC created",
+          "422": {
+            "description": "Unprocessable request",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/Ioc"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "400": {
-            "description": "Incomplete, or bad request",
+          "403": {
+            "description": "Forbidden: User doesn't have the necessary permissions in Gitlab",
             "content": {
               "application/json": {
                 "schema": {
@@ -466,8 +469,8 @@
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -476,8 +479,8 @@
               }
             }
           },
-          "403": {
-            "description": "Forbidden: User doesn't have the necessary permissions in Gitlab",
+          "424": {
+            "description": "Metadata file not found, or not processable",
             "content": {
               "application/json": {
                 "schema": {
@@ -486,8 +489,8 @@
               }
             }
           },
-          "409": {
-            "description": "IOC already created",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -496,8 +499,8 @@
               }
             }
           },
-          "422": {
-            "description": "Unprocessable request",
+          "400": {
+            "description": "Incomplete, or bad request",
             "content": {
               "application/json": {
                 "schema": {
@@ -506,8 +509,8 @@
               }
             }
           },
-          "424": {
-            "description": "Metadata file not found, or not processable",
+          "409": {
+            "description": "IOC already created",
             "content": {
               "application/json": {
                 "schema": {
@@ -516,8 +519,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "503": {
+            "description": "Remote service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -526,12 +529,12 @@
               }
             }
           },
-          "503": {
-            "description": "Remote service exception",
+          "201": {
+            "description": "IOC created",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/Ioc"
                 }
               }
             }
@@ -572,12 +575,12 @@
           "required": true
         },
         "responses": {
-          "201": {
-            "description": "IOC operation initiated",
+          "403": {
+            "description": "Forbidden: User doesn't have the necessary permissions in Gitlab",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/Operation"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -592,8 +595,8 @@
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -602,8 +605,8 @@
               }
             }
           },
-          "403": {
-            "description": "Forbidden: User doesn't have the necessary permissions in Gitlab",
+          "404": {
+            "description": "IOC not found",
             "content": {
               "application/json": {
                 "schema": {
@@ -612,8 +615,28 @@
               }
             }
           },
-          "404": {
-            "description": "IOC not found",
+          "424": {
+            "description": "Metadata file not found, or not processable",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/GeneralException"
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Unauthorized",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/GeneralException"
+                }
+              }
+            }
+          },
+          "503": {
+            "description": "Remote service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -632,6 +655,16 @@
               }
             }
           },
+          "201": {
+            "description": "IOC operation initiated",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Operation"
+                }
+              }
+            }
+          },
           "422": {
             "description": "IOC has no active / NetBox host not found / IOC is not deployed correctly",
             "content": {
@@ -641,9 +674,43 @@
                 }
               }
             }
+          }
+        },
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ]
+      }
+    },
+    "/api/v1/awx/jobs": {
+      "post": {
+        "tags": ["AWX"],
+        "summary": "Update an AWX job's status",
+        "operationId": "updateJob",
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/AwxJobMeta"
+              }
+            }
+          },
+          "required": true
+        },
+        "responses": {
+          "500": {
+            "description": "Service exception",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/GeneralException"
+                }
+              }
+            }
           },
-          "424": {
-            "description": "Metadata file not found, or not processable",
+          "200": {
+            "description": "Job updated",
             "content": {
               "application/json": {
                 "schema": {
@@ -652,8 +719,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -662,8 +729,8 @@
               }
             }
           },
-          "503": {
-            "description": "Remote service exception",
+          "404": {
+            "description": "Job not found",
             "content": {
               "application/json": {
                 "schema": {
@@ -675,7 +742,7 @@
         },
         "security": [
           {
-            "bearerAuth": []
+            "apiKey": []
           }
         ]
       }
@@ -687,12 +754,12 @@
         "description": "Renewing valid, non-expired JWT token",
         "operationId": "tokenRenew",
         "responses": {
-          "200": {
-            "description": "Ok",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/LoginResponse"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -707,18 +774,18 @@
               }
             }
           },
-          "403": {
-            "description": "Permission denied",
+          "200": {
+            "description": "Ok",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/LoginResponse"
                 }
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "503": {
+            "description": "Login server unavailable",
             "content": {
               "application/json": {
                 "schema": {
@@ -727,8 +794,8 @@
               }
             }
           },
-          "503": {
-            "description": "Login server unavailable",
+          "403": {
+            "description": "Permission denied",
             "content": {
               "application/json": {
                 "schema": {
@@ -762,18 +829,18 @@
           "required": true
         },
         "responses": {
-          "200": {
-            "description": "Ok",
+          "401": {
+            "description": "Bad username, and/or password",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/LoginResponse"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Bad username, and/or password",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -792,12 +859,12 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "200": {
+            "description": "Ok",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/LoginResponse"
                 }
               }
             }
@@ -833,18 +900,18 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Found IOC",
+          "404": {
+            "description": "Ioc not found",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/IocDetails"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -853,18 +920,18 @@
               }
             }
           },
-          "404": {
-            "description": "Ioc not found",
+          "200": {
+            "description": "Found IOC",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/IocDetails"
                 }
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -892,18 +959,18 @@
           }
         ],
         "responses": {
-          "204": {
-            "description": "IOC deleted",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "type": "string"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "503": {
+            "description": "Git repository can not be deleted",
             "content": {
               "application/json": {
                 "schema": {
@@ -912,8 +979,8 @@
               }
             }
           },
-          "403": {
-            "description": "Forbidden: User doesn't have the necessary permissions",
+          "404": {
+            "description": "IOC not found",
             "content": {
               "application/json": {
                 "schema": {
@@ -922,8 +989,8 @@
               }
             }
           },
-          "404": {
-            "description": "IOC not found",
+          "403": {
+            "description": "Forbidden: User doesn't have the necessary permissions",
             "content": {
               "application/json": {
                 "schema": {
@@ -932,8 +999,8 @@
               }
             }
           },
-          "409": {
-            "description": "Concurrent deployment, undeployment, start or stop for IOC is ongoing",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -942,18 +1009,18 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "204": {
+            "description": "IOC deleted",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "type": "string"
                 }
               }
             }
           },
-          "503": {
-            "description": "Remote service exception",
+          "409": {
+            "description": "Concurrent deployment, undeployment, start or stop for IOC is ongoing",
             "content": {
               "application/json": {
                 "schema": {
@@ -996,28 +1063,28 @@
           "required": true
         },
         "responses": {
-          "200": {
-            "description": "IOC updated",
+          "422": {
+            "description": "Unprocessable request",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/Ioc"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "200": {
+            "description": "IOC updated",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/Ioc"
                 }
               }
             }
           },
-          "403": {
-            "description": "Forbidden: User doesn't have the necessary permissions",
+          "404": {
+            "description": "Ioc not found",
             "content": {
               "application/json": {
                 "schema": {
@@ -1026,8 +1093,8 @@
               }
             }
           },
-          "404": {
-            "description": "Ioc not found",
+          "409": {
+            "description": "IOC already created or concurrent deployment, undeployment, start or stop for IOC is ongoing",
             "content": {
               "application/json": {
                 "schema": {
@@ -1036,8 +1103,8 @@
               }
             }
           },
-          "409": {
-            "description": "IOC already created or concurrent deployment, undeployment, start or stop for IOC is ongoing",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -1046,8 +1113,8 @@
               }
             }
           },
-          "422": {
-            "description": "Unprocessable request",
+          "403": {
+            "description": "Forbidden: User doesn't have the necessary permissions",
             "content": {
               "application/json": {
                 "schema": {
@@ -1056,8 +1123,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -1103,21 +1170,18 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Undeployment created",
+          "403": {
+            "description": "Forbidden: user doesn't have the necessary permissions to undeploy",
             "content": {
               "application/json": {
                 "schema": {
-                  "type": "array",
-                  "items": {
-                    "$ref": "#/components/schemas/Deployment"
-                  }
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -1126,18 +1190,21 @@
               }
             }
           },
-          "403": {
-            "description": "Forbidden: user doesn't have the necessary permissions to undeploy",
+          "200": {
+            "description": "Undeployment created",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/Deployment"
+                  }
                 }
               }
             }
           },
-          "404": {
-            "description": "Not found",
+          "409": {
+            "description": "Ongoing deployment, or undeployment for IOC",
             "content": {
               "application/json": {
                 "schema": {
@@ -1146,8 +1213,8 @@
               }
             }
           },
-          "409": {
-            "description": "Ongoing deployment, or undeployment for IOC",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -1166,8 +1233,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "404": {
+            "description": "Not found",
             "content": {
               "application/json": {
                 "schema": {
@@ -1213,25 +1280,25 @@
           "required": true
         },
         "responses": {
-          "200": {
-            "description": "Successful host update",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "type": "array",
-                  "items": {
-                    "$ref": "#/components/schemas/Ioc"
-                  }
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "200": {
+            "description": "Successful host update",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/Ioc"
+                  }
                 }
               }
             }
@@ -1246,8 +1313,8 @@
               }
             }
           },
-          "404": {
-            "description": "Not found",
+          "409": {
+            "description": "Ongoing operation for IOC",
             "content": {
               "application/json": {
                 "schema": {
@@ -1256,8 +1323,8 @@
               }
             }
           },
-          "409": {
-            "description": "Ongoing operation for IOC",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -1276,8 +1343,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "404": {
+            "description": "Not found",
             "content": {
               "application/json": {
                 "schema": {
@@ -1294,6 +1361,24 @@
         ]
       }
     },
+    "/healthcheck": {
+      "get": {
+        "tags": ["health-check-controller"],
+        "operationId": "getHealthCheck",
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "*/*": {
+                "schema": {
+                  "type": "string"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
     "/api/v1/statistics/general/{statistics_type}": {
       "get": {
         "tags": ["Statistics"],
@@ -1319,28 +1404,28 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Calculate statistics",
+          "400": {
+            "description": "Unsupported statistic type",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/StatisticResponse"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "400": {
-            "description": "Unsupported statistic type",
+          "200": {
+            "description": "Calculate statistics",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/StatisticResponse"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -1349,8 +1434,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -1368,12 +1453,12 @@
         "summary": "Operation history from DB for statistics",
         "operationId": "operationHistory",
         "responses": {
-          "200": {
-            "description": "Operations history from DB for statistics",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/OperationStatisticsResponse"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -1388,12 +1473,12 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "200": {
+            "description": "Operations history from DB for statistics",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/OperationStatisticsResponse"
                 }
               }
             }
@@ -1407,15 +1492,12 @@
         "summary": "Currently active IOC statistics",
         "operationId": "currentlyActiveIocs",
         "responses": {
-          "200": {
-            "description": "Statistics about currently active IOCs",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "type": "array",
-                  "items": {
-                    "$ref": "#/components/schemas/ActiveIocStatisticsResponse"
-                  }
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -1430,12 +1512,15 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "200": {
+            "description": "Statistics about currently active IOCs",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/ActiveIocStatisticsResponse"
+                  }
                 }
               }
             }
@@ -1449,15 +1534,12 @@
         "summary": "Active IOC history from Prometheus for statistics",
         "operationId": "activeIocHistory",
         "responses": {
-          "200": {
-            "description": "History about active IOCs for statistics",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "type": "array",
-                  "items": {
-                    "$ref": "#/components/schemas/ActiveIOCSForHistoryResponse"
-                  }
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -1472,12 +1554,15 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "200": {
+            "description": "History about active IOCs for statistics",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/ActiveIOCSForHistoryResponse"
+                  }
                 }
               }
             }
@@ -1541,22 +1626,22 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "A paged array of Channel Finder records",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/PagedRecordResponse"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "200": {
+            "description": "A paged array of Channel Finder records",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/PagedRecordResponse"
                 }
               }
             }
@@ -1591,12 +1676,12 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Found record",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/RecordDetails"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -1611,12 +1696,12 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "200": {
+            "description": "Found record",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/RecordDetails"
                 }
               }
             }
@@ -1642,18 +1727,18 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "A deployment with details",
+          "404": {
+            "description": "Deployment not found",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/DeploymentInfoDetails"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -1662,8 +1747,8 @@
               }
             }
           },
-          "404": {
-            "description": "Deployment not found",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -1672,12 +1757,12 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "200": {
+            "description": "A deployment with details",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/DeploymentInfoDetails"
                 }
               }
             }
@@ -1825,12 +1910,12 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "A paged array of deployments",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/PagedOperationResponse"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -1845,12 +1930,12 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "200": {
+            "description": "A paged array of deployments",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/PagedOperationResponse"
                 }
               }
             }
@@ -1876,12 +1961,12 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Operation details",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/OperationDetails"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -1896,18 +1981,18 @@
               }
             }
           },
-          "404": {
-            "description": "Not found",
+          "200": {
+            "description": "Operation details",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/OperationDetails"
                 }
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "404": {
+            "description": "Not found",
             "content": {
               "application/json": {
                 "schema": {
@@ -1937,12 +2022,12 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Job details",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/AwxJobDetails"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -1967,8 +2052,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "503": {
+            "description": "Remote service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -1977,12 +2062,12 @@
               }
             }
           },
-          "503": {
-            "description": "Remote service exception",
+          "200": {
+            "description": "Job details",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/AwxJobDetails"
                 }
               }
             }
@@ -2008,28 +2093,28 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Job log",
+          "404": {
+            "description": "Deployment not found",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/AwxJobLog"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "200": {
+            "description": "Job log",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/AwxJobLog"
                 }
               }
             }
           },
-          "404": {
-            "description": "Deployment not found",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -2038,8 +2123,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -2096,8 +2181,8 @@
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "503": {
+            "description": "Remote service unreachable",
             "content": {
               "application/json": {
                 "schema": {
@@ -2106,8 +2191,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -2116,8 +2201,8 @@
               }
             }
           },
-          "503": {
-            "description": "Remote service unreachable",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -2203,12 +2288,12 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Log lines",
+          "404": {
+            "description": "Ioc not found",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/IocStatusResponse"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -2223,12 +2308,12 @@
               }
             }
           },
-          "404": {
-            "description": "Ioc not found",
+          "200": {
+            "description": "Log lines",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/IocStatusResponse"
                 }
               }
             }
@@ -2264,6 +2349,26 @@
           }
         ],
         "responses": {
+          "404": {
+            "description": "Ioc not found",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/GeneralException"
+                }
+              }
+            }
+          },
+          "500": {
+            "description": "Service exception",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/GeneralException"
+                }
+              }
+            }
+          },
           "200": {
             "description": "Found IOC description",
             "content": {
@@ -2273,7 +2378,28 @@
                 }
               }
             }
-          },
+          }
+        }
+      }
+    },
+    "/api/v1/iocs/{ioc_id}/alerts": {
+      "get": {
+        "tags": ["IOCs"],
+        "summary": "Fetches alerts of the IOC",
+        "operationId": "fetchIocAlerts",
+        "parameters": [
+          {
+            "name": "ioc_id",
+            "in": "path",
+            "description": "Unique ID of the IOC",
+            "required": true,
+            "schema": {
+              "type": "integer",
+              "format": "int64"
+            }
+          }
+        ],
+        "responses": {
           "404": {
             "description": "Ioc not found",
             "content": {
@@ -2284,6 +2410,16 @@
               }
             }
           },
+          "200": {
+            "description": "Alerts of the IOC",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/IocAlertResponse"
+                }
+              }
+            }
+          },
           "500": {
             "description": "Service exception",
             "content": {
@@ -2333,28 +2469,28 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Log lines",
+          "503": {
+            "description": "Logging server unavailable",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/LokiResponse"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "200": {
+            "description": "Log lines",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/LokiResponse"
                 }
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -2363,8 +2499,8 @@
               }
             }
           },
-          "503": {
-            "description": "Logging server unavailable",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -2480,12 +2616,12 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "A paged array of hosts",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/PagedNetBoxHostResponse"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -2500,12 +2636,12 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "200": {
+            "description": "A paged array of hosts",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/PagedNetBoxHostResponse"
                 }
               }
             }
@@ -2550,28 +2686,28 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Log lines",
+          "503": {
+            "description": "Logging server unavailable",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/LokiResponse"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "200": {
+            "description": "Log lines",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/LokiResponse"
                 }
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -2580,8 +2716,8 @@
               }
             }
           },
-          "503": {
-            "description": "Logging server unavailable",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -2615,28 +2751,28 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Host status",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/HostStatusResponse"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
-          },
-          "404": {
-            "description": "Not found",
+          },
+          "200": {
+            "description": "Host status",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/HostStatusResponse"
                 }
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "404": {
+            "description": "Not found",
             "content": {
               "application/json": {
                 "schema": {
@@ -2725,12 +2861,12 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Found Host",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/PagedAssociatedIocs"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -2745,12 +2881,12 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "200": {
+            "description": "Found Host",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/PagedAssociatedIocs"
                 }
               }
             }
@@ -2775,28 +2911,28 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Found Host",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/HostInfoWithId"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "200": {
+            "description": "Found Host",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/HostInfoWithId"
                 }
               }
             }
           },
-          "404": {
-            "description": "Not found",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -2805,8 +2941,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "404": {
+            "description": "Not found",
             "content": {
               "application/json": {
                 "schema": {
@@ -2855,21 +2991,18 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "List of Tags and CommitIds for a specific GitLab repo",
+          "503": {
+            "description": "Git exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "type": "array",
-                  "items": {
-                    "$ref": "#/components/schemas/GitReference"
-                  }
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -2878,8 +3011,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -2888,12 +3021,15 @@
               }
             }
           },
-          "503": {
-            "description": "Git exception",
+          "200": {
+            "description": "List of Tags and CommitIds for a specific GitLab repo",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/GitReference"
+                  }
                 }
               }
             }
@@ -2928,12 +3064,12 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Git reference type",
+          "503": {
+            "description": "Git exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/ReferenceTypeResponse"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -2948,12 +3084,12 @@
               }
             }
           },
-          "503": {
-            "description": "Git exception",
+          "200": {
+            "description": "Git reference type",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/ReferenceTypeResponse"
                 }
               }
             }
@@ -2978,21 +3114,18 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Information about the current user",
+          "503": {
+            "description": "Git exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "type": "array",
-                  "items": {
-                    "$ref": "#/components/schemas/UserInfoResponse"
-                  }
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -3001,18 +3134,21 @@
               }
             }
           },
-          "404": {
-            "description": "Not found",
+          "200": {
+            "description": "Information about the current user",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/UserInfoResponse"
+                  }
                 }
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -3021,8 +3157,8 @@
               }
             }
           },
-          "503": {
-            "description": "Git exception",
+          "404": {
+            "description": "Not found",
             "content": {
               "application/json": {
                 "schema": {
@@ -3056,21 +3192,18 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "List of Gitlab projects of allowed groups",
+          "503": {
+            "description": "Git exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "type": "array",
-                  "items": {
-                    "$ref": "#/components/schemas/GitProject"
-                  }
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -3079,18 +3212,21 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "200": {
+            "description": "List of Gitlab projects of allowed groups",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/GitProject"
+                  }
                 }
               }
             }
           },
-          "503": {
-            "description": "Git exception",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -3125,18 +3261,18 @@
           }
         ],
         "responses": {
-          "200": {
-            "description": "Git project details",
+          "503": {
+            "description": "Git exception",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GitProjectDto"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
           },
-          "404": {
-            "description": "Project not found",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -3145,8 +3281,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "404": {
+            "description": "Project not found",
             "content": {
               "application/json": {
                 "schema": {
@@ -3155,12 +3291,12 @@
               }
             }
           },
-          "503": {
-            "description": "Git exception",
+          "200": {
+            "description": "Git project details",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "$ref": "#/components/schemas/GitProjectDto"
                 }
               }
             }
@@ -3199,8 +3335,8 @@
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -3209,8 +3345,8 @@
               }
             }
           },
-          "404": {
-            "description": "Role not found by authorization service",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -3219,8 +3355,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "503": {
+            "description": "Login server unavailable",
             "content": {
               "application/json": {
                 "schema": {
@@ -3229,8 +3365,8 @@
               }
             }
           },
-          "503": {
-            "description": "Login server unavailable",
+          "404": {
+            "description": "Role not found by authorization service",
             "content": {
               "application/json": {
                 "schema": {
@@ -3267,8 +3403,8 @@
               }
             }
           },
-          "401": {
-            "description": "Unauthorized",
+          "500": {
+            "description": "Service exception",
             "content": {
               "application/json": {
                 "schema": {
@@ -3277,8 +3413,8 @@
               }
             }
           },
-          "403": {
-            "description": "Permission denied",
+          "401": {
+            "description": "Unauthorized",
             "content": {
               "application/json": {
                 "schema": {
@@ -3287,8 +3423,8 @@
               }
             }
           },
-          "500": {
-            "description": "Service exception",
+          "503": {
+            "description": "Login server unavailable",
             "content": {
               "application/json": {
                 "schema": {
@@ -3297,8 +3433,8 @@
               }
             }
           },
-          "503": {
-            "description": "Login server unavailable",
+          "403": {
+            "description": "Permission denied",
             "content": {
               "application/json": {
                 "schema": {
@@ -3322,12 +3458,12 @@
         "description": "Logging out the user",
         "operationId": "logout",
         "responses": {
-          "200": {
-            "description": "Ok",
+          "503": {
+            "description": "Login server unavailable or remote error",
             "content": {
               "application/json": {
                 "schema": {
-                  "type": "object"
+                  "$ref": "#/components/schemas/GeneralException"
                 }
               }
             }
@@ -3342,12 +3478,12 @@
               }
             }
           },
-          "503": {
-            "description": "Login server unavailable or remote error",
+          "200": {
+            "description": "Ok",
             "content": {
               "application/json": {
                 "schema": {
-                  "$ref": "#/components/schemas/GeneralException"
+                  "type": "object"
                 }
               }
             }
@@ -3650,6 +3786,40 @@
           }
         }
       },
+      "AwxJobMeta": {
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": "integer",
+            "format": "int64"
+          },
+          "started": {
+            "type": "string",
+            "format": "date-time"
+          },
+          "finished": {
+            "type": "string",
+            "format": "date-time"
+          },
+          "status": {
+            "type": "string",
+            "enum": [
+              "UNKNOWN",
+              "CREATED",
+              "QUEUED_BY_BACKEND",
+              "new",
+              "pending",
+              "waiting",
+              "running",
+              "failed",
+              "canceled",
+              "error",
+              "successful"
+            ]
+          }
+        },
+        "description": "Job to update"
+      },
       "LoginResponse": {
         "type": "object",
         "properties": {
@@ -3807,9 +3977,6 @@
           "hostName": {
             "type": "string"
           },
-          "hostId": {
-            "type": "string"
-          },
           "pvStatus": {
             "type": "string",
             "enum": ["ACTIVE", "INACTIVE"]
@@ -3844,9 +4011,6 @@
           "hostName": {
             "type": "string"
           },
-          "hostId": {
-            "type": "string"
-          },
           "pvStatus": {
             "type": "string",
             "enum": ["ACTIVE", "INACTIVE"]
@@ -3868,6 +4032,9 @@
             "additionalProperties": {
               "type": "string"
             }
+          },
+          "hostId": {
+            "type": "string"
           }
         }
       },
@@ -4230,6 +4397,22 @@
             "type": "integer",
             "format": "int64"
           },
+          "isActive": {
+            "type": "boolean"
+          }
+        }
+      },
+      "IocDescriptionResponse": {
+        "type": "object",
+        "properties": {
+          "description": {
+            "type": "string"
+          }
+        }
+      },
+      "IocAlertResponse": {
+        "type": "object",
+        "properties": {
           "alertSeverity": {
             "type": "string",
             "enum": ["ERROR", "WARNING", "INFO"]
@@ -4240,16 +4423,9 @@
               "$ref": "#/components/schemas/Alert"
             }
           },
-          "active": {
-            "type": "boolean"
-          }
-        }
-      },
-      "IocDescriptionResponse": {
-        "type": "object",
-        "properties": {
-          "description": {
-            "type": "string"
+          "iocId": {
+            "type": "integer",
+            "format": "int64"
           }
         }
       },
diff --git a/src/mocks/mockAPI.js b/src/mocks/mockAPI.js
index 9ae45ad6..da50eca4 100644
--- a/src/mocks/mockAPI.js
+++ b/src/mocks/mockAPI.js
@@ -230,6 +230,17 @@ function fetchIocStatus(req) {
   return { body, status };
 }
 
+function fetchIocAlerts(req) {
+  const params = getParameters(req, "/iocs/:ioc_id/alerts");
+  const data = require("./fixtures/IOCAlerts.json");
+  const body = data.find((x) => `${x.iocId}` === params.ioc_id);
+
+  console.debug("fetchIocStatus", data, params, body);
+  const status = body ? 200 : 404;
+
+  return { body, status };
+}
+
 function currentlyActiveIocs(req) {
   const body = require("./fixtures/ActiveIocStatisticsResponse.json");
   return { body };
@@ -295,6 +306,7 @@ const mockAPI = {
     createIoc,
     deleteIOC,
     getIocDescription,
+    fetchIocAlerts,
     fetchIocStatus,
     fetchProcServLogLines
   },
@@ -385,6 +397,13 @@ export const apiHandlers = [
     qRegExp(".*/iocs/[0-9]+/status"),
     mockAPI.iocs.fetchIocStatus
   ),
+
+  makeHandler(
+    "GET",
+    qRegExp(".*/iocs/[0-9]+/alerts"),
+    mockAPI.iocs.fetchIocAlerts
+  ),
+
   makeHandler(
     "GET",
     qRegExp(".*/iocs/.*/.*/log"),
diff --git a/src/stories/views/IOC/IocDetailsView.stories.js b/src/stories/views/IOC/IocDetailsView.stories.js
index dd68fde5..6a827107 100644
--- a/src/stories/views/IOC/IocDetailsView.stories.js
+++ b/src/stories/views/IOC/IocDetailsView.stories.js
@@ -35,5 +35,5 @@ Deployed.args = {
 export const DeployedErrors = (args) => <Template {...args} />;
 DeployedErrors.args = {
   ...config,
-  id: 15
+  id: 14
 };
-- 
GitLab