You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aurora.apache.org by Lili Nader <ln...@redhat.com> on 2014/06/19 01:22:18 UTC

Does Aurora have a HTTP API?

Hi,

The documentation only refers to the aurora client and a read-only Web UI.  I was wondering if there was a REST/HTTP API available for clients to create jobs, etc?

Thanks,
Lili

Re: Does Aurora have a HTTP API?

Posted by Mark Chu-Carroll <mc...@apache.org>.
The new client code includes script-friendly output, which shouldn't be any
harder to handle than an HTTP API. You don't need to do screen-scraping;
it's actually easier to work with than a typical HTTP API.

For example:
- For commands like "aurora job list", the output format is a list of
jobkeys, separated by newlines.
- For commands with more complicated output, the output is JSON, which is
exactly what you would expect from an HTTP API.

The way that client is implemented makes a lightweight wrapper difficult:
- There is a lot of client-side logic in aurora. In particular, almost all
of the logic for job update and job restart are part of the client. Other
things like the batched form "job kill" have non-trivial client-side logic.
 An API will need to somehow adapt that client code,.
- Client commands can take a long time to execute - again restart and
update are the outliers here. An HTTP API will need to do some kind of
pagination or AJAX; waiting for the command to complete will time out the
HTTP request.
- The client code is still very much in flux: we're constantly introducing
new functionality, refining the implementations of existing things, and
fixing bugs: if you write an API client that isn't just a wrapper around
the current command-line code, you're going to end up putting in a lot of
effort to track our changes, or you'll lag behind.

In short, I strongly recommend that for now, you try to use the
script-friendly options in the command-line client. If you find any crucial
features missing, or you find anything about it that's more difficult to
use, either send mail to this mailing list, or create a JIRA issue and
assign it to me. I'm determined to make the client as functional as
possible, and I'll make fixing any problems that you find a high priority.

     -Mark


On Thu, Jun 19, 2014 at 12:58 AM, Lili Nader <ln...@redhat.com> wrote:

> Thank you for your responses.  I will look into the work being done by
> paypal.
>
> An API would make it easier for 3rd parties to integrate versus calling a
> client which would require parsing of the output from the client.
>
> Lili
>
>
> ----- Original Message -----
> From: "Mark Chu-Carroll" <mc...@apache.org>
> To: dev@aurora.incubator.apache.org
> Sent: Wednesday, June 18, 2014 6:19:53 PM
> Subject: Re: Does Aurora have a HTTP API?
>
> At the moment, we do not have any kind of API for end-users.
>
> It's something that we'd probably like to have in the future, but for now,
> getting the command-line tools working correctly is more important to us.
> Any API that we implemented now would be changing so rapidly that it
> wouldn't be useful for much.
>
> It's really not clear to us just what an API would look like, or how it
> would be used, beyond being just a wrapper around the commands in the
> command-line client - and in that case, the only thing that an API would
> give you is a slightly easier way to write scripts for aurora.
>
> One of the big goals of clientv2 has been to make the command-line tools
> much more script-friendly, so that that becomes easier. Then we can see how
> people use it, and what kinds of scripting actually makes sense - and use
> that to guide any future decision about a client API.
>
>     -Mark
>
>
> On Wed, Jun 18, 2014 at 7:28 PM, Oliver, James <Ja...@pegs.com>
> wrote:
>
> > Short answer: no
> >
> > There's officially a Thrift API which is used by the Web UI. Someone at
> > PayPal implemented a REST API in a forked repository, check it out:
> > https://github.com/smarth-madan/incubator-aurora
> >
> >
> > Regarding this functionality, I am also an interested party. One might
> > consider contributing this code back to the Aurora project :-)
> >
> > James Oliver
> > Pegasus Solutions
> >
> > Software Engineer II
> > Application Development Services
> > 14000 N Pima Rd, Suite 100
> > Scottsdale, AZ 85260
> > +1.480.624.6259 Tel
> >
> > +1.602.577.7578 Cell
> > james.oliver@pegs.com
> > www.pegs.com <http://www.pegs.com/>
> >
> >
> > This email, including any attached files, may contain confidential and
> > privileged information. If you received this communication in error,
> > please contact the sender by reply e-mail and delete all copies of this
> > message.
> >
> >
> >
> >
> > On 6/18/14 4:22 PM, "Lili Nader" <ln...@redhat.com> wrote:
> >
> > >Hi,
> > >
> > >The documentation only refers to the aurora client and a read-only Web
> > >UI.  I was wondering if there was a REST/HTTP API available for clients
> > >to create jobs, etc?
> > >
> > >Thanks,
> > >Lili
> >
> >
>

Re: Does Aurora have a HTTP API?

Posted by Lili Nader <ln...@redhat.com>.
Thank you for your responses.  I will look into the work being done by paypal.

An API would make it easier for 3rd parties to integrate versus calling a client which would require parsing of the output from the client.

Lili


----- Original Message -----
From: "Mark Chu-Carroll" <mc...@apache.org>
To: dev@aurora.incubator.apache.org
Sent: Wednesday, June 18, 2014 6:19:53 PM
Subject: Re: Does Aurora have a HTTP API?

At the moment, we do not have any kind of API for end-users.

It's something that we'd probably like to have in the future, but for now,
getting the command-line tools working correctly is more important to us.
Any API that we implemented now would be changing so rapidly that it
wouldn't be useful for much.

It's really not clear to us just what an API would look like, or how it
would be used, beyond being just a wrapper around the commands in the
command-line client - and in that case, the only thing that an API would
give you is a slightly easier way to write scripts for aurora.

One of the big goals of clientv2 has been to make the command-line tools
much more script-friendly, so that that becomes easier. Then we can see how
people use it, and what kinds of scripting actually makes sense - and use
that to guide any future decision about a client API.

    -Mark


On Wed, Jun 18, 2014 at 7:28 PM, Oliver, James <Ja...@pegs.com>
wrote:

> Short answer: no
>
> There's officially a Thrift API which is used by the Web UI. Someone at
> PayPal implemented a REST API in a forked repository, check it out:
> https://github.com/smarth-madan/incubator-aurora
>
>
> Regarding this functionality, I am also an interested party. One might
> consider contributing this code back to the Aurora project :-)
>
> James Oliver
> Pegasus Solutions
>
> Software Engineer II
> Application Development Services
> 14000 N Pima Rd, Suite 100
> Scottsdale, AZ 85260
> +1.480.624.6259 Tel
>
> +1.602.577.7578 Cell
> james.oliver@pegs.com
> www.pegs.com <http://www.pegs.com/>
>
>
> This email, including any attached files, may contain confidential and
> privileged information. If you received this communication in error,
> please contact the sender by reply e-mail and delete all copies of this
> message.
>
>
>
>
> On 6/18/14 4:22 PM, "Lili Nader" <ln...@redhat.com> wrote:
>
> >Hi,
> >
> >The documentation only refers to the aurora client and a read-only Web
> >UI.  I was wondering if there was a REST/HTTP API available for clients
> >to create jobs, etc?
> >
> >Thanks,
> >Lili
>
>

Re: Does Aurora have a HTTP API?

Posted by Mark Chu-Carroll <mc...@apache.org>.
At the moment, we do not have any kind of API for end-users.

It's something that we'd probably like to have in the future, but for now,
getting the command-line tools working correctly is more important to us.
Any API that we implemented now would be changing so rapidly that it
wouldn't be useful for much.

It's really not clear to us just what an API would look like, or how it
would be used, beyond being just a wrapper around the commands in the
command-line client - and in that case, the only thing that an API would
give you is a slightly easier way to write scripts for aurora.

One of the big goals of clientv2 has been to make the command-line tools
much more script-friendly, so that that becomes easier. Then we can see how
people use it, and what kinds of scripting actually makes sense - and use
that to guide any future decision about a client API.

    -Mark


On Wed, Jun 18, 2014 at 7:28 PM, Oliver, James <Ja...@pegs.com>
wrote:

> Short answer: no
>
> There's officially a Thrift API which is used by the Web UI. Someone at
> PayPal implemented a REST API in a forked repository, check it out:
> https://github.com/smarth-madan/incubator-aurora
>
>
> Regarding this functionality, I am also an interested party. One might
> consider contributing this code back to the Aurora project :-)
>
> James Oliver
> Pegasus Solutions
>
> Software Engineer II
> Application Development Services
> 14000 N Pima Rd, Suite 100
> Scottsdale, AZ 85260
> +1.480.624.6259 Tel
>
> +1.602.577.7578 Cell
> james.oliver@pegs.com
> www.pegs.com <http://www.pegs.com/>
>
>
> This email, including any attached files, may contain confidential and
> privileged information. If you received this communication in error,
> please contact the sender by reply e-mail and delete all copies of this
> message.
>
>
>
>
> On 6/18/14 4:22 PM, "Lili Nader" <ln...@redhat.com> wrote:
>
> >Hi,
> >
> >The documentation only refers to the aurora client and a read-only Web
> >UI.  I was wondering if there was a REST/HTTP API available for clients
> >to create jobs, etc?
> >
> >Thanks,
> >Lili
>
>

Re: Does Aurora have a HTTP API?

Posted by "Oliver, James" <Ja...@pegs.com>.
Short answer: no

There's officially a Thrift API which is used by the Web UI. Someone at
PayPal implemented a REST API in a forked repository, check it out:
https://github.com/smarth-madan/incubator-aurora


Regarding this functionality, I am also an interested party. One might
consider contributing this code back to the Aurora project :-)

James Oliver
Pegasus Solutions

Software Engineer II
Application Development Services
14000 N Pima Rd, Suite 100
Scottsdale, AZ 85260
+1.480.624.6259 Tel

+1.602.577.7578 Cell
james.oliver@pegs.com
www.pegs.com <http://www.pegs.com/>


This email, including any attached files, may contain confidential and
privileged information. If you received this communication in error,
please contact the sender by reply e-mail and delete all copies of this
message.




On 6/18/14 4:22 PM, "Lili Nader" <ln...@redhat.com> wrote:

>Hi,
>
>The documentation only refers to the aurora client and a read-only Web
>UI.  I was wondering if there was a REST/HTTP API available for clients
>to create jobs, etc?
>
>Thanks,
>Lili