Skip to content

Commit f546532

Browse files
author
astroshim
committed
add rest-credential document
1 parent 26433f2 commit f546532

File tree

1 file changed

+181
-0
lines changed

1 file changed

+181
-0
lines changed

docs/rest-api/rest-credential

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
---
2+
layout: page
3+
title: "Credentials REST API"
4+
description: ""
5+
group: rest-api
6+
---
7+
<!--
8+
Licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this file except in compliance with the License.
10+
You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
See the License for the specific language governing permissions and
18+
limitations under the License.
19+
-->
20+
{% include JB/setup %}
21+
22+
## Zeppelin REST API
23+
Zeppelin provides several REST APIs for interaction and remote activation of zeppelin functionality.
24+
25+
All REST APIs are available starting with the following endpoint `http://[zeppelin-server]:[zeppelin-port]/api`. Note that 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).
26+
27+
If you work with Zeppelin and find a need for an additional REST API, please [file an issue or send us mail](http://zeppelin.apache.org/community.html).
28+
29+
<br />
30+
## Credential REST API List
31+
32+
### List Credential information
33+
<table class="table-credential">
34+
<col width="200">
35+
<tr>
36+
<td>Description</td>
37+
<td>This ```GET``` method return all key/value pair of credential informations on the server.</td>
38+
</tr>
39+
<tr>
40+
<td>URL</td>
41+
<td>```http://[zeppelin-server]:[zeppelin-port]/api/credential```</td>
42+
</tr>
43+
<tr>
44+
<td>Success code</td>
45+
<td>200</td>
46+
</tr>
47+
<tr>
48+
<td> Fail code</td>
49+
<td> 500 </td>
50+
</tr>
51+
<tr>
52+
<td> sample JSON response
53+
</td>
54+
<td>
55+
<pre>
56+
{
57+
"status": "OK",
58+
"message": "",
59+
"body": {
60+
"userCredentials":{
61+
"entity1":{
62+
"username":"user1",
63+
"password":"password1"
64+
},
65+
"entity2":{
66+
"username":"user2",
67+
"password":"password2"
68+
}
69+
}
70+
}
71+
}</pre></td>
72+
</tr>
73+
</table>
74+
75+
<br/>
76+
### Create an Credential Information
77+
<table class="table-credential">
78+
<col width="200">
79+
<tr>
80+
<td>Description</td>
81+
<td>This ```PUT``` method create an credential information with new properties.</td>
82+
</tr>
83+
<tr>
84+
<td>URL</td>
85+
<td>```http://[zeppelin-server]:[zeppelin-port]/api/credential/```</td>
86+
</tr>
87+
<tr>
88+
<td>Success code</td>
89+
<td>200</td>
90+
</tr>
91+
<tr>
92+
<td>Fail code</td>
93+
<td> 500 </td>
94+
</tr>
95+
<tr>
96+
<td>Sample JSON input</td>
97+
<td>
98+
<pre>
99+
{
100+
"entity": "e1",
101+
"username": "user",
102+
"password": "password"
103+
}
104+
</pre>
105+
</td>
106+
</tr>
107+
<tr>
108+
<td>Sample JSON response</td>
109+
<td>
110+
<pre>
111+
{
112+
"status": "OK"
113+
}
114+
</pre>
115+
</td>
116+
</tr>
117+
</table>
118+
119+
120+
<br/>
121+
### Delete all Credential Information
122+
123+
<table class="table-credential">
124+
<col width="200">
125+
<tr>
126+
<td>Description</td>
127+
<td>This ```DELETE``` method deletes credential information.</td>
128+
</tr>
129+
<tr>
130+
<td>URL</td>
131+
<td>```http://[zeppelin-server]:[zeppelin-port]/api/credential```</td>
132+
</tr>
133+
<tr>
134+
<td>Success code</td>
135+
<td>200</td>
136+
</tr>
137+
<tr>
138+
<td> Fail code</td>
139+
<td> 500 </td>
140+
</tr>
141+
<tr>
142+
<td>Sample JSON response</td>
143+
<td>
144+
<code>{"status":"OK"}</code>
145+
</td>
146+
</tr>
147+
</table>
148+
149+
150+
<br/>
151+
### Delete an Credential entity
152+
153+
<table class="table-credential">
154+
<col width="200">
155+
<tr>
156+
<td>Description</td>
157+
<td>This ```DELETE``` method deletes an given credential entity.</td>
158+
</tr>
159+
<tr>
160+
<td>URL</td>
161+
<td>```http://[zeppelin-server]:[zeppelin-port]/api/credential/[entity]```</td>
162+
</tr>
163+
<tr>
164+
<td>Success code</td>
165+
<td>200</td>
166+
</tr>
167+
<tr>
168+
<td> Fail code</td>
169+
<td> 500 </td>
170+
</tr>
171+
<tr>
172+
<td>Sample JSON response</td>
173+
<td>
174+
<code>{"status":"OK"}</code>
175+
</td>
176+
</tr>
177+
</table>
178+
179+
180+
<br/>
181+

0 commit comments

Comments
 (0)