You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@steve.apache.org by "Mattmann, Chris A (398J)" <ch...@jpl.nasa.gov> on 2013/06/08 18:04:38 UTC

Steve REST API with Bottle

Hey Guys,

As we get more Python in there, here's what I'd like to set up
with Python Bottle:

/steve/vote/board
POST
input: <user's unique hash>
        <ballot characters>
output:
  code:
   HTTP 200 OK on success
   HTTP 500 on error
  payload:
    JSON formatted
     {
       msg: ""
     }

/steve/vote/member
POST
input: <user's unique hash>
        <yes|no|abstain>
output:
   code:
     HTTP 200 OK on success
     HTTP 500 on error
   paylod:
      JSON formatted
        {
          msg: ""
        }

/steve/list/board/{candidate}
  GET
    input: Path param candidate Apache uid, e.g., gstein
          (if not provided, all candidates, along with statements listed)
    output:
      HTTP 200 OK on success
      HTTP 404 if candidate not found (if provided)
      HTTP 500 on error
    payload:
       JSON formatted
         {
           [{uid:"gstein",
             nominatedby:"mattmann",
             secondedby:["kelly", "fielding"],
             accepted:"yes",
             statement: "yes",
             statementTxt:"here is my statement text"},
             {},{}]

I'll do the one for member candidates which would be
similar next. But yeah that's the type of Bottle stuff
I think would be cool b/c then peeps could build arbitrary
Steve UIs.


Not sure if we have a wiki so I went ahead and searched and
we do:

https://issues.apache.org/jira/browse/INFRA-5086


So I tried to create:

https://wiki.apache.org/Steve/SteveRESTAPI?action=edit


But I don't have perms, need them from gstein. Once I
get them I'll go ahead and add the above as a proposal
on the wiki.

In the meanwhile I'll see what I can do about at least
stubbing out some of the API and making it return dummy
data (we can swap out with real Steve API as it comes online).

Cheers,
Chris

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: chris.a.mattmann@nasa.gov
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++





Re: Steve REST API with Bottle

Posted by "Mattmann, Chris A (398J)" <ch...@jpl.nasa.gov>.
Thanks Greg, I'm able to edit now, appreciate it dude

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: chris.a.mattmann@nasa.gov
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++






-----Original Message-----
From: Greg Stein <gs...@gmail.com>
Reply-To: "dev@steve.apache.org" <de...@steve.apache.org>
Date: Sunday, June 9, 2013 5:05 PM
To: "dev@steve.apache.org" <de...@steve.apache.org>
Subject: Re: Steve REST API with Bottle

>On Sun, Jun 9, 2013 at 12:46 PM, Alan Cabrera <li...@toolazydogs.com>
>wrote:
>> On Jun 8, 2013, at 9:04 AM, "Mattmann, Chris A (398J)"
>><ch...@jpl.nasa.gov> wrote:
>>...
>>> So I tried to create:
>>>
>>> https://wiki.apache.org/Steve/SteveRESTAPI?action=edit
>>>
>>>
>>> But I don't have perms, need them from gstein. Once I
>>> get them I'll go ahead and add the above as a proposal
>>> on the wiki.
>
>Assumed "ChrisMattmann".
>
>>
>> Great!  Please also add AlanCabrera.
>
>Done.
>
>>...
>
>Cheers,
>-g


Re: Steve REST API with Bottle

Posted by Greg Stein <gs...@gmail.com>.
On Sun, Jun 9, 2013 at 12:46 PM, Alan Cabrera <li...@toolazydogs.com> wrote:
> On Jun 8, 2013, at 9:04 AM, "Mattmann, Chris A (398J)" <ch...@jpl.nasa.gov> wrote:
>...
>> So I tried to create:
>>
>> https://wiki.apache.org/Steve/SteveRESTAPI?action=edit
>>
>>
>> But I don't have perms, need them from gstein. Once I
>> get them I'll go ahead and add the above as a proposal
>> on the wiki.

Assumed "ChrisMattmann".

>
> Great!  Please also add AlanCabrera.

Done.

>...

Cheers,
-g

Re: Steve REST API with Bottle

Posted by "Mattmann, Chris A (398J)" <ch...@jpl.nasa.gov>.
Hi Alan,

-----Original Message-----

From: Alan Cabrera <li...@toolazydogs.com>
Reply-To: "dev@steve.apache.org" <de...@steve.apache.org>
Date: Sunday, June 9, 2013 9:46 AM
To: "dev@steve.apache.org" <de...@steve.apache.org>
Subject: Re: Steve REST API with Bottle

>
>On Jun 8, 2013, at 9:04 AM, "Mattmann, Chris A (398J)"
><ch...@jpl.nasa.gov> wrote:
>
>> Hey Guys,
>> 
>> As we get more Python in there, here's what I'd like to set up
>> with Python Bottle:
>> 
>> <snip>lots of great JSON/REST API stuff</snip
>
>I would post JSON data as well.  We can flesh that out on the wiki.

Cool, scope out:

https://wiki.apache.org/Steve/SteveRESTAPI


Updates/feedback welcomed.

>
>
>I was thinking the layers could be:
>
>[tooling, etc]
>[REST server ][same host tooling]
>[          library              ]
>[          RAW DATA             ]

+1

Cheers,
Chris

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: chris.a.mattmann@nasa.gov
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




Re: Steve REST API with Bottle

Posted by Alan Cabrera <li...@toolazydogs.com>.
On Jun 8, 2013, at 9:04 AM, "Mattmann, Chris A (398J)" <ch...@jpl.nasa.gov> wrote:

> Hey Guys,
> 
> As we get more Python in there, here's what I'd like to set up
> with Python Bottle:
> 
> <snip>lots of great JSON/REST API stuff</snip

I would post JSON data as well.  We can flesh that out on the wiki.

> I'll do the one for member candidates which would be
> similar next. But yeah that's the type of Bottle stuff
> I think would be cool b/c then peeps could build arbitrary
> Steve UIs.

+1 UIs and command line tooling

> Not sure if we have a wiki so I went ahead and searched and
> we do:
> 
> https://issues.apache.org/jira/browse/INFRA-5086
> 
> 
> So I tried to create:
> 
> https://wiki.apache.org/Steve/SteveRESTAPI?action=edit
> 
> 
> But I don't have perms, need them from gstein. Once I
> get them I'll go ahead and add the above as a proposal
> on the wiki.

Great!  Please also add AlanCabrera.

> In the meanwhile I'll see what I can do about at least
> stubbing out some of the API and making it return dummy
> data (we can swap out with real Steve API as it comes online).

I was thinking the layers could be:

[tooling, etc]
[REST server ][same host tooling]
[          library              ]
[          RAW DATA             ]



Regards,
Alan





Re: Steve REST API with Bottle

Posted by Alan Cabrera <li...@toolazydogs.com>.
On Jun 8, 2013, at 9:04 AM, "Mattmann, Chris A (398J)" <ch...@jpl.nasa.gov> wrote:

> In the meanwhile I'll see what I can do about at least
> stubbing out some of the API and making it return dummy
> data (we can swap out with real Steve API as it comes online).

I'lls chillin' at #steve on freenode if anyone wants to chat.

BTW, has anyone looked at http://steve.apache.org/?  I'm happy to get that started if no one is working on it.


Regards,
Alan