In order to use the ReST API, you will first need to obtain a authorization token,
which will need to be passed in for each request using the X-Auth-Token
header. The following example demonstrates how to use cURL to obtain the authorization
token and the URL of the storage system.
Example 4.1. cURL Authenticate
curl-D- \-H "X-Auth-Key: jdoesecretpassword"\-H "X-Auth-User: jdoe"\https://auth.api.yourcloud.com/v1.0
HTTP/1.1 204 No Content
Date: Thu, 09 Jul 2009 15:31:39 GMT
Server: Apache/2.2.3
X-Storage-Url: https://storage.swiftdrive.com/v1/CF_xer7_343
X-Auth-Token: fc81aaa6-98a1-9ab0-94ba-aba9a89aa9ae
Content-Length: 0
Connection: close
Content-Type: application/octet-stream
The storage URL and authentication token are returned in
the headers of the response. After authentication, you can use cURL to perform
HEAD, GET, DELETE, POST and PUT requests on the storage
services.
