Write object
The PUT method is used to add an object to a vault. An object identifier is generated before the object is stored and returned after the operation is complete. The application should treat the object identifier as an opaque string. An object cannot be overwritten after it is created. Instead, an application must write any new data to a new object and delete the old object. Data that is written to a vault is visible after a response is returned from the write operation. Read and delete operations do not succeed until a write returns.
Sample request
PUT /vault-name HTTP/1.1
Content-Length: 43
Host: access.example.com
Content-Type: Text/Plain
The quick brown fox jumps over the lazy dog
An object that contains the text The quick brown fox jumps over the lazy dog is written to a vault named vault-name by using the access server access.example.com.
Sample response
HTTP/1.1 201 Created
Server: Cleversafe/3.2.0.0
Accept-Ranges: bytes
Date: Wed, 25 Sep 2013 14:38:12 GMT
X-SOH-Version: 2.5
X-Clv-Request-Id: 0f136d74-2ed6-4b6b-9f84-91735574aa5b
Content-Length: 37
d6133cd067ad4ea38cdcd1faa1e4e9040000
The response contains the object identifier of the data that was written to the Dispersed Storage
network.Status codes
| Code | Status | Description |
|---|---|---|
| 201 | Created | The object was successfully written to the vault. |
| 400 | Bad Request | The request could not be understood by the access server due to malformed syntax. |
| 401 | Unauthorized | User authentication is needed. The request either did not provide correct credentials or the user does not have permission to write to the indicated vault. |
| 403 | Forbidden | The client has insufficient privileges to perform the operation. |
| 500 | Internal Server Error | An internal error was encountered on the access server. It is an unrecoverable error. Details can be provided in message body. |