mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
### What is this PR for? Added a docs page for notebookRepo REST API based on [NotebookRepoRestApi.java](https://github.com/apache/zeppelin/blob/master/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRepoRestApi.java). And this PR will cover "notebook repository reload endpoint" : #2043 as well. ### What type of PR is it? Documentation ### What is the Jira issue? [ZEPPELIN-2140](https://issues.apache.org/jira/browse/ZEPPELIN-2140) ### How should this be tested? Just checking screenshots will be faster! ### Screenshots (if appropriate) - In navbar <img width="300" alt="screen shot 2017-02-25 at 11 02 02 pm" src="https://cloud.githubusercontent.com/assets/10060731/23331707/76551c8a-fbae-11e6-99b8-cc686e208c39.png"> - API description list <img width="751" alt="screen shot 2017-02-25 at 10 54 21 pm" src="https://cloud.githubusercontent.com/assets/10060731/23331704/57dd7d4c-fbae-11e6-8cc2-189fc9e68ece.png"> <img width="715" alt="screen shot 2017-02-25 at 10 54 29 pm" src="https://cloud.githubusercontent.com/assets/10060731/23331708/85f722a0-fbae-11e6-9b40-7f4c98761dd6.png"> <img width="730" alt="screen shot 2017-02-25 at 10 54 38 pm" src="https://cloud.githubusercontent.com/assets/10060731/23331709/8882b93a-fbae-11e6-9fe2-95bc2620e2c9.png"> ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: AhyoungRyu <fbdkdud93@hanmail.net> Closes #2067 from AhyoungRyu/ZEPPELIN-2140 and squashes the following commits:c73e9b2[AhyoungRyu] Fix typo :D7d41435[AhyoungRyu] Add underscore escaper8eac3dd[AhyoungRyu] Add a docs page for notebookRepoRestApi
9.2 KiB
9.2 KiB
| layout | title | description | group |
|---|---|---|---|
| page | Apache Zeppelin Helium REST API | This page contains Apache Zeppelin Helium REST API information. | rest-api |
{% include JB/setup %}
Apache Zeppelin Helium 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.
Helium REST API List
List of all available helium packages
| Description | This ```GET``` method returns all the available helium packages in configured registries. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/helium/all``` |
| Success code | 200 |
| Fail code | 500 |
| Sample JSON response |
{
"status": "OK",
"message": "",
"body": {
"zeppelin.clock": [
{
"registry": "local",
"pkg": {
"type": "APPLICATION",
"name": "zeppelin.clock",
"description": "Clock (example)",
"artifact": "zeppelin-examples\/zeppelin-example-clock\/target\/zeppelin-example-clock-0.7.0-SNAPSHOT.jar",
"className": "org.apache.zeppelin.example.app.clock.Clock",
"resources": [
[
":java.util.Date"
]
],
"icon": "icon"
},
"enabled": false
}
],
"zeppelin-bubblechart": [
{
"registry": "local",
"pkg": {
"type": "VISUALIZATION",
"name": "zeppelin-bubblechart",
"description": "Animated bubble chart",
"artifact": ".\/..\/helium\/zeppelin-bubble",
"icon": "icon"
},
"enabled": true
},
{
"registry": "local",
"pkg": {
"type": "VISUALIZATION",
"name": "zeppelin-bubblechart",
"description": "Animated bubble chart",
"artifact": "zeppelin-bubblechart@0.0.2",
"icon": "icon"
},
"enabled": false
}
],
"zeppelin\_horizontalbar": [
{
"registry": "local",
"pkg": {
"type": "VISUALIZATION",
"name": "zeppelin_horizontalbar",
"description": "Horizontal Bar chart (example)",
"artifact": ".\/zeppelin-examples\/zeppelin-example-horizontalbar",
"icon": "icon"
},
"enabled": true
}
]
}
}
|
### Suggest Helium application
| Description | This ```GET``` method returns suggested helium application for the paragraph. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/helium/suggest/[Note ID]/[Paragraph ID]``` |
| Success code | 200 |
| Fail code |
404 on note or paragraph not exists 500 |
| Sample JSON response |
{
"status": "OK",
"message": "",
"body": {
"available": [
{
"registry": "local",
"pkg": {
"type": "APPLICATION",
"name": "zeppelin.clock",
"description": "Clock (example)",
"artifact": "zeppelin-examples\/zeppelin-example-clock\/target\/zeppelin-example-clock-0.7.0-SNAPSHOT.jar",
"className": "org.apache.zeppelin.example.app.clock.Clock",
"resources": [
[
":java.util.Date"
]
],
"icon": "icon"
},
"enabled": true
}
]
}
}
|
### Load helium Application on a paragraph
| Description | This ```GET``` method returns a helium Application id on success. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/helium/load/[Note ID]/[Paragraph ID]``` |
| Success code | 200 |
| Fail code |
404 on note or paragraph not exists 500 for any other errors |
| Sample JSON response |
{
"status": "OK",
"message": "",
"body": "app_2C5FYRZ1E-20170108-040449_2068241472zeppelin_clock"
}
|
### Load bundled visualization script
| Description | This ```GET``` method returns bundled helium visualization javascript. When refresh=true (optional) is provided, Zeppelin rebuild bundle. otherwise, provided from cache |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/helium/visualizations/load[?refresh=true]``` |
| Success code | 200 reponse body is executable javascript |
| Fail code |
200 reponse body is error message string starts with ERROR: |
### Enable package
| Description | This ```POST``` method enables a helium package. Needs artifact name in input payload |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/helium/enable/[Package Name]``` |
| Success code | 200 |
| Fail code | 500 |
| Sample input |
zeppelin-examples/zeppelin-example-clock/target/zeppelin-example-clock-0.7.0-SNAPSHOT.jar
|
| Sample JSON response |
{"status":"OK"}
|
### Disable package
| Description | This ```POST``` method disables a helium package. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/helium/disable/[Package Name]``` |
| Success code | 200 |
| Fail code | 500 |
| Sample JSON response |
{"status":"OK"}
|
Get visualization display order
| Description | This ```GET``` method returns display order of enabled visualization packages. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/helium/visualizationOrder``` |
| Success code | 200 |
| Fail code | 500 |
| Sample JSON response |
{"status":"OK","body":["zeppelin_horizontalbar","zeppelin-bubblechart"]}
|
Set visualization display order
| Description | This ```POST``` method sets visualization packages display order. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/helium/visualizationOrder``` |
| Success code | 200 |
| Fail code | 500 |
| Sample JSON input |
["zeppelin-bubblechart", "zeppelin_horizontalbar"]
|
| Sample JSON response |
{"status":"OK"}
|