Added: zeppelin/site/docs/0.8.2/usage/rest_api/interpreter.html URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.8.2/usage/rest_api/interpreter.html?rev=1867691&view=auto ============================================================================== --- zeppelin/site/docs/0.8.2/usage/rest_api/interpreter.html (added) +++ zeppelin/site/docs/0.8.2/usage/rest_api/interpreter.html Sun Sep 29 07:08:10 2019 @@ -0,0 +1,908 @@ + + + + + + Apache Zeppelin 0.8.0 Documentation: Apache Zeppelin Interpreter REST API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + +

Apache Zeppelin Interpreter REST API

+ +
+ +

Overview

+ +

Apache Zeppelin provides several REST APIs for interaction and remote activation of zeppelin functionality. +All REST APIs are available starting with the following endpoint http://[zeppelin-server]:[zeppelin-port]/api. +Note that Apache Zeppelin REST APIs receive or return JSON objects, it is recommended for you to install some JSON viewers such as JSONView.

+ +

If you work with Apache Zeppelin and find a need for an additional REST API, please file an issue or send us an email.

+ +

Interpreter REST API List

+ +

The role of registered interpreters, settings and interpreters group are described in here.

+ +

List of registered interpreters

+ +

+ + + + + + + + + + + + + + + + + + + + + +
DescriptionThis GET method returns all the registered interpreters available on the server.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter
Success code200
Fail code 500
Sample JSON response +
+{
+  "status": "OK",
+  "message": "",
+  "body": {
+    "md.md": {
+      "name": "md",
+      "group": "md",
+      "className": "org.apache.zeppelin.markdown.Markdown",
+      "properties": {},
+      "path": "/zeppelin/interpreter/md"
+    },
+    "spark.spark": {
+      "name": "spark",
+      "group": "spark",
+      "className": "org.apache.zeppelin.spark.SparkInterpreter",
+      "properties": {
+        "spark.executor.memory": {
+          "name": "spark.executor.memory",
+          "defaultValue": "1g",
+          "description": "Executor memory per worker instance. ex) 512m, 32g",
+          "type": "string"
+        },
+        "spark.cores.max": {
+          "defaultValue": "",
+          "description": "Total number of cores to use. Empty value uses all available core.",
+          "type": "number"
+        },
+      },
+      "path": "/zeppelin/interpreter/spark"
+    },
+    "spark.sql": {
+      "name": "sql",
+      "group": "spark",
+      "className": "org.apache.zeppelin.spark.SparkSqlInterpreter",
+      "properties": {
+        "zeppelin.spark.maxResult": {
+          "name": "zeppelin.spark.maxResult",
+          "defaultValue": "1000",
+          "description": "Max number of Spark SQL result to display.",
+          "type": "number"
+        }
+      },
+      "path": "/zeppelin/interpreter/spark"
+    }
+  }
+}
+        
+

+ +


+ +

List of registered interpreter settings

+ +

+ + + + + + + + + + + + + + + + + + + + + +
DescriptionThis GET method returns all the interpreters settings registered on the server.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting
Success code200
Fail code 500
Sample JSON response +
+{
+  "status": "OK",
+  "message": "",
+  "body": [
+    {
+      "id": "2AYUGP2D5",
+      "name": "md",
+      "group": "md",
+      "properties": {
+        "empty": ""
+      },
+      "interpreterGroup": [
+        {
+          "class": "org.apache.zeppelin.markdown.Markdown",
+          "name": "md"
+        }
+      ],
+      "dependencies": []
+    },
+ { + "id": "2AY6GV7Q3", + "name": "spark", + "group": "spark", + "properties": { + "spark.cores.max": { + "name": "", + "value": "spark.cores.max", + "type": "number" + }, + "spark.executor.memory": { + "name": "spark.executor.memory", + "value": "1g", + "type": "string" + } + }, + "interpreterGroup": [ + { + "class": "org.apache.zeppelin.spark.SparkInterpreter", + "name": "spark" + }, + { + "class": "org.apache.zeppelin.spark.SparkSqlInterpreter", + "name": "sql" + } + ], + "dependencies": [ + { + "groupArtifactVersion": "com.databricks:spark-csv_2.10:1.3.0" + } + ] + } + ] +} +
+

+ +


+ +

Get a registered interpreter setting by the setting id

+ +

+ + + + + + + + + + + + + + + + + + + + + +
DescriptionThis GET method returns a registered interpreter setting on the server.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting/[setting ID]
Success code200
Fail code + 400 if such interpreter setting id does not exist
+ 500 for any other errors +
Sample JSON response +
+{
+  "status": "OK",
+  "message": "",
+  "body": {
+    "id": "2AYW25ANY",
+    "name": "Markdown setting name",
+    "group": "md",
+    "properties": {
+      "propname": {
+        "name": "propname",
+        "value": "propvalue",
+        "type": "textarea"
+      }
+    },
+    "interpreterGroup": [
+      {
+        "class": "org.apache.zeppelin.markdown.Markdown",
+        "name": "md"
+      }
+    ],
+    "dependencies": [
+      {
+        "groupArtifactVersion": "groupId:artifactId:version",
+        "exclusions": [
+          "groupId:artifactId"
+        ]
+      }
+    ]
+  }
+}
+        
+

+ +


+ +

Create a new interpreter setting

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
DescriptionThis POST method adds a new interpreter setting using a registered interpreter to the server.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting
Success code200
Fail code + 400 if the input json is empty
+ 500 for any other errors +
Sample JSON input +
+{
+  "name": "Markdown setting name",
+  "group": "md",
+  "properties": {
+    "propname": {
+      "name": "propname",
+      "value": "propvalue",
+      "type": "textarea"
+  },
+  "interpreterGroup": [
+    {
+      "class": "org.apache.zeppelin.markdown.Markdown",
+      "name": "md"
+    }
+  ],
+  "dependencies": [
+    {
+      "groupArtifactVersion": "groupId:artifactId:version",
+      "exclusions": [
+        "groupId:artifactId"
+      ]
+    }
+  ]
+}
+        
+
Sample JSON response +
+{
+  "status": "OK",
+  "message": "",
+  "body": {
+    "id": "2AYW25ANY",
+    "name": "Markdown setting name",
+    "group": "md",
+    "properties": {
+      "propname": {
+        "name": "propname",
+        "value": "propvalue",
+        "type": "textarea"
+    },
+    "interpreterGroup": [
+      {
+        "class": "org.apache.zeppelin.markdown.Markdown",
+        "name": "md"
+      }
+    ],
+    "dependencies": [
+      {
+        "groupArtifactVersion": "groupId:artifactId:version",
+        "exclusions": [
+          "groupId:artifactId"
+        ]
+      }
+    ]
+  }
+}
+        
+

+ +


+ +

Update an interpreter setting

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
DescriptionThis PUT method updates an interpreter setting with new properties.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting/[interpreter ID]
Success code200
Fail code 500
Sample JSON input +
+{
+  "name": "Markdown setting name",
+  "group": "md",
+  "properties": {
+    "propname": {
+      "name": "propname",
+      "value": "Otherpropvalue",
+      "type": "textarea"
+  },
+  "interpreterGroup": [
+    {
+      "class": "org.apache.zeppelin.markdown.Markdown",
+      "name": "md"
+    }
+  ],
+  "dependencies": [
+    {
+      "groupArtifactVersion": "groupId:artifactId:version",
+      "exclusions": [
+        "groupId:artifactId"
+      ]
+    }
+  ]
+}
+        
+
Sample JSON response +
+{
+  "status": "OK",
+  "message": "",
+  "body": {
+    "id": "2AYW25ANY",
+    "name": "Markdown setting name",
+    "group": "md",
+    "properties": {
+      "propname": {
+        "name": "propname",
+        "value": "Otherpropvalue",
+        "type": "textarea"
+    },
+    "interpreterGroup": [
+      {
+        "class": "org.apache.zeppelin.markdown.Markdown",
+        "name": "md"
+      }
+    ],
+    "dependencies": [
+      {
+        "groupArtifactVersion": "groupId:artifactId:version",
+        "exclusions": [
+          "groupId:artifactId"
+        ]
+      }
+    ]
+  }
+}
+        
+

+ +


+ +

Delete an interpreter setting

+ +

+ + + + + + + + + + + + + + + + + + + + + +
DescriptionThis DELETE method deletes an given interpreter setting.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting/[interpreter ID]
Success code200
Fail code 500
Sample JSON response + {"status":"OK"} +

+ +


+ +

Restart an interpreter

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
DescriptionThis PUT method restarts the given interpreter id.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting/restart/[interpreter ID]
Success code200
Fail code 500
Sample JSON input (Optional) +
+{
+  "noteId": "2AVQJVC8N"
+}
+        
+
Sample JSON response + {"status":"OK"} +

+ +


+ +

Add a new repository for dependency resolving

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
DescriptionThis POST method adds new repository.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/repository
Success code200
Fail code 500
Sample JSON input +
+{
+  "id": "securecentral",
+  "url": "https://repo1.maven.org/maven2",
+  "snapshot": false
+}
+        
+
Sample JSON response + {"status":"OK"} +

+ +


+ +

Delete a repository for dependency resolving

+ +

+ + + + + + + + + + + + + + + + + +
DescriptionThis DELETE method delete repository with given id.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/repository/[repository ID]
Success code200
Fail code 500

+ +


+ +

Get available types for property

+ +

+ + + + + + + + + + + + + + + + + + + + +
+
DescriptionThis GET method returns available types for interpreter property.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/property/types
Success code200
Fail code 500
Sample JSON response +
+{
+  "status": "OK",
+  "body": [ "textarea", "string", ...
+  ]
+}
+
+

+ +


+ +

Get interpreter settings metadata info

+ +

+ + + + + + + + + + + + + + + + + +
DescriptionThis GET method returns interpreter settings metadata info.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/metadata/[setting ID]
Success code200
Fail code 500

+ +
+
+ + +
+ +
+ + + + + + + + + + + Propchange: zeppelin/site/docs/0.8.2/usage/rest_api/interpreter.html ------------------------------------------------------------------------------ svn:executable = *