GitHub user doanduyhai reopened a pull request: https://github.com/apache/incubator-zeppelin/pull/746
[ZEPPELIN-699] Add new synchronous paragraph run REST API ### What is this PR for? Right now, when calling the REST API `http://<ip>:<port>/api/notebook/job/<note_id>/<paragraph_id>` Zeppelin always returns **OK** as shown by this source code: https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRestApi.java#L477 This ticket will update the behavior so that Zeppelin also return the result of the paragraph execution ### What type of PR is it? [Improvement] ### Todos * [ ] - Code Review * [ ] - Simple Test ### Is there a relevant Jira issue? **[ZEPPELIN-699]** ### How should this be tested? * `git fetch origin pull/746/head:ParagraphExecutionRESTAPI` * `git checkout ParagraphExecutionRESTAPI` * `mvn clean package -DskipTests` * `bin/zeppelin-daemon.sh restart` * Create a new note * In the first paragraph, put the following code ```scala %sh echo "Current time = "`date +"%T" ``` * Retrieve the current note id in the URL * Retrieve the current paragraph id * Use a REST Client like **[POSTman]** to create a HTTP POST query `http://<ip>:<port>/api/notebook/run/<note_id>/<paragraph_id>` * You should receive something similar as follow for answer ``` { "status": "OK", "body": { "code": "SUCCESS", "type": "TEXT", "msg": "Current time = 16:14:18\n" } } ``` ### Screenshots (if appropriate)  API Documentation update **Existing asynchronous API**  **New synchronous API**  ### Questions: * Does the licenses files need update? --> **No** * Is there breaking changes for older versions? --> **No** * Does this needs documentation? --> **Yes** [ZEPPELIN-699]: https://issues.apache.org/jira/browse/ZEPPELIN-699 [POSTman]: https://www.getpostman.com/ You can merge this pull request into a Git repository by running: $ git pull https://github.com/doanduyhai/incubator-zeppelin ZEPPELIN-699 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-zeppelin/pull/746.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 #746 ---- commit c8825f7ff639f554862a6933c4a259cd14389f51 Author: DuyHai DOAN <doanduy...@gmail.com> Date: 2016-06-02T14:15:46Z [ZEPPELIN-699] Add new synchronous paragraph run REST API commit 695c13e762bad5a31bf47131ccae196062aa5889 Author: DuyHai DOAN <doanduy...@gmail.com> Date: 2016-06-02T14:24:38Z [ZEPPELIN-699] Update Notebook REST API documentation commit 46a2f3662aab87edf522e92bfa7700170230263b Author: DuyHai DOAN <doanduy...@gmail.com> Date: 2016-06-03T08:20:17Z [ZEPPELIN-699] Fix doc after code review ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---