As part of our workflow, we are triggering some additional component in binderhub (jupyter book build) after a successful user environment build, and we need a feedback from the cluster about the success of the build, launch etc…
Following the documentation BinderHub API Documentation — BinderHub 0.1.0 documentation, there is an api that can do that, however there is no working example.
Can you give me more details about how to request a user launch, and getting back a json formatted answer about the status?
We were also wondering if there is an easy way to request a download of the files that are inside the environment, through the api endpoint.
than you @minrk, this is also definitively usefull.
By any chance, do you know if it is possible to request a download link of a specific folder using the api ? It is possible to do it manually inside a notebook, by inserting this cell, but we would like to get it at runtime…
from IPython.display import FileLink
from shutil import make_archive
make_archive('sample', 'zip', "./_build")
display(FileLink('sample.zip'))
The download link is /files/path/to/file, so /files/sample.zip in that example (relative to the server base prefix, i.e. /user/user-xyz/files/sample.zip).