7    Interface Standard

7.1   HTTP Status Codes

HTTP status codes (see Table 6) are used to convey the results of the RESTful operations and to follow the basic semantics of HTTP with minimal overloading. Other HTTP status codes are not part of this international standard and retain their original semantics from HTTP 1.1.

Table 6 - HTTP Status Codes

Status Code

HTTP Name

Description

200

OK

The request has succeeded.

201

Created

The resource was created successfully.

202

Accepted

The long-running operation was accepted for processing.

204

No Content

The operation was successful; no data was returned.

302

Found

The resource is a reference to another resource.

400

Bad Request

The request contents are missing or invalid.

401

Unauthorized

The authentication/authorization credentials are invalid.

403

Forbidden

The client lacks the proper authorization to perform this request.

404

Not Found

The resource was not found at the specified URI.

406

Not Acceptable

No content can be produced at this URI that matches the request.

409

Conflict

The operation conflicts with a non-CDMI access protocol lock or may cause a state transition error on the server.

7.2   Object References

Object references are URIs within the cloud storage namespace that redirect to another URI within the same or another cloud storage namespace. References are similar to soft links in a file system. The cloud does not guarantee that the referenced URI will be valid after the time of creation.

References are visible as children in a container and are distinguished from non-references by a trailing "?" character added to the reference name. Performing an operation (with the exception of create or delete) to a reference URI will result in a 302 Found HTTP redirect, with the Location HTTP header containing the redirect destination URI that was specified at the time the reference was created. The reference’s destination URI shall not be changed after a reference has been created.

To continue, when CDMI clients receive a 302 Found redirect, they should retry the operation using the URI contained within the Location header.

A delete operation on a reference URI shall delete the reference. References cannot be updated. To update the destination of a redirect, the client shall first delete the reference and then create a new reference to the desired destination.

EXAMPLE 1   GET to a URI, where the URI is a reference:

GET /MyContainer/MyDataObject.txt HTTP/1.1

Host: cloud.example.com

Accept: application/cdmi-object

X-CDMI-Specification-Version: 1.0.2

The following shows the response.

HTTP/1.1 302 Found

Location: http://cloud.example.com/MyContainer/MyOtherDataObject.txt

References by object ID shall always redirect to a URI that ends with the same object ID as the request URI.

EXAMPLE 2   GET to an object ID URI, where the URI is a reference:

GET /cdmi_objectid/00006FFD0010AA33D8CEF9711E0835CA HTTP/1.1

Host: cloud.example.com

Accept: application/cdmi-object

X-CDMI-Specification-Version: 1.0.2

The following shows the response.

HTTP/1.1 302 Found

Location: http://archive.example.com/cdmi_objectid/00006FFD0010AA33D8CEF9711E0835CA