You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2020/07/01 13:46:42 UTC

[GitHub] [knox] risdenk commented on a change in pull request #355: KNOX-2343 - Enhanced API services' display on the Knox Home page

risdenk commented on a change in pull request #355:
URL: https://github.com/apache/knox/pull/355#discussion_r448373452



##########
File path: gateway-service-definitions/src/main/resources/services/webhdfs/2.4.0/service.xml
##########
@@ -21,6 +21,27 @@
         <context>/webhdfs</context>
         <shortDesc>Web HDFS</shortDesc>
         <description>An HTTP REST API which supports the complete FileSystem interface for HDFS.</description>
+        <samples>
+            <sample>
+                <description>List all files under 'testPath'</description>
+                <method>GET</method>
+                <path>v1/testPath?op=LISTSTATUS</path>
+            </sample>
+            <sample>
+                <description>Rename a File/Directory under </description>
+                <method>PUT</method>
+                <path>v1/testPath/testFile?op=RENAME&amp;destination=testPath/renamedFile</path>
+            </sample>
+            <sample>
+                <description>Get Home Directory</description>
+                <method>GET</method>
+                <path>v1/?op=GETHOMEDIRECTORY</path>
+            </sample>
+            <sample>
+                <description>You may check out Apache WebHDFS's REST API documentation here</description>
+                <value>https://hadoop.apache.org/docs/r1.0.4/webhdfs.html</value>

Review comment:
       This link is better:
   
   https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html

##########
File path: gateway-service-definitions/src/main/resources/services/cm-api/1.0.0/service.xml
##########
@@ -26,6 +26,22 @@
         <context>/cm-api</context>
         <shortDesc>Cloudera Manager REST API</shortDesc>
         <description>Cloudera Manager's REST API lets you work with existing tools, and programmatically manage your Hadoop clusters. The API is available in both Cloudera Express and Cloudera Enterprise, and comes with open-source client libraries.</description>
+        <samples>
+            <sample>
+                <description>Fetch all CM-managed clusters</description>
+                <method>GET</method>
+                <path>clusters</path>
+            </sample>
+            <sample>
+                <description>Fetches HDFS service details from cluster named 'c1'</description>
+                <method>GET</method>
+                <path>clusters/c1/services/HDFS</path>
+            </sample>
+            <sample>
+                <description>You can checkout CM's API (v41) document here</description>
+                <value>https://archive.cloudera.com/cm7/7.1.1/generic/jar/cm_api/apidocs/</value>

Review comment:
       I think you should link here instead? https://cloudera.github.io/cm_api/
   
   This link will get out of date quickly?

##########
File path: gateway-service-definitions/src/main/resources/services/zeppelinws/0.8.1/service.xml
##########
@@ -21,6 +21,27 @@
         <context>/zeppelin/ws</context>
         <shortDesc>Zeppelin WS API</shortDesc>
         <description>Apache Zeppelin is a web-based notebook that enables data-driven, interactive data analytics and collaborative documents with SQL, Scala and more.</description>
+        <samples>
+            <sample>
+                <description>Fetch the available notebooks on your server</description>
+                <method>GET</method>
+                <path>api/notebook</path>
+            </sample>
+            <sample>
+                <description>Fetch the status of all paragraphs by the given note id (e.g. 'note1')</description>
+                <method>GET</method>
+                <path>api/notebook/job/note1</path>
+            </sample>
+            <sample>
+                <description>Delete a note by the given note id (e.g. 'note1')</description>
+                <method>DELETE</method>
+                <path>api/notebook/note1</path>
+            </sample>
+            <sample>
+                <description>You may check out Apache Zeppelin WS's REST API documentation here</description>
+                <value>https://zeppelin.apache.org/docs/0.7.0/rest-api/rest-notebook.html</value>

Review comment:
       Should point to 0.8.1?
   
   http://zeppelin.apache.org/docs/0.8.1/usage/rest_api/notebook.html

##########
File path: gateway-service-definitions/src/main/resources/services/hbase/0.98.0/service.xml
##########
@@ -20,6 +20,32 @@
         <context>/hbase</context>
         <shortDesc>Web HBase</shortDesc>
         <description>The HBase REST server exposes endpoints that provide CRUD (create, read, update, delete) operations for each HBase process, as well as tables, regions, and namespaces.</description>
+        <samples>
+            <sample>
+                <description>List all namespaces</description>
+                <method>GET</method>
+                <path>namespaces</path>
+            </sample>
+            <sample>
+                <description>Describe a specific namespace</description>
+                <method>GET</method>
+                <path>namespaces/special_ns</path>
+            </sample>
+            <sample>
+                <description>Create a new namespace</description>
+                <method>POST</method>
+                <path>namespaces/special_ns</path>
+            </sample>
+            <sample>
+                <description>Delete a namespace. The namespace must be empty.</description>
+                <method>DELETE</method>
+                <path>namespaces/special_ns</path>
+            </sample>
+            <sample>
+                <description>You may check out Apache Web HBase's REST API documentation here</description>
+                <value>https://docs.cloudera.com/documentation/enterprise/6/6.3/topics/admin_hbase_rest_api.html</value>

Review comment:
       This link would be better:
   
   https://hbase.apache.org/book.html#_using_rest_endpoints




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org