Re: [Openstack] Invoking Glance REST API

2012-08-10 Thread Sajith Kariyawasam
Thanks Brian.. that worked ..! :)

On Thu, Aug 9, 2012 at 9:31 PM, Brian Waldon  wrote:

> You're getting a '300 Multiple Choices' response as you haven't indicated
> a version in your request. You can parse the body as json (indicated in the
> headers) to see what API versions are available to you at any given time.
> If you don't care about  taking that extra step, just use a URI with 'v1'
> as the first token in your path: http://
> :/v1/images/detail
>
> Brian Waldon
>
>
> On Aug 9, 2012, at 2:05 AM, Sajith Kariyawasam wrote:
>
> Hi all,
>
> I'm trying to invoke Openstack Glance REST API s using a Java client, to
> get image details. etc (Ultimately I need to upload an image)
>
> When I invoke http://:/images/detail  GET request in
> Java code, I'm getting *HTTP 300 *as the response code.
>
> 4 < 300
> 4 < Date: Thu, 09 Aug 2012 08:56:29 GMT
> 4 < Content-Length: 222
> 4 < Content-Type: application/json
> 4 < Connection: keep-alive
>
>
> Any idea what could have gone wrong there?
>
> --
> Best Regards
> Sajith
>
>  ___
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
>
>


-- 
Best Regards
Sajith
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] Invoking Glance REST API

2012-08-09 Thread Brian Waldon
You're getting a '300 Multiple Choices' response as you haven't indicated a 
version in your request. You can parse the body as json (indicated in the 
headers) to see what API versions are available to you at any given time. If 
you don't care about  taking that extra step, just use a URI with 'v1' as the 
first token in your path: http://:/v1/images/detail

Brian Waldon


On Aug 9, 2012, at 2:05 AM, Sajith Kariyawasam wrote:

> Hi all, 
> 
> I'm trying to invoke Openstack Glance REST API s using a Java client, to get 
> image details. etc (Ultimately I need to upload an image)
> 
> When I invoke http://:/images/detail  GET request in Java 
> code, I'm getting HTTP 300 as the response code.
> 
> 4 < 300
> 4 < Date: Thu, 09 Aug 2012 08:56:29 GMT
> 4 < Content-Length: 222
> 4 < Content-Type: application/json
> 4 < Connection: keep-alive
> 
> Any idea what could have gone wrong there?
> 
> -- 
> Best Regards
> Sajith
> 
> ___
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp