Zeppelin Notebook 存储访问 REST API

原创
2017/05/08 11:18
阅读数 1.9K

Apache Zeppelin Notebook Repository API

概览

Apache Zeppelin 提供了多个REST APIs用于远程功能交互操作。 所有的REST APIs 都通过 endpoint http://[zeppelin-server]:[zeppelin-port]/api 进行操作。注意,Apache Zeppelin 的REST APIs 都接受和返回 JSON 对象, 建议安装 JSON viewers, 比如 JSONView

Notebook Repository REST API 列表

列出所有可用的notebook repositories

Description This GET method returns all the available notebook repositories.
URL http://[zeppelin-server]:[zeppelin-port]/api/notebook-repositories
Success code 200
Fail code 500
Sample JSON response
{
  "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"
        }
      ]
    }
  ]
}

重新载入notebook repository

Description This GET method triggers reloading and broadcasting of the note list.
URL http://[zeppelin-server]:[zeppelin-port]/api/notebook-repositories/reload
Success code 200
Fail code 500
Sample JSON response
{
  "status": "OK",
  "message": ""
}

 

更新指定的 notebook repository

Description This PUT method updates a specific notebook repository.
URL http://[zeppelin-server]:[zeppelin-port]/api/notebook-repositories
Success code 200
Fail code 404 when the specified notebook repository doesn't exist
406 for invalid payload
500 for any other errors
Sample JSON input
{
  "name":"org.apache.zeppelin.notebook.repo.GitNotebookRepo",
  "settings":{
    "Notebook Path":"/tmp/notebook/"
  }
}
Sample JSON response
{
  "status": "OK",
  "message": "",
  "body": {
    "name": "GitNotebookRepo",
    "className": "org.apache.zeppelin.notebook.repo.GitNotebookRepo",
    "settings": [
      {
        "type": "INPUT",
        "value": [],
        "selected": "/tmp/notebook/",
        "name": "Notebook Path"
      }
    ]
  }
}
展开阅读全文
加载中

作者的其它热门文章

打赏
0
0 收藏
分享
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部