Skip to content

Commit 0e94dce

Browse files
committed
add documentation
1 parent 3645354 commit 0e94dce

File tree

1 file changed

+114
-1
lines changed

1 file changed

+114
-1
lines changed

docs/rest-api/rest-notebook.md

Lines changed: 114 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ limitations under the License.
3333
<br />
3434
### Notebook REST API list
3535

36-
Notebooks REST API supports the following operations: List, Create, Get, Delete, Clone, Run as detailed in the following table
36+
Notebooks REST API supports the following operations: List, Create, Get, Delete, Clone, Run, Export, Import as detailed in the following table
3737

3838
<table class="table-configuration">
3939
<col width="200">
@@ -773,3 +773,116 @@ limitations under the License.
773773
</tr>
774774
</table>
775775

776+
777+
778+
<table class="table-configuration">
779+
<col width="200">
780+
<tr>
781+
<th>Export notebook</th>
782+
<th></th>
783+
</tr>
784+
<tr>
785+
<td>Description</td>
786+
<td>This ```GET``` method exports a notebook by the given id and gernerates a JSON
787+
788+
</td>
789+
</tr>
790+
<tr>
791+
<td>URL</td>
792+
<td>```http://[zeppelin-server]:[zeppelin-port]/api/notebook/export/[notebookId]```</td>
793+
</tr>
794+
<tr>
795+
<td>Success code</td>
796+
<td>201</td>
797+
</tr>
798+
<tr>
799+
<td> Fail code</td>
800+
<td> 500 </td>
801+
</tr>
802+
803+
<td> sample JSON response </td>
804+
<td><pre>{
805+
"paragraphs": [
806+
{
807+
"text": "%md This is my new paragraph in my new note",
808+
"dateUpdated": "Jan 8, 2016 4:49:38 PM",
809+
"config": {
810+
"enabled": true
811+
},
812+
"settings": {
813+
"params": {},
814+
"forms": {}
815+
},
816+
"jobName": "paragraph_1452300578795_1196072540",
817+
"id": "20160108-164938_1685162144",
818+
"dateCreated": "Jan 8, 2016 4:49:38 PM",
819+
"status": "READY",
820+
"progressUpdateIntervalMs": 500
821+
}
822+
],
823+
"name": "source note for export",
824+
"id": "2B82H3RR1",
825+
"angularObjects": {},
826+
"config": {},
827+
"info": {}
828+
}</pre></td>
829+
</tr>
830+
</table>
831+
832+
<table class="table-configuration">
833+
<col width="200">
834+
<tr>
835+
<th>Export notebook</th>
836+
<th></th>
837+
</tr>
838+
<tr>
839+
<td>Description</td>
840+
<td>This ```PUT``` method imports a notebook from the notebook JSON
841+
842+
</td>
843+
</tr>
844+
<tr>
845+
<td>URL</td>
846+
<td>```http://[zeppelin-server]:[zeppelin-port]/api/notebook/import```</td>
847+
</tr>
848+
<tr>
849+
<td>Success code</td>
850+
<td>201</td>
851+
</tr>
852+
<tr>
853+
<td> Fail code</td>
854+
<td> 500 </td>
855+
</tr>
856+
857+
<td> sample JSON input </td>
858+
<td><pre>{
859+
"paragraphs": [
860+
{
861+
"text": "%md This is my new paragraph in my new note",
862+
"dateUpdated": "Jan 8, 2016 4:49:38 PM",
863+
"config": {
864+
"enabled": true
865+
},
866+
"settings": {
867+
"params": {},
868+
"forms": {}
869+
},
870+
"jobName": "paragraph_1452300578795_1196072540",
871+
"id": "20160108-164938_1685162144",
872+
"dateCreated": "Jan 8, 2016 4:49:38 PM",
873+
"status": "READY",
874+
"progressUpdateIntervalMs": 500
875+
}
876+
],
877+
"name": "source note for export",
878+
"id": "2B82H3RR1",
879+
"angularObjects": {},
880+
"config": {},
881+
"info": {}
882+
}</pre></td>
883+
<tr>
884+
<td> sample JSON response </td>
885+
<td><pre>"status": "CREATED","message": "","body": "2AZPHY918"}</pre></td>
886+
</tr>
887+
</tr>
888+
</table>

0 commit comments

Comments
 (0)