You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Imran Rashid (JIRA)" <ji...@apache.org> on 2018/01/30 03:10:00 UTC

[jira] [Comment Edited] (SPARK-23236) Make it easier to find the rest API, especially in local mode

    [ https://issues.apache.org/jira/browse/SPARK-23236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16344433#comment-16344433 ] 

Imran Rashid edited comment on SPARK-23236 at 1/30/18 3:09 AM:
---------------------------------------------------------------

{quote}
1. /api and /api/v1 to give the same results (a redirect) as /api/v1/applications
Based on that I'm on the fence about #1, it may be ok, but I'm not sure if it's best. 
{quote}

actually, I want them to be a very simple html page, with just a single link.  I don't think they should be a redirect, as I dont' think they should appear to actually be part of the api.  The html page could even have a little disclaimer "Are you looking for the rest api?  There is no endpoint here in this version, maybe you want ..."

{quote}
2. You want /api/v1/applications/{app-id} to include a list of rest api end points
As for #2 I'm not sure how you're envisioning it, but it seems like a bad idea in mu head. 
{quote}

So to be clear, really I just want a little help with my super lazy, forgetful side, which can't remember the exact endpoint off the top of my head.  There are many variations which would satisfy this.  The entire UI could *just* provide a link to {{/api/v1/applications/[app-id]}} ... but thats a little weird since there actually isn't anything there.  That's why I was suggesting putting something there, even if its just another simple html page, "Nothing here, maybe you want ...".  We could go even simpler -- have every page in the UI have a link to some random app-specific endpoint in the UI, eg. {{/api/v1/applications/[app-id]/jobs}} .  It would be a little weird if you're on the stage page in the UI, and you follow a link for the REST api, and it takes you to the jobs data ... but it would at least make it easier to get the base URL right.

I also don't really care if {{/api/v1/applications/[app-id]}} actually lists *every* endpoint below that.  I think its totally fine if I need to remember the choices below that -- that is actually the important part of the choice I need to make.  I want something to fill in the rest of the automatic stuff for me.  The only reason I suggested putting the list of endpoints is, I want to put *something* there so the UI can link to it.

{quote}
3. You want UI pages to include links to the rest api calls that they get their info from
And for #3, I would be ok with this, but again I'm not sure how its useful.
{quote}

yeah this is the least important, but perhaps you can see where I'm going from this after #2, it just feels like a natural extension.  Certainly not worth a huge amount of effort.


was (Author: irashid):
bq. 1. /api and /api/v1 to give the same results (a redirect) as /api/v1/applications
bq. Based on that I'm on the fence about #1, it may be ok, but I'm not sure if it's best. 

actually, I want them to be a very simple html page, with just a single link.  I don't think they should be a redirect, as I dont' think they should appear to actually be part of the api.  The html page could even have a little disclaimer "Are you looking for the rest api?  There is no endpoint here in this version, maybe you want ..."

bq. 2. You want /api/v1/applications/{app-id} to include a list of rest api end points

bq. As for #2 I'm not sure how you're envisioning it, but it seems like a bad idea in mu head. 

So to be clear, really I just want a little help with my super lazy, forgetful side, which can't remember the exact endpoint off the top of my head.  There are many variations which would satisfy this.  The entire UI could *just* provide a link to /api/v1/applications/{app-id} ... but thats a little weird since there actually isn't anything there.  That's why I was suggesting putting something there, even if its just another simple html page, "Nothing here, maybe you want ...".  We could go even simpler -- have every page in the UI have a link to some random app-specific endpoint in the UI, eg. /api/v1/applications/{app-id}/jobs .  It would be a little weird if you're on the stage page in the UI, and you follow a link for the REST api, and it takes you to the jobs data ... but it would at least make it easier to get the base URL right.

I also don't really care if /api/v1/applications/{app-id} actually lists every endpoint below that.  I think its totally fine if I need to remember the choices below that -- that is actually the important part of the choice I need to make.  I want something to fill in the rest of the automatic stuff for me.

bq. 3. You want UI pages to include links to the rest api calls that they get their info from
bq. And for #3, I would be ok with this, but again I'm not sure how its useful.

yeah this is the least important, but perhaps you can see where I'm going from this after #2, it just feels like a natural extension.  Certainly not worth a huge amount of effort.

> Make it easier to find the rest API, especially in local mode
> -------------------------------------------------------------
>
>                 Key: SPARK-23236
>                 URL: https://issues.apache.org/jira/browse/SPARK-23236
>             Project: Spark
>          Issue Type: Improvement
>          Components: Web UI
>    Affects Versions: 2.3.0
>            Reporter: Imran Rashid
>            Priority: Trivial
>              Labels: newbie
>
> This is really minor, but it always takes me a little bit to figure out how to get from the UI to the rest api.  Its especially a pain in local-mode, where you need the app-id, though in general I don't know the app-id, so have to either look in logs or go to another endpoint first in the ui just to find the app-id.  While it wouldn't really help anybody accessing the endpoints programmatically, we could make it easier for someone doing exploration via their browser.
> Some things which could be improved:
> * /api/v1 just provides a link to "/api/v1/applications"
> * /api provides a link to "/api/v1/applications"
> * /api/v1/applications/[app-id] gives a list of links for the other endpoints
> * on the UI, there is a link to at least /api/v1/applications/[app-id] -- better still if each UI page links to the corresponding endpoint, eg. the all jobs page would link to /api/v1/applications/[app-id]/jobs



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org