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

Missing GET /api/routes/{route_spec} API #125

Open
anandology opened this issue Sep 15, 2017 · 4 comments
Open

Missing GET /api/routes/{route_spec} API #125

anandology opened this issue Sep 15, 2017 · 4 comments

Comments

@anandology
Copy link

The API has a way to create a route using POST method and delete using the DELETE method, but there is no way to get the information about a route or test if a route exists.

Expected behavior:

Request:

    GET /api/routes/path1

Response:

    200 OK
    {"target":"http://1.2.3.4:8301","host":"a.example.com","last_activity":"2017-09-14T14:46:49.162Z"}

---
Request:

    GET /api/routes/no-such-route

Response:

    404 Not Found

As of now, the GET /api/routes/{route_spec} API work and it is equivalent to GET /api/routes. The {route_spec} is complete ignored. When a non existing route is tried, the DELETE returns 404 status and GET returns 200 status, which is very confusing.

    DELETE /api/routes/no-such-route
    404 Not Found

    GET /api/routes/no-such-route
    200 OK
    {...}
@minrk
Copy link
Member

minrk commented Sep 18, 2017

Supporting retrieval of specific routes makes sense

@ghost
Copy link

ghost commented Dec 1, 2018

I am trying to get all routes on my jupyterhub-docker-deploy, but the GET /api/routes/ returns nothing in response. Here is what I have done:
Host>> docker container exec -it jupyterhub bash
JupyterHubContainer>> curl http://localhost:8081/api/routes/

Ultimately, I would like to add additional routes in the proxy so, for example, I can browse to https://host-domain/user/datachannel/my-service and it gets routed to my-service hosted on jupyter notebook container.

@minrk
Copy link
Member

minrk commented Dec 1, 2018

@datachannel that's the JupyterHub API. The proxy is in a different container (proxy in jupyterhub-deploy-docker, I believe).

@ghost
Copy link

ghost commented Dec 2, 2018

thanks @minrk. I only see three containers, 1. Jupyterhub 2. jupyterjub-db and 3. jupyter notebook container when I login. For the time-being, I ended up using nbserverproxy extension.

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

No branches or pull requests

4 participants