Cloud Enterprise Object Storage REST API

Search (SHIFT+S)




Create New Key

POST /object/secret-keys

Create a secret key for the authenticated user that makes the request. When creating new secret key, you may pass in an expiration time in minutes for the old key. During the expiration interval, both keys will be accepted for requests. This gives you a grace period where you can update applications to use the new key.


Required Roles

This call has no restrictions.


Request Payload

All parameters are required unless otherwise stated.

Field Description Type Notes
secret_key_create_param
existing_key_expiry_time_mins Expiry time/date for the secret key in minutes. Note that nodes may cache old keys for up to two minutes so the old key may not expire immediately. String

Response Body

New secret key for the current user

Field Description Type Notes
user_secret_key
secret_key Secret key String
key_timestamp Secret key creation timestamp in ISO-8601 format String Valid Values:
  •  yyyy-MM-dd'T'HH:mm'Z'
key_expiry_timestamp Secret key expiry timestamp in ISO-8601 format String Valid Values:
  •  yyyy-MM-dd'T'HH:mm'Z'
link A link for this resource

Examples

Request
POST https://192.168.0.0:4443/object/secret-keys HTTP/1.1

Content-Type: application/xml
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>

<?xml version="1.0" encoding="UTF-8"?>
<secret_key_create_param>
   <existing_key_expiry_time_mins>60</existing_key_expiry_time_mins>
</secret_key_create_param>
Response
HTTP/1.1 200 OK
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<user_secret_key>
   <key_timestamp>2013-09-30 20:57:59.149</key_timestamp>
   <key_expiry_timestamp>2013-10-30 20:57:59.149</key_expiry_timestamp>
   <link href="/object/user-secret-keys/root" rel="self"/>
   <secret_key>b2qffCUYCyyKrwoaEKkb1XoYB4m82eonbgwUjjxs</secret_key>
</user_secret_key>