| layout |
title |
description |
group |
| page |
Notebook REST API |
|
rest-api |
{% include JB/setup %}
Zeppelin REST API
Zeppelin provides several REST API's for interaction and remote activation of zeppelin functionality.
All REST API are available starting with the following endpoint http://[zeppelin-server]:[zeppelin-port]/api
Note that zeppelin REST API receive or return JSON objects, it it recommended you install some JSON view such as
JSONView
If you work with zeppelin and find a need for an additional REST API please file an issue or send us mail
### Notebook REST API list
Notebooks REST API supports the following operations: List, Create, Delete & Clone as detailed in the following table
| List notebooks |
|
| Description |
This ```GET``` method list the available notebooks on your server.
Notebook JSON contains the ```name``` and ```id``` of all notebooks.
|
| URL |
```http://[zeppelin-server]:[zeppelin-port]/api/notebook``` |
| Success code |
200 |
| Fail code |
500 |
| sample JSON response |
{"status":"OK","message":"","body":[{"name":"Homepage","id":"2AV4WUEMK"},{"name":"Zeppelin Tutorial","id":"2A94M5J1Z"}]} |
| Create notebook |
|
| Description |
This ```POST``` method create a new notebook using the given name or default name if none given.
The body field of the returned JSON contain the new notebook id.
|
| URL |
```http://[zeppelin-server]:[zeppelin-port]/api/notebook``` |
| Success code |
201 |
| Fail code |
500 |
| sample JSON input |
{"name": "name of new notebook"} |
| sample JSON response |
{"status": "CREATED","message": "","body": "2AZPHY918"} |
| Clone notebook |
|
| Description |
This ```POST``` method clone a notebook by the given id and create a new notebook using the given name
or default name if none given.
The body field of the returned JSON contain the new notebook id.
|
| URL |
```http://[zeppelin-server]:[zeppelin-port]/api/notebook/[notebookId]``` |
| Success code |
201 |
| Fail code |
500 |
| sample JSON input |
{"name": "name of new notebook"} |
| sample JSON response |
{"status": "CREATED","message": "","body": "2AZPHY918"} |
| Get notebook job |
|
| Description |
This ```GET``` method get all paragraph status by the given notebook 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/[notebookId]``` |
| Success code |
200 |
| Fail code |
500 |
| sample JSON response |
{"status":"OK","body":[{"id":"20151121-212654_766735423","status":"FINISHED","finished":"Tue Nov 24 14:21:40 KST 2015","started":"Tue Nov 24 14:21:39 KST 2015"},{"id":"20151121-212657_730976687","status":"FINISHED","finished":"Tue Nov 24 14:21:40 KST 2015","started":"Tue Nov 24 14:21:40 KST 2015"}]} |
| Full-text search through the paragraphs in all notebooks |
|
| 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 |
{"status":"OK", body: [{"id":"/paragraph/", "name":"Notebook Name", "snippet":"", "text":""}]} |