diff --git a/services/activity-spec/swagger-ui/index.html b/services/activity-spec/swagger-ui/index.html
new file mode 100644
index 0000000..77a3656
--- /dev/null
+++ b/services/activity-spec/swagger-ui/index.html
@@ -0,0 +1,328 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="UTF-8">
+  <title>API Docs</title>
+  <link rel="SHORTCUT ICON" href="images/favicon.ico"/>
+  <link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
+  <link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
+  <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
+  <link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
+  <link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
+  <!--Custom: Take from application\frontend\nfv-client\dist\optimize\resources\nfv\css\style.css-->
+  <link href='css/ncso-style.css' rel='stylesheet' type='text/css'/>
+  <!--/Custom: Take from application\frontend\nfv-client\dist\optimize\resources\nfv\css\style.css-->
+
+  <script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
+  <script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
+  <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
+  <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
+  <script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
+  <script src='lib/underscore-min.js' type='text/javascript'></script>
+  <script src='lib/backbone-min.js' type='text/javascript'></script>
+  <script src='swagger-ui.js' type='text/javascript'></script>
+  <script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
+  <script src='lib/marked.js' type='text/javascript'></script>
+  <script src='lib/swagger-oauth.js' type='text/javascript'></script>
+
+  <!-- Some basic translations -->
+  <!-- <script src='lang/translator.js' type='text/javascript'></script> -->
+  <!-- <script src='lang/ru.js' type='text/javascript'></script> -->
+  <!-- <script src='lang/en.js' type='text/javascript'></script> -->
+
+  <script type="text/javascript">
+    $(function () {
+      var url = window.location.protocol + "//" + window.location.host;
+      if (window.location.pathname.indexOf('/api-docs') > 0) {
+        url += window.location.pathname.substring(0, window.location.pathname.indexOf('/api-docs'))
+      }
+      url += "/activity-spec-api-docs/api.json";
+      log('API URL: ' + url);
+
+      // Pre load translate...
+      if(window.SwaggerTranslator) {
+        window.SwaggerTranslator.translate();
+      }
+      window.swaggerUi = new SwaggerUi({
+        url: url,
+        dom_id: "swagger-ui-container",
+        supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
+        onComplete: function(swaggerApi, swaggerUi){
+          if(typeof initOAuth == "function") {
+            initOAuth({
+              clientId: "your-client-id",
+              clientSecret: "your-client-secret",
+              realm: "your-realms",
+              appName: "your-app-name", 
+              scopeSeparator: ","
+            });
+          }
+
+          if(window.SwaggerTranslator) {
+            window.SwaggerTranslator.translate();
+          }
+
+          $('pre code').each(function(i, e) {
+            hljs.highlightBlock(e)
+          });
+
+        },
+        onFailure: function(data) {
+          log("Unable to Load SwaggerUI");
+        },
+        docExpansion: "none",
+        apisSorter: "alpha",
+        showRequestHeaders: false
+      });
+
+
+      window.swaggerUi.load();
+
+      function log() {
+        if ('console' in window) {
+          console.log.apply(console, arguments);
+        }
+      }
+  });
+  </script>
+
+    <!-- Hide the swagger io  -->
+    <style>
+        .footer a, .footer img{
+            display: none !important;
+        }
+    </style>
+</head>
+
+<body class="swagger-section">
+
+<!--NCSO script-->
+<script>
+
+  //SET TITLE - START
+  function pollData() {
+    if(!(document.querySelector('#api_info .info_title') && document.querySelector('#api_info .info_title').innerText)) {
+      setTimeout(pollData, 50);
+    }
+    else {
+      setData();
+    }
+  }
+
+  function setData() {
+    document.querySelector('[data-uxf-point="main-title"]').innerText = document.querySelector('#api_info .info_title').innerText;
+    document.querySelector('#api_info .info_title').innerText = '';
+  }
+
+  pollData();
+  //SET TITLE - END
+
+  var __LOGIN_REST_STATUS = {OPEN: 'OPEN', SEND: 'SEND'};
+  var __loginPath = '/auth/tokens', __isLoginInProcess, __xAuthToken;
+
+  function isAuthanticationRest(path) {
+      return path.endsWith(__loginPath);
+  }
+
+  //Proxy requests - START
+
+  //Proxy Open Method
+  (function() {
+      var proxiedOpen = window.XMLHttpRequest.prototype.open;
+      window.XMLHttpRequest.prototype.open = function(method, path) {
+          if(isAuthanticationRest(path)) {
+              __isLoginInProcess = true;
+          }
+          else {
+              __isLoginInProcess = false;
+          }
+          return proxiedOpen.apply(this, Array.prototype.slice.call(arguments));
+      };
+  })();
+
+  //Proxy Send Method - X-AUTH-STUFF
+  (function() {
+      var proxiedSend = window.XMLHttpRequest.prototype.send;
+      window.XMLHttpRequest.prototype.send = function() {
+          if(__isLoginInProcess) {
+              proxyAuthanticationCallback(this);
+          }
+          return proxiedSend.apply(this, Array.prototype.slice.call(arguments));
+      };
+  })();
+
+  //Proxy Authantication Callback Method - X-AUTH-STUFF
+  function proxyAuthanticationCallback(xhrObject) {
+      var proxy = xhrObject.onreadystatechange;
+      xhrObject.onreadystatechange = function() {
+          if (xhrObject.readyState == 4) {
+              if(xhrObject.status == 200 || xhrObject.status == 401) {
+                  window.swaggerUi.api.clientAuthorizations.remove('X-AUTH-TOKEN');
+                  if(xhrObject.status == 200) {
+                      var key = xhrObject.getResponseHeader('x-auth-token');
+                      if(key && key.trim() != "") {
+                          var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization("X-AUTH-TOKEN", key, "header");
+                          window.swaggerUi.api.clientAuthorizations.add("X-AUTH-TOKEN", apiKeyAuth);
+                          console.log("added x-auth-key ", key);
+                      }
+                  }
+              }
+          }
+          return proxy.apply(xhrObject, Array.prototype.slice.call(arguments));
+      }
+  }
+
+  //Proxy Send Method - CUSTOM HEADERS STUFF
+  (function () {
+      var proxiedSend = window.XMLHttpRequest.prototype.send;
+      window.XMLHttpRequest.prototype.send = function () {
+          var headerItems = document.querySelectorAll('.custom-headers .headers-list .header-item');
+          if (headerItems) {
+              Array.prototype.forEach.call(headerItems, function (header) {
+                  var headerName = header.querySelector('.header-name').value;
+                  var headerValue = header.querySelector('.header-value').value;
+                  if (headerName && headerValue) {
+                      this.setRequestHeader(headerName, headerValue);
+                  }
+              }, this);
+          }
+          return proxiedSend.apply(this, Array.prototype.slice.call(arguments));
+      };
+  })();
+
+  //Proxy requests - END
+
+</script>
+
+<div data-uxf-point="nfv-header" class="nfv-header">
+  <div class="header-content-wrapper">
+    <div data-uxf-point="nfv-logo" class="nfv-logo"><a href="../ncso/landingpage.html">VENDOR</a></div>
+    <div data-uxf-point="header-title" class="header-title">
+      <div data-uxf-point="main-title" class="main-title"></div>
+      <div data-uxf-point="version-controller" class="version-select"></div>
+      <div data-uxf-point="sub-title" class="sub-title"></div>
+    </div>
+  </div>
+</div>
+
+<div class="custom-headers">
+    <style>
+        .custom-headers {
+            margin-left: 124px;
+            width: 500px;
+            border: 1px solid #419EF1;
+        }
+
+        .custom-headers .headers-title {
+            background-color: #0F6AB4;
+            height: 24px;
+            color: white;
+            text-align: center;
+            font-size: 1.2em;
+        }
+
+        .custom-headers .headers-list .header-item {
+            display: flex;
+            justify-content: space-around;
+            padding: 10px 5px 0 5px;
+        }
+
+        .custom-headers .headers-list .header-item.default-item .header-col.header-delete {
+            visibility: hidden;
+        }
+
+        .custom-headers .headers-list .header-item.default-item .header-col.header-name {
+            pointer-events: none;
+        }
+
+        .custom-headers .headers-list .header-item .header-col.header-delete {
+            cursor: pointer;
+            align-self: center;
+        }
+
+        .custom-headers .add-header {
+            text-align: right;
+            padding: 5px;
+            border-top: 1px solid #0F6AB4;
+            margin-top: 10px;
+            background-color: #E7F6EC;
+        }
+
+        .custom-headers .add-header .add-header-button, .custom-headers .add-header .reset-header-button {
+
+            text-decoration: none;
+            color: white;
+            display: inline-block;
+            width: 50px;
+            font-size: 0.9em;
+            text-align: center;
+            padding: 7px 0 4px;
+            -moz-border-radius: 2px;
+            -webkit-border-radius: 2px;
+            -o-border-radius: 2px;
+            -ms-border-radius: 2px;
+            -khtml-border-radius: 2px;
+            border-radius: 2px;
+            background-color: #0f6ab4;
+            cursor: pointer;
+        }
+
+        .custom-headers .add-header .reset-header-button {
+
+        }
+    </style>
+    <div class="headers-title">Custom Headers</div>
+    <div class="headers-list">
+        <!--Dynamically add headers using addHeaderItem function-->
+    </div>
+    <div class="add-header">
+        <span class="reset-header-button" onclick="resetHeaderItems();">Reset</span>
+        <span class="add-header-button" onclick="addHeaderItem();">Add</span>
+    </div>
+    <script>
+        function addHeaderItem(defaultName, defaultValue) {
+
+            var headerItemName = document.createElement('input');
+            headerItemName.type = 'text';
+            headerItemName.value = defaultName || '';
+            headerItemName.classList.add('header-col', 'header-name');
+
+            var headerItemValue = document.createElement('input');
+            headerItemValue.type = 'text';
+            headerItemValue.value = defaultValue || '';
+            headerItemValue.classList.add('header-col', 'header-value');
+
+            var headerItemDelete = document.createElement('div');
+            headerItemDelete.innerHTML = '&#10006;';
+            headerItemDelete.classList.add('header-col', 'header-delete');
+
+            var headerItem = document.createElement('div');
+            headerItem.classList.add('header-item');
+            headerItem.appendChild(headerItemName);
+            headerItem.appendChild(headerItemValue);
+            headerItem.appendChild(headerItemDelete);
+
+            headerItemDelete.onclick = function () {
+                headersList.removeChild(headerItem);
+            };
+
+            var headersList = document.querySelector('.custom-headers .headers-list');
+            headersList.appendChild(headerItem);
+
+            return headerItem;
+        }
+        function resetHeaderItems() {
+            var headersList = document.querySelector('.custom-headers .headers-list');
+            while (headersList.firstChild) {
+                headersList.removeChild(headersList.firstChild);
+            }
+            var defaultHeaderItem = addHeaderItem('USER_ID');
+            defaultHeaderItem.classList.add('default-item');
+        }
+        resetHeaderItems();
+    </script>
+</div>
+<div id="message-bar" class="swagger-ui-wrap" data-sw-translate>&nbsp;</div>
+<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
+</body>
+</html>
