Dell DX6004S DX Object Storage Application Guide - Page 9

Universal Resource Identifiers URIs

Page 9 highlights

If you are not sure how to create a domain, see the DX Object Storage Administration Guide or contact your cluster administrator. The following examples assume that the domain is named test.example.com and that you are sending commands to a node whose IP address is 172.16.0.35. You must send the domain name as the Host in each request. To create a bucket and objects: 1. Create a bucket: curl -i -L -d '' --post301 http://172.16.0.35/bucket -D createbucket.log 2. Create a named object in the bucket. curl -i -L -d "Hello world" http://172.16.0.35/ bucket/test.html -H "Content-type: text/html" --post301 -D createobject.log 3. Verify the object in a web browser. Start a web browser and enter the following in its address or location field: http://172.16.0.35/bucket/test.html 4. Change the object by adding data to it. curl -i -L -X APPEND -d "...to be continued..." http://172.16.0.35/ bucket/test.html -H "Content-type: text/html"--post301 -D updateobject.log 5. Refresh your web browser to see the updated object. 1.7. Universal Resource Identifiers (URIs) Possession of an object's name or UUID is a necessary and sufficient condition to identify the object to any DX Storage cluster that holds at least one replica of it. To retrieve the object over a network, it is also necessary to address the cluster and specify a protocol over which the data is to be delivered. Uniform Resource Identifiers, as defined in RFC 2396, allows all three of those components, the protocol, the cluster name, and the object name or UUID, to be specified in a compact textual form. An unnamed object can be accessed by its UUID: http://companyname.example.com/12BFEA648C2697A56FD5618CAE15D5CA This URI specifies the protocol, http, the cluster, companyname.example.com, and the UUID, 12BFEA648C2697A56FD5618CAE15D5CA. A named object can be accessed using its symbolic name: http://cluster.example.com/marketing/ads/promotions/named-objects.m4v In the named object example, cluster.example.com is the name of a domain, marketing is the name of a bucket, and /ads/promotions/named-objects.m4v is the name of an object. Copyright © 2010 Caringo, Inc. All rights reserved 4 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
4
Version 5.0
December 2010
If you are not sure how to create a domain, see the DX Object Storage Administration Guide or
contact your cluster administrator.
The following examples assume that the domain is named
test.example.com
and that you are
sending commands to a node whose IP address is 172.16.0.35. You must send the domain name
as the Host in each request.
To create a bucket and objects:
1. Create a bucket:
curl -i -L -d '' --post301 http://172.16.0.35/bucket -D create-
bucket.log
2. Create a named object in the bucket.
curl -i -L -d "<html><h1>Hello world</h1></html>" http://172.16.0.35/
bucket/test.html -H "Content-type: text/html" --post301 -D create-
object.log
3. Verify the object in a web browser.
Start a web browser and enter the following in its address or location field:
4. Change the object by adding data to it.
curl -i -L -X APPEND -d "...to be continued..." http://172.16.0.35/
bucket/test.html -H "Content-type: text/html"--post301 -D update-
object.log
5. Refresh your web browser to see the updated object.
1.7. Universal Resource Identifiers (URIs)
Possession of an object’s name or UUID is a necessary and sufficient condition to identify the
object to any DX Storage cluster that holds at least one replica of it. To retrieve the object over a
network, it is also necessary to address the cluster and specify a protocol over which the data is
to be delivered. Uniform Resource Identifiers, as defined in
RFC 2396
, allows all three of those
components, the protocol, the cluster name, and the object name or UUID, to be specified in a
compact textual form.
An unnamed object can be accessed by its UUID:
This URI specifies the protocol,
http
, the cluster,
companyname.example.com
, and the UUID,
12BFEA648C2697A56FD5618CAE15D5CA
.
A named object can be accessed using its symbolic name:
In the named object example,
cluster.example.com
is the name of a domain,
marketing
is the
name of a bucket, and
/ads/promotions/named-objects.m4v
is the name of an object.