GitHub user HeartSaVioR opened a pull request:
https://github.com/apache/incubator-zeppelin/pull/536
ZEPPELIN-506 Expand "create notebook" of REST API to have initial paragraphs
### What is this PR for?
To provide initial paragraphs when creating new notebook via REST API
### What type of PR is it?
Improvement
### Todos
* [ ] -
### Is there a relevant Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-506
### How should this be tested?
1. Request http://<zeppelin host>:<zeppelin port>/api/notebook with POST
method including JSON payload,
```
{
"name": "Test for initial paragraphs2",
"paragraphs": [
{
"text": "%spark\nvar hello: Int=1"
},
{
"text": "%spark\nhello = hello + 1"
},
{
"text": "%spark\nimport java.util.Date\n\nprintln(hello + \",
current time is <\" + new Date + \">\")"
}
]
}
```
2. Check notebook is made with initial paragraphs via UI or REST API or Web
socket.
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? (No)
* Is there breaking changes for older versions? (No)
* Does this needs documentation? (Yes, I've updated related doc.)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HeartSaVioR/incubator-zeppelin ZEPPELIN-506
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-zeppelin/pull/536.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #536
----
commit d7cd1ed7c2556f350bf749e63568cd6c6ac7f40a
Author: Jungtaek Lim <[email protected]>
Date: 2015-12-16T00:53:13Z
ZEPPELIN-506 Expand "create notebook" of REST API to have initial paragraphs
* Modified "create notebook" to have initial paragraphs
* Added unit test to test this feature
* Updated rest-notebook.md to reflect new json request
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---