Java - API - getting Provider List

17 views
Skip to first unread message

critak

unread,
Jun 4, 2011, 8:27:56 AM6/4/11
to spotclo...@googlegroups.com
Hi, i'm trying to load the providerList (as xml file) via Java.

First, i followed this instructions:
http://dl.enomaly.com/scbuyerapi

After the i try to send a GET-REQUEST:

System.out.println("providerList:");
System.out.println(get(accessToken,"/api/v1/buyer/providers/list", null, "xml"));

by the way, this works:

System.out.println("appListpublic:");
System.out.println(get(accessToken,"/api/v1/buyer/appliances/public", null, "xml"));


This i what i get:
providerList:
https://spotcloud.appspot.com/api/v1/buyer/providers/list.xml?
<?xml version="1.0" encoding="utf-8"?>
<list>
</list>
List is empty ?

In the instructions, i saw that by default the all list entries will return (if i don't use any parameters).

Any ideas or examples ?
 

adam boduch

unread,
Jun 5, 2011, 10:07:55 PM6/5/11
to spotclo...@googlegroups.com
Hi,

Thanks for pointing that out.  I'll update the documentation and look into why we're returning an empty list of providers.

Adam

Robin Henniges

unread,
Jun 7, 2011, 4:50:27 AM6/7/11
to spotclo...@googlegroups.com
Hi Adam,

it would be nice if you could tell me when you fixed it. 

Thank you very very much. :)

Robin

Adam Boduch

unread,
Jun 7, 2011, 10:14:48 AM6/7/11
to SpotCloud Buyers
Hi,

My apologies, but we had a stale version of the documentation up. The
provider list API is deprecated. Instead, you should use the hardware
API as follows:

GET /api/v1/buyer/hardware/list.{json|xml}

This will return a list of hardware objects (see the updated
documentation for filter parameters). When you want to create a new
instance, you just need the hardware key and the appliance key.

Again, sorry for the delay and please let me know if you have any
further questions.

Adam

On 7 June, 04:50, Robin Henniges <robinhenni...@gmail.com> wrote:
> Hi Adam,
>
> it would be nice if you could tell me when you fixed it.
>
> Thank you very very much. :)
>
> Robin
>
>
>
>
>
>
>
> On Mon, Jun 6, 2011 at 4:07 AM, adam boduch <adam.bod...@gmail.com> wrote:
> > Hi,
>
> > Thanks for pointing that out.  I'll update the documentation and look into
> > why we're returning an empty list of providers.
>
> > Adam
>
> > On Sat, Jun 4, 2011 at 8:27 AM, critak <robinhenni...@gmail.com> wrote:
>
> >> Hi, i'm trying to load the providerList (as xml file) via Java.
>
> >> First, i followed this instructions:
> >>http://dl.enomaly.com/scbuyerapi
>
> >> After the i try to send a GET-REQUEST:
>
> >> System.out.println("providerList:");
> >> System.out.println(*get*(accessToken,"/api/v1/buyer/providers/list", *
> >> null*, "xml"));
>
> >> by the way, this works:
>
> >> System.out.println("appListpublic:");
> >> System.out.println(*get*(accessToken,"/api/v1/buyer/appliances/public", *
> >> null*, "xml"));

Adam Boduch

unread,
Jun 16, 2011, 11:48:37 AM6/16/11
to Robin Henniges, spotclo...@googlegroups.com
Hi,

The parameter should be "appliance", not "application". Try it with
that and see if anything changes.

Regards,

Adam

On Thu, 2011-06-16 at 17:39 +0200, Robin Henniges wrote:
> Hi Adam,
> Need your help again !
>
>
> this time i want to run an instance !
>
>
> so i wrote a post method (similar to get-method ;-) )
>
>
> post ( accessToken , "/api/v1/buyer/instances/list" , HashMap
> { <hardware, somethingblablaghi8t53n>,<application,
> agsksDexampleWordwDKSlwlW>} , "xml" )
>
>
>
>
> request is:
>
>
> i get a object like this:
>
>
> <obj>
> <hardware>this field is req.</hardware>
> <application>this field is req.</application>
> </obj>
>
>
> But the url that i POST includes both.
>
>
>
>
> Thank you !

Robin Henniges

unread,
Jun 16, 2011, 11:39:04 AM6/16/11
to spotclo...@googlegroups.com, adam....@gmail.com
Hi Adam,
Need your help again !

this time i want to run an instance !

so i wrote a post method (similar to get-method ;-) )

post ( accessToken , "/api/v1/buyer/instances/list" , HashMap { <hardware, somethingblablaghi8t53n>,<application, agsksDexampleWordwDKSlwlW>} , "xml" )


request is:

i get a object like this:

<obj>
<hardware>this field is req.</hardware>
<application>this field is req.</application>
</obj>

But the url that i POST includes both.


Thank you !


On Tue, Jun 7, 2011 at 4:14 PM, Adam Boduch <adam....@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages