tljh-repo2docker
tljh-repo2docker copied to clipboard
Document starting a single user server with a specific environment using the JupyterHub REST API
The plugin seems to extend the hub REST API to provide endpoints for querying environments but relies on the JupyterHub REST API /users/{name}/server/{serverName}
endpoint to start a server.
from the REST API docs spawn options can be passed as a JSON body so I am assuming that the spawn form selection will be posted as the JSON body and that body will have the shape { "image": "my-image-name" }
Is this the case? are there any existing documentation (or a location in the code) to confirm this? if not some documentation would be valuable - perhaps as a subsection in the readme.
it seems that the spawn page completes a form-data POST to /hub/spawn-pending/{user}/random
with image: recharge-base:HEAD
.
And an authenticated POST to /users/{user}/server
or /users/{user}/server/{server-name}
with a JSON body {"image": "my-env-name"}
succeeds as expected 🥳
And an authenticated POST to
/users/{user}/server
or/users/{user}/server/{server-name}
with a JSON body{"image": "my-env-name"}
succeeds as expected partying_face
Ah nice! Would you like to open a PR to add it to the docs / README.md?