You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by nb...@apache.org on 2020/12/04 05:40:58 UTC

[atlas] branch master updated: ATLAS-3913 Swagger documentation for APIs

This is an automated email from the ASF dual-hosted git repository.

nbonte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/master by this push:
     new 294ca40  ATLAS-3913 Swagger documentation for APIs
294ca40 is described below

commit 294ca40d956615157dc49d1a30af4a5e68006429
Author: Nikhil Bonte <ni...@freestoneinfotech.com>
AuthorDate: Mon Nov 23 17:59:41 2020 +0530

    ATLAS-3913 Swagger documentation for APIs
    
    Signed-off-by: Nikhil Bonte <nb...@apache.org>
---
 3party-licenses/normalize.css-LICENSE              |  21 +++
 3party-licenses/swagger-ui-LECENSE                 | 201 +++++++++++++++++++++
 build-tools/src/main/resources/enunciate.xml       |   7 +-
 build-tools/src/main/resources/ui-dist/index.html  |  55 ++++++
 build-tools/src/main/resources/ui-dist/index.js    |  62 +++++++
 .../main/resources/ui-dist/swagger-ui-bundle.js    |   4 +
 .../ui-dist/swagger-ui-standalone-preset.js        |   4 +
 .../src/main/resources/ui-dist/swagger-ui.css      |   8 +
 dashboardv2/public/js/templates/site/Header.html   |   1 +
 dashboardv2/public/js/utils/UrlLinks.js            |   3 +
 dashboardv2/public/js/views/site/Header.js         |   3 +-
 dashboardv3/public/js/templates/site/Header.html   |   1 +
 dashboardv3/public/js/utils/UrlLinks.js            |   3 +
 dashboardv3/public/js/views/site/Header.js         |   5 +
 pom.xml                                            |   2 +-
 webapp/pom.xml                                     |  14 ++
 16 files changed, 390 insertions(+), 4 deletions(-)

diff --git a/3party-licenses/normalize.css-LICENSE b/3party-licenses/normalize.css-LICENSE
new file mode 100644
index 0000000..9433637
--- /dev/null
+++ b/3party-licenses/normalize.css-LICENSE
@@ -0,0 +1,21 @@
+# The MIT License (MIT)
+
+Copyright © Nicolas Gallagher and Jonathan Neal
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/3party-licenses/swagger-ui-LECENSE b/3party-licenses/swagger-ui-LECENSE
new file mode 100644
index 0000000..d52c77d
--- /dev/null
+++ b/3party-licenses/swagger-ui-LECENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright 2020 SmartBear Software Inc.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
\ No newline at end of file
diff --git a/build-tools/src/main/resources/enunciate.xml b/build-tools/src/main/resources/enunciate.xml
index 8a9383a..89674c7 100755
--- a/build-tools/src/main/resources/enunciate.xml
+++ b/build-tools/src/main/resources/enunciate.xml
@@ -16,7 +16,7 @@
   ~ limitations under the License.
   -->
 
-<enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.11.0.xsd">
+<enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.13.0.xsd">
     <title>Atlas REST API</title>
     <description> Atlas exposes a variety of REST endpoints to work with types, entities, lineage and data discovery.</description>
     <api-classes>
@@ -25,7 +25,10 @@
     </api-classes>
 
     <modules>
-        <swagger host="localhost:21000" basePath="/api/atlas/"/>
+        <swagger
+                base="${project.parent.basedir}/build-tools/src/main/resources/ui-dist"
+                basePath="/api/atlas/"
+        />
         <jackson datatype-detection="aggressive" propertiesAlphabetical="true" honorJaxb="false"/>
         <jaxrs datatype-detection="aggressive"/>
         <jackson1 disabled="true"/>
diff --git a/build-tools/src/main/resources/ui-dist/index.html b/build-tools/src/main/resources/ui-dist/index.html
new file mode 100755
index 0000000..e743572
--- /dev/null
+++ b/build-tools/src/main/resources/ui-dist/index.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<html lang="en">
+  <head>
+    <meta charset="UTF-8">
+    <title>Atlas - Rest API</title>
+    <link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
+    <link rel="icon" href="../img/favicon.ico" type="image/x-icon" >
+    <style>
+      html
+      {
+        box-sizing: border-box;
+        overflow: -moz-scrollbars-vertical;
+        overflow-y: scroll;
+      }
+
+      *,
+      *:before,
+      *:after
+      {
+        box-sizing: inherit;
+      }
+
+      body
+      {
+        margin:0;
+        background: #fafafa;
+      }
+    </style>
+  </head>
+
+  <body>
+    <div id="swagger-ui"></div>
+
+    <script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
+    <script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
+    <script src="./index.js" charset="UTF-8"> </script>
+
+  </body>
+</html>
diff --git a/build-tools/src/main/resources/ui-dist/index.js b/build-tools/src/main/resources/ui-dist/index.js
new file mode 100644
index 0000000..60a8477
--- /dev/null
+++ b/build-tools/src/main/resources/ui-dist/index.js
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var gatewayUrl;
+
+window.onload = function() {
+    const ui = SwaggerUIBundle({
+        url: getSwaggerBaseUrl(window.location.pathname) + "/swagger.json",
+        dom_id: '#swagger-ui',
+        deepLinking: true,
+        presets: [
+            SwaggerUIBundle.presets.apis,
+            SwaggerUIStandalonePreset
+        ],
+        plugins: [
+            SwaggerUIBundle.plugins.DownloadUrl
+        ],
+        layout: "StandaloneLayout",
+        requestInterceptor: function(request) {
+              if (!request.url.includes("swagger.json")) {
+                    request.url = getAPIUrl(request.url);
+              }
+              request.headers['X-XSRF-HEADER'] = "valid";
+              return request;
+        },
+        docExpansion: 'none',
+        validatorUrl: 'none'
+    })
+    window.ui = ui;
+
+    document.getElementById("swagger-ui").getElementsByClassName("topbar-wrapper")[0].getElementsByTagName("img")[0].src = gatewayUrl + "/img/atlas_logo.svg";
+}
+
+function getSwaggerBaseUrl(url) {
+    var path = url.replace(/\/[\w-]+.(jsp|html)|\/+$/ig, '');
+    splitPath = path.split("/");
+    splitPath.pop();
+    gatewayUrl = splitPath.join("/");
+
+    return window.location.origin + path;
+};
+
+function getAPIUrl(url) {
+    url = new URL(url);
+    var path =  url.origin + gatewayUrl + url.pathname + url.search;
+    return path;
+};
diff --git a/build-tools/src/main/resources/ui-dist/swagger-ui-bundle.js b/build-tools/src/main/resources/ui-dist/swagger-ui-bundle.js
new file mode 100755
index 0000000..0c5c4e8
--- /dev/null
+++ b/build-tools/src/main/resources/ui-dist/swagger-ui-bundle.js
@@ -0,0 +1,4 @@
+/*! For license information please see swagger-ui-LICENSE
+https://github.com/swagger-api/swagger-ui/blob/master/LICENSE */
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["esprima"],t):"object"==typeof exports?exports.SwaggerUIBundle=t(function(){try{return require("esprima")}catch(e){}}()):e.SwaggerUIBundle=t(e.esprima)}(this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exp [...]
+//# sourceMappingURL=swagger-ui-bundle.js.map
\ No newline at end of file
diff --git a/build-tools/src/main/resources/ui-dist/swagger-ui-standalone-preset.js b/build-tools/src/main/resources/ui-dist/swagger-ui-standalone-preset.js
new file mode 100755
index 0000000..9980265
--- /dev/null
+++ b/build-tools/src/main/resources/ui-dist/swagger-ui-standalone-preset.js
@@ -0,0 +1,4 @@
+/*! For license information please see swagger-ui-LICENSE
+https://github.com/swagger-api/swagger-ui/blob/master/LICENSE */
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(function(){try{return require("esprima")}catch(t){}}()):"function"==typeof define&&define.amd?define(["esprima"],e):"object"==typeof exports?exports.SwaggerUIStandalonePreset=e(function(){try{return require("esprima")}catch(t){}}()):t.SwaggerUIStandalonePreset=e(t.esprima)}(this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].ca [...]
+//# sourceMappingURL=swagger-ui-standalone-preset.js.map
\ No newline at end of file
diff --git a/build-tools/src/main/resources/ui-dist/swagger-ui.css b/build-tools/src/main/resources/ui-dist/swagger-ui.css
new file mode 100755
index 0000000..360b034
--- /dev/null
+++ b/build-tools/src/main/resources/ui-dist/swagger-ui.css
@@ -0,0 +1,8 @@
+.swagger-ui{
+  /*! For license information please see swagger-ui-LICENSE
+      https://github.com/swagger-api/swagger-ui/blob/master/LICENSE
+
+      normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css | normalize.css-LICENSE
+  */font-family:sans-serif;color:#3b4151}.swagger-ui html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.swagger-ui body{margin:0}.swagger-ui article,.swagger-ui aside,.swagger-ui footer,.swagger-ui header,.swagger-ui nav,.swagger-ui section{display:block}.swagger-ui h1{font-size:2em;margin:.67em 0}.swagger-ui figcaption,.swagger-ui figure,.swagger-ui main{display:block}.swagger-ui figure{margin:1em 40px}.swagger-ui hr{box-sizing:content-box;height:0;overflow:v [...]
+
+/*# sourceMappingURL=swagger-ui.css.map*/
\ No newline at end of file
diff --git a/dashboardv2/public/js/templates/site/Header.html b/dashboardv2/public/js/templates/site/Header.html
index 97e124a..48aa247 100644
--- a/dashboardv2/public/js/templates/site/Header.html
+++ b/dashboardv2/public/js/templates/site/Header.html
@@ -64,6 +64,7 @@
                                     <a tabindex="-1" href="javascript:void(0)">Help</span></a>
                                     <ul class="dropdown-menu">
                                         <li><a target="_blank" href="http://atlas.apache.org/">Documentation</a></li>
+                                        <li><a target="_blank" href="{{apiDocUrl}}">API Documentation</a></li>
                                         <li class="aboutAtlas"><a href="javascript:void(0)">About</a></li>
                                     </ul>
                                 </li>
diff --git a/dashboardv2/public/js/utils/UrlLinks.js b/dashboardv2/public/js/utils/UrlLinks.js
index 6d3c079..7d53abb 100644
--- a/dashboardv2/public/js/utils/UrlLinks.js
+++ b/dashboardv2/public/js/utils/UrlLinks.js
@@ -208,6 +208,9 @@ define(['require', 'utils/Enums', 'utils/Utils', 'underscore'], function(require
         businessMetadataImportUrl: function() {
             return this.entitiesApiUrl() + '/businessmetadata/import';
         },
+        apiDocUrl: function() {
+            return this.apiBaseUrl + '/apidocs/index.html';
+        },
         categoryApiUrl: function(options) {
             var guid = options && options.guid,
                 list = options && options.list,
diff --git a/dashboardv2/public/js/views/site/Header.js b/dashboardv2/public/js/views/site/Header.js
index 2d6b55d..a40f547 100644
--- a/dashboardv2/public/js/views/site/Header.js
+++ b/dashboardv2/public/js/views/site/Header.js
@@ -32,7 +32,8 @@ define(['require',
         templateHelpers: function() {
             return {
                 glossaryImportTempUrl: UrlLinks.glossaryImportTempUrl(),
-                businessMetadataImportTempUrl: UrlLinks.businessMetadataImportTempUrl()
+                businessMetadataImportTempUrl: UrlLinks.businessMetadataImportTempUrl(),
+                apiDocUrl: UrlLinks.apiDocUrl(),
             };
         },
         ui: {
diff --git a/dashboardv3/public/js/templates/site/Header.html b/dashboardv3/public/js/templates/site/Header.html
index 6d5e6ef..f752f3c 100644
--- a/dashboardv3/public/js/templates/site/Header.html
+++ b/dashboardv3/public/js/templates/site/Header.html
@@ -47,6 +47,7 @@
                                         <a tabindex="-1" href="javascript:void(0)">Help</span></a>
                                         <ul class="dropdown-menu">
                                             <li><a target="_blank" href="http://atlas.apache.org/">Documentation</a></li>
+                                            <li><a target="_blank" href="{{apiDocUrl}}">API Documentation</a></li>
                                             <li class="aboutAtlas"><a href="javascript:void(0)">About</a></li>
                                         </ul>
                                     </li>
diff --git a/dashboardv3/public/js/utils/UrlLinks.js b/dashboardv3/public/js/utils/UrlLinks.js
index 69e5274..661dfb6 100644
--- a/dashboardv3/public/js/utils/UrlLinks.js
+++ b/dashboardv3/public/js/utils/UrlLinks.js
@@ -197,6 +197,9 @@ define(['require', 'utils/Enums', 'utils/Utils', 'underscore'], function(require
         businessMetadataImportUrl: function() {
             return this.entitiesApiUrl() + '/businessmetadata/import';
         },
+        apiDocUrl: function() {
+            return this.apiBaseUrl + '/apidocs/index.html';
+        },
         categoryApiUrl: function(options) {
             var guid = options && options.guid,
                 list = options && options.list,
diff --git a/dashboardv3/public/js/views/site/Header.js b/dashboardv3/public/js/views/site/Header.js
index cce00c7..ccb813d 100644
--- a/dashboardv3/public/js/views/site/Header.js
+++ b/dashboardv3/public/js/views/site/Header.js
@@ -31,6 +31,11 @@ define(['require',
             RGlobalSearchLayoutView: "#r_globalSearchLayoutView",
             RFilterBrowserLayoutView: "#r_filterBrowserLayoutView"
         },
+        templateHelpers: function() {
+            return {
+                apiDocUrl: UrlLinks.apiDocUrl(),
+            };
+        },
         ui: {
             backButton: "[data-id='backButton']",
             menuHamburger: "[data-id='menuHamburger']",
diff --git a/pom.xml b/pom.xml
index ba9450c..2bf5631 100644
--- a/pom.xml
+++ b/pom.xml
@@ -677,7 +677,7 @@
         <dropwizard-metrics>3.2.2</dropwizard-metrics>
         <elasticsearch.version>6.6.0</elasticsearch.version>
         <entity.repository.impl>org.apache.atlas.repository.audit.InMemoryEntityAuditRepository</entity.repository.impl>
-        <enunciate-maven-plugin.version>2.11.1</enunciate-maven-plugin.version>
+        <enunciate-maven-plugin.version>2.13.2</enunciate-maven-plugin.version>
         <failsafe.version>2.18.1</failsafe.version>
         <falcon.version>0.8</falcon.version>
         <fastutil.version>6.5.16</fastutil.version>
diff --git a/webapp/pom.xml b/webapp/pom.xml
index fe5dc0b..0582cbd 100755
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -547,6 +547,14 @@
                             <!-- empty groupId/artifactId represents the current build -->
                         </overlay>
                     </overlays>
+
+                    <webResources>
+                        <resource>
+                            <directory>${project.build.directory}/api/v2/apidocs/ui</directory>
+                            <targetPath>apidocs</targetPath>
+                        </resource>
+                    </webResources>
+
                     <archive>
                         <manifest>
                             <addClasspath>true</addClasspath>
@@ -810,6 +818,12 @@
                 <groupId>com.webcohesion.enunciate</groupId>
                 <artifactId>enunciate-maven-plugin</artifactId>
                 <version>${enunciate-maven-plugin.version}</version>
+                <!-- to allow target/api/v2/apidocs/ui to be created before building maven-war-plugin)-->
+                <executions>
+                    <execution>
+                        <phase>generate-resources</phase>
+                    </execution>
+                </executions>
                 <configuration>
                     <configFile>${project.parent.basedir}/build-tools/src/main/resources/enunciate.xml</configFile>
                     <enunciateArtifactId/>