凭据 API
原文链接 : http://zeppelin.apache.org/docs/0.7.2/rest-api/rest-credential.html
译文链接 : http://www.apache.wiki/pages/viewpage.action?pageId=10031082
概述
Apache Zeppelin提供了几个REST API,用于交互和远程激活zeppelin功能。所有REST API都可以从以下端点开始http://[zeppelin-server]:[zeppelin-port]/api。需要注意的是Apache的齐柏林飞艇的REST API接收或返回JSON对象,建议你安装一些JSON观众如JSONView。
如果您使用Apache Zeppelin并发现需要一个额外的REST API,请提出问题或向我们发送电子邮件。
凭证REST API列表
列出凭证信息
| 描述 | 此GET方法返回服务器上凭据信息的所有键/值对。 |
| 网址 | http://[zeppelin-server]:[zeppelin-port]/api/credential |
| 成功代码 | 200 |
| 失败代码 | 500 |
| 示例JSON响应 |
{"status": "OK","message": "","body": {"userCredentials":{"entity1":{"username":"user1","password":"password1"},"entity2":{"username":"user2","password":"password2"}}}}
|
创建证书信息
| 描述 | 此PUT方法创建具有新属性的凭据信息。 |
| 网址 | http://[zeppelin-server]:[zeppelin-port]/api/credential/ |
| 成功代码 | 200 |
| 失败代码 | 500 |
| 示例JSON输入 |
{"entity": "e1","username": "user","password": "password"}
| | 示例JSON响应 |
{"status":"OK"}
|
删除所有凭据信息
| 描述 | 此DELETE方法将删除凭据信息。 |
| 网址 | http://[zeppelin-server]:[zeppelin-port]/api/credential |
| 成功代码 | 200 |
| 失败代码 | 500 |
| 示例JSON响应 |
{"status":"OK"}
|
删除凭证实体
| 描述 | 此DELETE方法将删除给定的凭据实体。 |
| 网址 | http://[zeppelin-server]:[zeppelin-port]/api/credential/[entity] |
| 成功代码 | 200 |
| 失败代码 | 500 |
| 示例JSON响应 |
{"status":"OK"}
|
