Nova API — /api/workspace
The operations Nova tags public under /api/workspace. Generated from reference-src/nova-openapi.json.
GET /api/workspace
Operation id workspace_get: in Python client.call("workspace_get", …), on the command line stardelt api workspace_get.
GET /api/workspace: the caller's own server state.
The state of the caller's own JupyterHub server: stopped (no server), starting (the hub is spawning it), running (ready) or stopping (the hub is stopping it), with startedAt, lastActivity and idleStopAt (lastActivity plus the platform's idle limit: when the hub culls an idle server). Orders no server and never reads another person's: the hub user is the caller's own sign-in name. A person the hub has never seen answers stopped. Answers 200 {"state":"unavailable"} when Nova has no hub credentials or the hub does not answer, so the page still renders. Answers Cache-Control: no-store.
Responses
| Code | Description |
|---|---|
200 | The caller's workspace, or unavailable |
401 | No token to sign in with |
POST /api/workspace/start
Operation id workspace_start: in Python client.call("workspace_start", …), on the command line stardelt api workspace_start.
POST /api/workspace/start: ask the hub to spawn the caller's server.
Spawn the caller's own JupyterHub server: POST /hub/api/users/{name}/server with Nova's service token. Answers 202 {"state":"starting"} when the hub accepted the spawn, 200 {"state":"running"} when a server was already running, and 409 when the hub has never seen this person (they must open JupyterHub once to create their workspace) or when the hub's stored sign-in for them has expired (only the hub's login can renew it: open JupyterLab once). 503 when Nova has no hub credentials, 502 when the hub does not answer or refuses another way.
Responses
| Code | Description |
|---|---|
200 | A server was already running |
202 | The hub is spawning the server |
401 | No token to sign in with |
409 | The hub has no such user, or their hub sign-in has expired |
502 | The hub did not answer or refused |
503 | No hub credentials |
POST /api/workspace/stop
Operation id workspace_stop: in Python client.call("workspace_stop", …), on the command line stardelt api workspace_stop.
POST /api/workspace/stop: ask the hub to stop the caller's server.
Stop the caller's own JupyterHub server: DELETE /hub/api/users/{name}/server with Nova's service token. Answers 202 {"state":"stopping"}; a person the hub has never seen answers 200 {"state":"stopped"} (there is nothing to stop). 503 when Nova has no hub credentials, 502 when the hub does not answer or refuses.
Responses
| Code | Description |
|---|---|
200 | There was no server to stop |
202 | The hub is stopping the server |
401 | No token to sign in with |
502 | The hub did not answer or refused |
503 | No hub credentials |