mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Add a docs page for notebookRepoRestApi
This commit is contained in:
parent
32840e656d
commit
8eac3ddc18
3 changed files with 184 additions and 0 deletions
|
|
@ -106,6 +106,7 @@
|
|||
<li class="title"><span><b>REST API</b><span></li>
|
||||
<li><a href="{{BASE_PATH}}/rest-api/rest-interpreter.html">Interpreter API</a></li>
|
||||
<li><a href="{{BASE_PATH}}/rest-api/rest-notebook.html">Notebook API</a></li>
|
||||
<li><a href="{{BASE_PATH}}/rest-api/rest-notebookRepo.html">Notebook Repository API</a></li>
|
||||
<li><a href="{{BASE_PATH}}/rest-api/rest-configuration.html">Configuration API</a></li>
|
||||
<li><a href="{{BASE_PATH}}/rest-api/rest-credential.html">Credential API</a></li>
|
||||
<li><a href="{{BASE_PATH}}/rest-api/rest-helium.html">Helium API</a></li>
|
||||
|
|
|
|||
|
|
@ -163,8 +163,10 @@ Join to our [Mailing list](https://zeppelin.apache.org/community.html) and repor
|
|||
* REST API: available REST API list in Apache Zeppelin
|
||||
* [Interpreter API](./rest-api/rest-interpreter.html)
|
||||
* [Notebook API](./rest-api/rest-notebook.html)
|
||||
* [Notebook Repository API](./rest-api/rest-notebookRepo.html)
|
||||
* [Configuration API](./rest-api/rest-configuration.html)
|
||||
* [Credential API](./rest-api/rest-credential.html)
|
||||
* [Helium API](./rest-api/rest-helium.html)
|
||||
* Security: available security support in Apache Zeppelin
|
||||
* [Authentication for NGINX](./security/authentication.html)
|
||||
* [Shiro Authentication](./security/shiroauthentication.html)
|
||||
|
|
@ -179,6 +181,8 @@ Join to our [Mailing list](https://zeppelin.apache.org/community.html) and repor
|
|||
* Contribute
|
||||
* [Writing Zeppelin Interpreter](./development/writingzeppelininterpreter.html)
|
||||
* [Writing Zeppelin Application (Experimental)](./development/writingzeppelinapplication.html)
|
||||
* [Writing Zeppelin Spell (Experimental)](./development/writingzeppelinspell.html)
|
||||
* [Writing Zeppelin Visualization (Experimental)](./development/writingzeppelinvisualization.html)
|
||||
* [How to contribute (code)](./development/howtocontribute.html)
|
||||
* [How to contribute (documentation website)](./development/howtocontributewebsite.html)
|
||||
|
||||
|
|
|
|||
179
docs/rest-api/rest-notebookRepo.md
Normal file
179
docs/rest-api/rest-notebookRepo.md
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
---
|
||||
layout: page
|
||||
title: "Apache Zeppelin notebook repository REST API"
|
||||
description: "This page contains Apache Zeppelin notebook repository REST API information."
|
||||
group: rest-api
|
||||
---
|
||||
<!--
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
{% include JB/setup %}
|
||||
|
||||
# Apache Zeppelin Notebook Repository API
|
||||
|
||||
<div id="toc"></div>
|
||||
|
||||
## 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](https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc).
|
||||
|
||||
If you work with Apache Zeppelin and find a need for an additional REST API, please [file an issue or send us an email](http://zeppelin.apache.org/community.html).
|
||||
|
||||
## Notebook Repository REST API List
|
||||
|
||||
### List all available notebook repositories
|
||||
|
||||
<table class="table-configuration">
|
||||
<col width="200">
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>This ```GET``` method returns all the available notebook repositories.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>URL</td>
|
||||
<td>```http://[zeppelin-server]:[zeppelin-port]/api/notebook-repositories```</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Success code</td>
|
||||
<td>200</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fail code</td>
|
||||
<td>500</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sample JSON response</td>
|
||||
<td>
|
||||
<pre>
|
||||
{
|
||||
"status": "OK",
|
||||
"message": "",
|
||||
"body": [
|
||||
{
|
||||
"name": "GitNotebookRepo",
|
||||
"className": "org.apache.zeppelin.notebook.repo.GitNotebookRepo",
|
||||
"settings": [
|
||||
{
|
||||
"type": "INPUT",
|
||||
"value": [],
|
||||
"selected": "ZEPPELIN_HOME/zeppelin/notebook/",
|
||||
"name": "Notebook Path"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
|
||||
### Reload a notebook repository
|
||||
|
||||
<table class="table-configuration">
|
||||
<col width="200">
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>This ```GET``` method triggers reloading and broadcasting of the note list.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>URL</td>
|
||||
<td>```http://[zeppelin-server]:[zeppelin-port]/api/notebook-repositories/reload```</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Success code</td>
|
||||
<td>200</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fail code</td>
|
||||
<td>500</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sample JSON response</td>
|
||||
<td>
|
||||
<pre>
|
||||
{
|
||||
"status": "OK",
|
||||
"message": ""
|
||||
}
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
|
||||
### Update a specific notebook repository
|
||||
|
||||
<table class="table-configuration">
|
||||
<col width="200">
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>This ```PUT``` method updates a specific notebook repository.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>URL</td>
|
||||
<td>```http://[zeppelin-server]:[zeppelin-port]/api/notebook-repositories```</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Success code</td>
|
||||
<td>200</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fail code</td>
|
||||
<td>
|
||||
404 when the specified notebook repository doesn't existed <br/>
|
||||
406 for invalid payload <br/>
|
||||
500 for any other errors
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sample JSON input</td>
|
||||
<td>
|
||||
<pre>
|
||||
{
|
||||
"name":"org.apache.zeppelin.notebook.repo.GitNotebookRepo",
|
||||
"settings":{
|
||||
"Notebook Path":"/tmp/notebook/"
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sample JSON response</td>
|
||||
<td>
|
||||
<pre>
|
||||
{
|
||||
"status": "OK",
|
||||
"message": "",
|
||||
"body": {
|
||||
"name": "GitNotebookRepo",
|
||||
"className": "org.apache.zeppelin.notebook.repo.GitNotebookRepo",
|
||||
"settings": [
|
||||
{
|
||||
"type": "INPUT",
|
||||
"value": [],
|
||||
"selected": "/tmp/notebook/",
|
||||
"name": "Notebook Path"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
Loading…
Reference in a new issue