mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
### What is this PR for? This PR fixes multiple typos found in markdown documentation files. | File | Incorrect Words | Correction(s) | |------------------------------------------------------------|----------------------------------------|----------------------------------| | `STYLE.md` | overridden | override | | `docs/usage/rest_api/notebook.md` | gernerates | generates | | `docs/usage/rest_api/helium.md` | reponse | response | | `docs/usage/other_features/cron_scheduler.md` | are binded | are bound | | `docs/usage/display_system/basic.md` | wich | which | | `docs/setup/deployment/virtual_machine.md` | fowarding | forwarding | | `docs/quickstart/kubernetes.md` | persiste, overrided | persist, overridden | | `docs/quickstart/install.md` | volumn | volume | | `docs/quickstart/explore_ui.md` | shorcuts, authentification | shortcuts, authentication | | `docs/interpreter/python.md` | enviornment | environment | | `docs/interpreter/neo4j.md` | dafault | default | | `docs/interpreter/mahout.md` | follwoing, coppied | following, copied | | `docs/interpreter/livy.md` | sugguest, avalible, formst | suggest, available, format | | `docs/interpreter/groovy.md` | usefull | useful | | `docs/development/helium/writing_application.md` | Resouce, possiblities | Resource, possibilities | | `docs/development/contribution/how_to_contribute_code.md` | repro | repo | | `docs/assets/themes/zeppelin/js/search.js` | — | (deleted) | ### What type of PR is it? Documentation ### Todos * [x] - Fix all identified typos listed in the linked issue. ### What is the Jira issue? * Jira - https://issues.apache.org/jira/browse/ZEPPELIN-6198 ### How should this be tested? * N/A ### Screenshots (if appropriate) * N/A ### Questions: * Does the license files need to update? No. * Is there breaking changes for older versions? No. * Does this needs documentation? No. Closes #4943 from hyunw9/fix-multiple-typo-in-docs. Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>
36 KiB
36 KiB
| layout | title | description | group |
|---|---|---|---|
| page | Apache Zeppelin Notebook REST API | This page contains Apache Zeppelin Notebook REST API information. | usage/rest_api |
{% include JB/setup %}
Apache Zeppelin Notebook 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.
Notebooks REST API supports the following operations: List, Create, Get, Delete, Clone, Run, Export, Import as detailed in the following tables.
Note operations
List of the notes
| Description | This ```GET``` method lists the available notes on your server. Notebook JSON contains the ```name``` and ```id``` of all notes. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
### Create a new note
| Description | This ```POST``` method creates a new note using the given name or default name if none given. The body field of the returned JSON contains the new note id. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON input (without paragraphs) |
|
| sample JSON input (with initial paragraphs) |
|
| sample JSON response |
|
### Get the status of all paragraphs
| Description | This ```GET``` method gets the status of all paragraphs by the given note id. The body field of the returned JSON contains of the array that compose of the paragraph id, paragraph status, paragraph finish date, paragraph started date. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/job/[noteId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
### Get an existing note information
| Description | This ```GET``` method retrieves an existing note's information using the given id. The body field of the returned JSON contain information about paragraphs in the note. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
### Delete a note
| Description | This ```DELETE``` method deletes a note by the given note id. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
### Clone a note
| Description | This ```POST``` method clones a note by the given id and create a new note using the given name or default name if none given. If what you want to copy is a certain version of note, you need to specify the revisionId. The body field of the returned JSON contains the new note id. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON input |
|
| sample JSON response |
|
### Rename a note
| Description | This ```PUT``` method renames a note by the given id using the given name. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/rename``` |
| Success code | 200 |
| Bad Request code | 400 |
| Fail code | 500 |
| sample JSON input |
|
| sample JSON response |
|
### Export a note
| Description | This ```GET``` method exports a note by the given id and generates a JSON |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/export/[noteId]``` |
| Success code | 201 |
| Fail code | 500 |
| sample JSON response |
|
### Import a note
| Description | This ```POST``` method imports a note from the note JSON input |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/import``` |
| Success code | 201 |
| Fail code | 500 |
| sample JSON input |
|
| sample JSON response |
|
Run all paragraphs
| Description |
This ```POST``` method runs all paragraphs in the given note id. If you can not find Note id 404 returns. If there is a problem with the interpreter returns a 412 error. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/job/[noteId]``` |
| Success code | 200 |
| Fail code | 404 or 412 |
| sample JSON response |
|
| sample JSON error response |
|
### Stop all paragraphs
| Description | This ```DELETE``` method stops all paragraphs in the given note id. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/job/[noteId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
### Clear all paragraph result
| Description | This ```PUT``` method clear all paragraph results from note of given id. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/clear``` |
| Success code | 200 |
| Forbidden code | 401 |
| Not Found code | 404 |
| Fail code | 500 |
| sample JSON response |
|
Paragraph operations
### Create a new paragraph
| Description | This ```POST``` method create a new paragraph using JSON payload. The body field of the returned JSON contain the new paragraph id. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/paragraph``` |
| Success code | 201 |
| Fail code | 500 |
| sample JSON input (add to the last) |
|
| sample JSON input (add to specific index) |
|
| sample JSON input (providing paragraph config) |
|
| sample JSON response |
|
### Get a paragraph information
| Description | This ```GET``` method retrieves an existing paragraph's information using the given id. The body field of the returned JSON contain information about paragraph. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/paragraph/[paragraphId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
### Get the status of a single paragraph
| Description | This ```GET``` method gets the status of a single paragraph by the given note and paragraph id. The body field of the returned JSON contains of the array that compose of the paragraph id, paragraph status, paragraph finish date, paragraph started date. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/job/[noteId]/[paragraphId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
Update paragraph
| Description | This ```PUT``` method update paragraph contents using given id, e.g. {"text": "hello"}
|
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/paragraph/[paragraphId]``` |
| Success code | 200 |
| Bad Request code | 400 |
| Forbidden code | 403 |
| Not Found code | 404 |
| Fail code | 500 |
| sample JSON input |
|
| sample JSON response |
|
### Update paragraph configuration
| Description | This ```PUT``` method update paragraph configuration using given id so that user can change paragraph setting such as graph type, show or hide editor/result and paragraph size, etc. You can update certain fields you want, for example you can update colWidth field only by sending request with payload {"colWidth": 12.0}.
|
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/paragraph/[paragraphId]/config``` |
| Success code | 200 |
| Bad Request code | 400 |
| Forbidden code | 403 |
| Not Found code | 404 |
| Fail code | 500 |
| sample JSON input |
|
| sample JSON response |
|
### Delete a paragraph
| Description | This ```DELETE``` method deletes a paragraph by the given note and paragraph id. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/paragraph/[paragraphId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
### Run a paragraph asynchronously
| Description | This ```POST``` method runs the paragraph asynchronously by given note and paragraph id. This API always return SUCCESS even if the execution of the paragraph fails later because the API is asynchronous |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/job/[noteId]/[paragraphId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON input (optional, only needed when if you want to update dynamic form's value) |
|
| sample JSON response |
|
### Run a paragraph synchronously
| Description | This ```POST``` method runs the paragraph synchronously by given note and paragraph id. This API can return SUCCESS or ERROR depending on the outcome of the paragraph execution |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/run/[noteId]/[paragraphId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON input (optional, only needed when if you want to update dynamic form's value) |
|
| sample JSON response |
|
| sample JSON error |
|
### Stop a paragraph
| Description | This ```DELETE``` method stops the paragraph by given note and paragraph id. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/job/[noteId]/[paragraphId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
### Move a paragraph to the specific index
| Description | This ```POST``` method moves a paragraph to the specific index (order) from the note. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/paragraph/[paragraphId]/move/[newIndex]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
### Full text search through the paragraphs in all notes
| Description | ```GET``` request will return list of matching paragraphs |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/search?q=[query]``` |
| Success code | 200 |
| Fail code | 500 |
| Sample JSON response |
|
Cron jobs
### Add Cron Job
| Description | This ```POST``` method adds cron job by the given note id. Default value of ```releaseResource``` is ```false```. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/cron/[noteId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON input |
|
| sample JSON response |
|
Remove Cron Job
| Description | This ```DELETE``` method removes cron job by the given note id. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/cron/[noteId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
Get Cron Job
| Description | This ```GET``` method gets cron job expression of given note id. The body field of the returned JSON contains the cron expression and ```releaseResource``` flag. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/cron/[noteId]``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
Permission
Get a note permission information
| Description | This ```GET``` method gets a note authorization information. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/permissions``` |
| Success code | 200 |
| Forbidden code | 403 |
| Fail code | 500 |
| sample JSON response |
|
### Set note permission
| Description | This ```PUT``` method set note authorization information. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/permissions``` |
| Success code | 200 |
| Forbidden code | 403 |
| Fail code | 500 |
| sample JSON input |
|
| sample JSON response |
|
Version control
Get revisions of a note
| Description | This ```GET``` method gets the revisions of a note. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/revision``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
### Save a revision for a note
| Description | This ```POST``` method saves a revision for a note. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/revision``` |
| Success code | 200 |
| Bad Request code | 400 |
| Fail code | 500 |
| sample JSON input |
|
| sample JSON response |
|
| Description | This ```GET``` method gets a revision of a note. |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/revision/{revisionId}``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|
| Description | This ```PUT``` method reverts a note to a specified version |
| URL | ```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[noteId]/revision/{revisionId}``` |
| Success code | 200 |
| Fail code | 500 |
| sample JSON response |
|