mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
### What is this PR for?
Apply syntax highlight for sample JSON in REST API documents
### What type of PR is it?
[Documentation]
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-5341
### How should this be tested?
* Checked updated documents locally
### Screenshots (if appropriate)
Before

After

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: cuspymd <cuspymd@gmail.com>
Closes #4101 from cuspymd/improve-rest-doc and squashes the following commits:
def642512 [cuspymd] Apply syntax highlight for sample JSON in REST API documents
14 KiB
14 KiB
| layout | title | description | group |
|---|---|---|---|
| page | Apache Zeppelin Interpreter REST API | This page contains Apache Zeppelin Interpreter REST API information. | usage/rest_api |
{% include JB/setup %}
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
| Description | This ```GET``` method returns all the registered interpreters available on the server. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/interpreter``` |
| Success code | 200 |
| Fail code | 500 |
| Sample JSON response |
|
### List of registered interpreter settings
| Description | This ```GET``` method returns all the interpreters settings registered on the server. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting``` |
| Success code | 200 |
| Fail code | 500 |
| Sample JSON response |
|
### Get a registered interpreter setting by the setting id
| Description | This ```GET``` method returns a registered interpreter setting on the server. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting/[setting ID]``` |
| Success code | 200 |
| Fail code |
400 if such interpreter setting id does not exist 500 for any other errors |
| Sample JSON response |
|
### Create a new interpreter setting
| Description | This ```POST``` method adds a new interpreter setting using a registered interpreter to the server. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting``` |
| Success code | 200 |
| Fail code |
400 if the input json is empty 500 for any other errors |
| Sample JSON input |
|
| Sample JSON response |
|
### Update an interpreter setting
| Description | This ```PUT``` method updates an interpreter setting with new properties. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting/[interpreter ID]``` |
| Success code | 200 |
| Fail code | 500 |
| Sample JSON input |
|
| Sample JSON response |
|
### Delete an interpreter setting
| Description | This ```DELETE``` method deletes an given interpreter setting. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting/[interpreter ID]``` |
| Success code | 200 |
| Fail code | 500 |
| Sample JSON response |
|
### Restart an interpreter
| Description | This ```PUT``` method restarts the given interpreter id. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting/restart/[interpreter ID]``` |
| Success code | 200 |
| Fail code | 500 |
| Sample JSON input (Optional) |
|
| Sample JSON response |
|
### Add a new repository for dependency resolving
| Description | This ```POST``` method adds new repository. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/interpreter/repository``` |
| Success code | 200 |
| Fail code | 500 |
| Sample JSON input |
|
| Sample JSON response |
|
### Delete a repository for dependency resolving
| Description | This ```DELETE``` method delete repository with given id. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/interpreter/repository/[repository ID]``` |
| Success code | 200 |
| Fail code | 500 |
### Get available types for property
| Description | This ```GET``` method returns available types for interpreter property. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/interpreter/property/types``` |
| Success code | 200 |
| Fail code | 500 |
| Sample JSON response |
|
### Get interpreter settings metadata info
| Description | This ```GET``` method returns interpreter settings metadata info. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/interpreter/metadata/[setting ID]``` |
| Success code | 200 |
| Fail code | 500 |