GitHub user HeartSaVioR opened a pull request:
https://github.com/apache/incubator-zeppelin/pull/541
ZEPPELIN-507 Expand "run paragraph" of REST API to update dynamic form's
value
### What is this PR for?
To update dynamic form's value (via params) when running paragraph via REST
API
### What type of PR is it?
Improvement
### Todos
### Is there a relevant Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-507
### How should this be tested?
1. Create a new notebook with one paragraph which contains
```
%spark
val form1 = z.input("form1").toString
```
2. Get paragraph ID via websocket (I think we should add a new REST API to
get it easily.)
3. Request http://<zeppelin host>:<zeppelin
port>/api/notebook/job/<notebook id>/<paragraph id> with POST method including
JSON payload,
```
{
"params": {
"form1": "value1"
}
}
```
4. Confirm that paragraph has run and input text of form1 is filled with
"value1" (from the UI)
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? (No)
* Is there breaking changes for older versions? (No, additonal json payload
is optional.)
* Does this needs documentation? (Yes, I've addressed it.)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HeartSaVioR/incubator-zeppelin ZEPPELIN-507
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-zeppelin/pull/541.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 #541
----
commit 8dcf02c0cf0458957e1eaefd00a9127ad878d388
Author: Jungtaek Lim <[email protected]>
Date: 2015-12-16T08:12:40Z
ZEPPELIN-507 Expand "run paragraph" of REST API to specify params
* Modified "run paragraph" to specify params
* which means we want to update dynamic form's value
* 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.
---