Normal Responses to WRITE

See https://perifery.atlassian.net/wiki/spaces/public/pages/2443820996 for a list of response headers.

The responses listed here can be returned by the storage cluster when the new object can be created as requested. The content can be created and written to the cluster by the node that receives the request or redirected to another node in the cluster.

Note

The Replica-Count header indicates the number of synchronous replicas created if the number is greater than 1.

201 Created

The response below indicates the storage cluster has stored at least one copy of the supplied object. If required, other nodes can store additional replicas at a later time. The value of the Location header provides the URI where the newly-created object can be accessed in the cluster. The last portion of the URI is the symbolic name or UUID of the object.

For unnamed objects, this value is repeated as the value of the Content-UUID header field. Note: the Content-Type and Content-Length headers refer to the message payload of the response (if any).

HTTP/1.1 201   Created Date: Wed, 1 Sept 2015 15:59:02 GMT   Server: CAStor Cluster/5.0.0   Location: http://node-ip/<bucket/name | uuid>   Content-UUID: 41a140b5271dc8d22ff8d027176a0821   Content-Type: text/html   Content-Length: 68   CRLF A new object has been created as requested.   Its URL is http://node-ip/<bucket/name | uuid>

202 Accepted

The response occurs for certain types of writes, such as a multi-part completion. It means that the request was accepted, and it is pending. The final status is returned both in the body, and as a trailing header named castor-system-result.

After a 202, the request may still fail.

301 Moved Permanently

The response indicates the request has been redirected to another node, and should be retried there. All future requests of this storage cluster should be made through the new access node until another 301 response is received. There is no message-body, so the content length is always 0. The value of the Location header indicates which node in the cluster receives the redirect.

The client is expected to send another POST request using the exact URI contained in the Location header, including the auth= query argument.

HTTP/1.1 301 Moved Permanently   Date: Wed, 1 Sept 2015 15:59:02 GMT   Server: CAStor Cluster/5.0.0   Location:  http://node-ip/<bucket/name | uuid>?auth=value   Content-Length: 0

307 Temporary Redirect

The response below is similar to the 301 response, except that the client should continue to use the current node (the one generating this response) for future requests until further notice.

HTTP/1.1 307 Temporary Redirect   Date: Wed, 1 Sept 2015 15:59:02 GMT   Server: CAStor Cluster/5.0.0   Location:  http://node-ip/<bucket/name | uuid>/?auth=B1E1509329C7A5DD90DCF6642DFB   Content-Length: 0

 

© DataCore Software Corporation. · https://www.datacore.com · All rights reserved.