How to run a zeppelin notebook using REST api and return results in python?
<p>I am running a zeppelin notebook using the following REST call from python:</p>

<p><code>import requests
requests.post('http://x.y.z.x:8080/api/notebook/job/2BZ3VJZ4G').json()</code></p>

<p>The output is {u'status': u'OK'}</p>

<p>But I want to return some results/exception(if any) from few blocks in the zeppelin notebook to the python script. </p>

<p>I also tried to run only a paragraph in the notebook using </p>

<pre><code>requests.post('http://x.y.z.x:8080/api/notebook/job/2BZ3VJZ4G/20160922-140926_526498241').json()
</code></pre>

<p>and received the same output {u'status': u'OK'}. </p>

<p>Can somebody help me to retrieve the results from zeppelin in python?</p>

<p>Zeppelin has introduced a synchronous API to run a paragraph in its latest yet to be releases 0.7.0 version. You can clone the latest code form their repo and build a snapshot yourself. URL for API is <a href="http://[zeppelin-server]:[zeppelin-port]/api/notebook/run/[notebookId]/[paragraphId]" rel="nofollow">http://[zeppelin-server]:[zeppelin-port]/api/notebook/run/[notebookId]/[paragraphId]</a>. This will return output of the paragraph after it has run completely.</p>

python rest apache-zeppelin