Swift Object Operations:Create Or Update Object

Search (SHIFT+S)




Create Or Update Object

PUT /v1/{account}/{container}/{object}

Creates or updates the content and metadata for a specified object.

URL Format

v1/{account}/{container}/{object}

Request Headers

Etag optionalMD5 checksum of your object's data. (stored in header)
Content-Encoding optionalUnderlying media type of the compressed file. Stored in header.
X-Object-Meta optionalContainer metadata. * represents the name of metadata.
X-Delete-At optionalCertain date, in the format of a Unix Epoch timestamp, when the object will be removed. Stored in header.
X-Delete-After optionalCertain date, in the format of a Unix Epoch timestamp, after which the object will be removed. Stored in header.
x-emc-retention-period optionalRetention period in seconds, -1 denotes infinity
x-emc-retention-policy optionalRetention policy
X-Copy-From optionalSource object which data should be copied from to the new created object
Range optionalRange to be updated

Prerequisites

The following conditions must be met in order to call this operation.

  • Container must exist


Request Payload

No Request Payload


Response Headers

ETag alwaysETag of the object after created/updated
X-Copied-From-Last-Modified optionalLast-modified time for the source object
X-Copied-From optionalLocation where the object is copied from

Response Body

Response indicating Success or Failure for this operation.

Notes: