openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #24326
Re: curl with swift
Sure, easy to do (curl is what I normally use anyway).
To auth (for auth v1. v2 and keystone will be different):
curl -i -H "X-Auth-User: foo" -H "X-Auth-Key: bar" http://swift/auth/v1.0
The 2 headers you need to look for are X-Storage-URL and X-Auth-Token.
After that, use the X-Auth-Token to talk to the X-Storage-URL, and you should be good to go:
curl -i -H "X-Auth-Token: baz" http://swift/v1/AUTH_foo
(As a footnote, it looks like your sample curl request is doing a container listing and not an object fetch.)
--John
On Jun 10, 2013, at 11:28 AM, Remo Mattei <remo@xxxxxxxxxx> wrote:
> Hello everyone,
> I am looking to do some testing on being able to retrieve data object from a swift server on a Instance that does not have anything but curl. Any suggestions?
>
> I am using this command now but I get not auth to get this object.
>
> Thanks,
> Remo
>
> curl -X GET \
> -H "X-Auth-Token: 813c6eef9f474e7f860ef42dcaeeb53b" \
> http://192.168.235.113:8080/v1/AUTH_9ffeae726f33436b9e0796d31f85f730/remo.pen > Remo.pem
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
References