Dell DX6004S DX Object Storage Application Guide - Page 41

Scsp Copy

Page 41 highlights

Chapter 9. SCSP COPY The following topics in this chapter discuss details about SCSP COPY: • Section 9.1, "Introduction to COPY" • Section 9.2, "Unnamed Object COPY Details" 9.1. Introduction to COPY This section discusses general information about SCSP COPY that applies to both named and unnamed objects. The COPY method copies the content metadata of an existing object verbatim. The syntax of a COPY request is similar to that for an empty PUT request on anchor streams. An example for an unnamed object follows. COPY for a named object is the same except you use the object's name instead of a UUID on the first line of the command. COPY /d5a7fc3fd6102a7c2e4ca4391b579996?alias=true HTTP/1.1 Host: cluster.example.com Content-Length: 0 x-xml-meta-data-color: blue x-xml-meta-data-weight: 42 x-xml-meta-data: largeblue lifepoint: [Sunday, 06-Nov-2010 08:49:37 GMT] reps=3, deletable=no lifepoint: [] delete The Content-Length header is optional, but if supplied its value must be 0 because there is no content body for a COPY request. Any additional headers, like the two DX Storage-* headers in the example and the lifepoint headers, can also be supplied with the request. These metadata headers replace all existing metadata associated with the given anchor stream, with the exception of Content-length whose value continues to provide the original length of the content data. If the client provides a Content-MD5 header with the COPY request, DX Storage recomputes the digest of the content data as it copies it and compare it with the provided MD5 hash. Other aspects of the COPY method, including response codes, are the same as PUT. The COPY method returns a response only after all the data has been copied and the anchor stream update is complete. 9.2. Unnamed Object COPY Details The UUID returned after a successful COPY will be identical to the one supplied in the request, just like a PUT or APPEND request. The query argument ?alias=true is a required acknowledgment that the operation is to be performed on an existing anchor stream, and the object specified by the included UUID must actually be an anchor stream in DX Storage. Failure to include the ?alias=true argument or perform a COPY on a stream that is not an anchor stream results in a 403 (Forbidden) response from DX Storage. 9.3. Normal Responses to COPY For a list of response headers, see Section 4.6, "Normal Response Headers". Copyright © 2010 Caringo, Inc. All rights reserved 36 Version 5.0 December 2010

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81

Copyright © 2010 Caringo, Inc.
All rights reserved
36
Version 5.0
December 2010
Chapter 9. SCSP COPY
The following topics in this chapter discuss details about SCSP COPY:
Section 9.1, “Introduction to COPY”
Section 9.2, “Unnamed Object COPY Details”
9.1. Introduction to COPY
This section discusses general information about SCSP COPY that applies to both named and
unnamed objects.
The COPY method copies the content metadata of an existing object verbatim.
The syntax of a COPY request is similar to that for an empty PUT request on anchor streams. An
example for an unnamed object follows. COPY for a named object is the same except you use the
object's name instead of a UUID on the first line of the command.
COPY /d5a7fc3fd6102a7c2e4ca4391b579996?alias=true HTTP/1.1
Host: cluster.example.com
Content-Length: 0
x-xml-meta-data-color: blue
x-xml-meta-data-weight: 42
x-xml-meta-data: <size>large</size><color>blue</color><specialorder/>
lifepoint: [Sunday, 06-Nov-2010 08:49:37 GMT] reps=3, deletable=no
lifepoint: [] delete
The Content-Length header is optional, but if supplied its value must be 0 because there is no
content body for a COPY request.
Any additional headers, like the two DX Storage-* headers in the example and the lifepoint headers,
can also be supplied with the request. These metadata headers replace all existing metadata
associated with the given anchor stream, with the exception of Content-length whose value
continues to provide the original length of the content data.
If the client provides a Content-MD5 header with the COPY request, DX Storage recomputes the
digest of the content data as it copies it and compare it with the provided MD5 hash. Other aspects
of the COPY method, including response codes, are the same as PUT. The COPY method returns a
response only after all the data has been copied and the anchor stream update is complete.
9.2. Unnamed Object COPY Details
The UUID returned after a successful COPY will be identical to the one supplied in the request, just
like a PUT or APPEND request.
The query argument
?alias=true
is a required acknowledgment that the operation is to be
performed on an existing anchor stream, and the object specified by the included UUID must
actually be an anchor stream in DX Storage.
Failure to include the
?alias=true
argument or perform a COPY on a stream that is not an anchor
stream results in a 403 (Forbidden) response from DX Storage.
9.3. Normal Responses to COPY
For a list of response headers, see
Section 4.6, “Normal Response Headers”
.