Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document starting a single user server with a specific environment using the JupyterHub REST API #59

Open
stevejpurves opened this issue Jan 4, 2023 · 2 comments

Comments

@stevejpurves
Copy link

stevejpurves commented Jan 4, 2023

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.

@stevejpurves
Copy link
Author

stevejpurves commented Jan 4, 2023

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 🥳

@jtpio
Copy link
Member

jtpio commented Jan 26, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants