OpenIO RAWX API

Julien Kasarherou edited this page Jun 13, 2016 · 9 revisions

RAWX services manage chunks of data, and accept a subset of WebDAV.

  • PUT
  • GET
  • DELETE Ranges accepted.

Uploading a chunk

Request Headers

  • http prefix: X-oio-chunk-meta
  • xattr prefix: user.grid.
HTTP XATTR
container-id content.container
content-id content.id
content-path content.path
content-version content.version
content-storage-policy content.storage-policy
content-chunk-method content.chunk_method
metachunk-size metachunk.size
metachunk-hash metachunk.hash
chunk-id chunk.id
chunk-hash chunk.hash
chunk-pos chunk.position
chunk-size chunk.size
Name location Description
container-id header 64 hexa chars: [0-9a-fA-F]{64}
content-id header ([0-9a-fA-F]{2})+, the unique content-ID
content-path header valid UTF-8, the name of the alias linked to the content
content-version header natural number, the version of the alias
content-storage-policy header [-_0-9a-zA-Z]+
content-chunk-method header [-_
metachunk-size header,trailer natural integer, only makes sense for ec/* chunk methods
metachunk-hash header,trailer hexa characters, only makes sense for ec/* chunk methods
chunk-id header if present, must match the chunk id in the URL (auto)
chunk-pos header hexa characters
chunk-hash header,trailer hexa characters (auto)
chunk-size header,trailer natural integer (auto)

Example

PUT /AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HTTP/1.1
Host: 127.0.0.1:6010
Accept-Encoding: identity
transfer-encoding: chunked
x-oio-chunk-meta-container-id: 9006CE70B59E5777D6BB410C57944812EB05FCDB5BA85D520A14B3051D1D094F
x-oio-chunk-meta-content-id: 97602A03263505000E25C041316D7296
x-oio-chunk-meta-content-version: 1465811478961426
x-oio-chunk-meta-content-storage-policy: SINGLE
x-oio-chunk-meta-content-chunk-method: plain/nb_copy=1
x-oio-chunk-meta-content-path: passwd
x-oio-chunk-meta-chunk-id: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
x-oio-chunk-meta-chunk-pos: 0
HTTP/1.1 201 Created
Date: Fri, 30 Oct 2015 00:31:51 GMT
Server: Apache
Location: http://127.0.0.1:6010/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
X-oio-chunk-meta-container-id: 9006CE70B59E5777D6BB410C57944812EB05FCDB5BA85D520A14B3051D1D094F
X-oio-chunk-meta-content-id: 97602A03263505000E25C041316D7296
X-oio-chunk-meta-content-version: 1465811478961426
X-oio-chunk-meta-content-storage-policy: SINGLE
X-oio-chunk-meta-content-chunk-method: plain/nb_copy=1
X-oio-chunk-meta-content-path: passwd
X-oio-chunk-meta-chunk-id: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
X-oio-chunk-meta-chunk-size: 1552
X-oio-chunk-meta-chunk-hash: 8C242C6301765ACF942B3C7E83A56ABD
X-oio-chunk-meta-chunk-pos: 0
Content-Length: 237
Content-Type: text/html; charset=ISO-8859-1

Downloading a chunk

Example

In the same way, we want to download our chunk.

GET /AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HTTP/1.1
Host: 127.0.0.1:6010
Accept-Encoding: identity
Range: bytes=0-1551
HTTP/1.1 206 Partial Content
Date: Fri, 06 Nov 2015 01:09:48 GMT
Server: Apache
Last-Modified: Fri, 06 Nov 2015 00:47:02 GMT
ETag: "523D494EB124D"
Accept-Ranges: bytes
Content-Length: 1552
X-oio-chunk-meta-container-id: 9006CE70B59E5777D6BB410C57944812EB05FCDB5BA85D520A14B3051D1D094F
X-oio-chunk-meta-content-id: 97602A03263505000E25C041316D7296
X-oio-chunk-meta-content-version: 1465811478961426
X-oio-chunk-meta-content-storage-policy: SINGLE
X-oio-chunk-meta-content-chunk-method: plain/nb_copy=1
X-oio-chunk-meta-content-path: passwd
X-oio-chunk-meta-chunk-id: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
X-oio-chunk-meta-chunk-size: 1552
X-oio-chunk-meta-chunk-hash: 8C242C6301765ACF942B3C7E83A56ABD
X-oio-chunk-meta-chunk-pos: 0
Content-Range: bytes 0-1551/1552

Deleting a chunk

Example

DELETE /AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HTTP/1.1
Host: 127.0.0.1:6008
Content-Length: 0
User-Agent: python-requests/2.8.1
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate
HTTP/1.1 204 No Content
Date: Fri, 06 Nov 2015 01:17:28 GMT
Server: Apache
Content-Length: 0
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive

Deprecated

HTTP XATTR
content-size content.size
content-nbchunks content.nbchunk
content-mime-type content.mime_type
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.