Storage Service API

The first 'release' of the storage service will support the following major features:

Major features not supported in the initial release, but planned for upcoming releases:

The storage service uses the following terminology:

The API supports a few useful conventions:

The Storage Service API

Resource: Items

<?xml version="1.0" encoding="UTF-8"?>
<RESULT>
   <FILENAME>aaa.txt</FILENAME>
   <PATH>aaa.txt</PATH>
   <TYPE>text/plain</TYPE>
   <ID>df970957-9a8c-4d5a-a7e8-92c4ea5f6e98</ID>
   <CREATED_BY>4806f1d0-5da3-11dd-bbf6-001d09a5d9db</CREATED_BY>
</RESULT>

The value in the ID element may be used to construct a GET that will retrieve the file.

<?xml version="1.0" encoding="UTF-8"?>
<RESULT>
   <FILENAME>aaa.txt</FILENAME>
   <PATH>aaa.txt</PATH>
   <TYPE>text/plain</TYPE>
   <ID>df970957-9a8c-4d5a-a7e8-92c4ea5f6e98</ID>
   <ALTID/>
   <CREATED_BY>4806f1d0-5da3-11dd-bbf6-001d09a5d9db</CREATED_BY>
   <HISTORY>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.0">Wed Nov 07 14:59:12 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.1">Wed Nov 07 15:12:42 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.2">Wed Nov 07 15:33:31 CST 2007</VERSION>
   </HISTORY>
</RESULT>

Because the file is posted asynchronously (continues to upload after the call completes), the TEMPID returned is just a placeholder, and cannot be used to retrieve the file once the upload is complete. Use the encoded-dirname form of the GET or HEAD request, which will always work.

<?xml version="1.0" encoding="UTF-8"?>
<RESULT>
   <FILENAME>aaa.txt</FILENAME>
   <PATH>aaa.txt</PATH>
   <TYPE>text/plain</TYPE>
   <ID>df970957-9a8c-4d5a-a7e8-92c4ea5f6e98</ID>
   <ALTID>3be4ed3f-572c-46d3-b826-b895f81a48de</ALTID>
   <CREATED_BY>4806f1d0-5da3-11dd-bbf6-001d09a5d9db</CREATED_BY>
   <HISTORY>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.0">Wed Nov 07 14:59:12 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.1">Wed Nov 07 14:59:27 CST 2007</VERSION>
     <VERSION name="1.2">Wed Nov 07 14:59:39 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.3">Wed Nov 07 14:59:48 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.4">Wed Nov 07 14:59:55 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.5">Wed Nov 07 15:00:03 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.6">Wed Nov 07 15:00:10 CST 2007</VERSION>
     <VERSION name="1.7">Wed Nov 07 15:00:18 CST 2007</VERSION>
   </HISTORY>
</RESULT>

<?xml version="1.0" encoding="UTF-8"?>
<RESULT>
   <FILENAME>aaa.txt</FILENAME>
   <PATH>aaa.txt</PATH>
   <TYPE>text/plain</TYPE>
   <ID>df970957-9a8c-4d5a-a7e8-92c4ea5f6e98</ID>
   <ALTID>3be4ed3f-572c-46d3-b826-b895f81a48de</ALTID>
   <CREATED_BY>4806f1d0-5da3-11dd-bbf6-001d09a5d9db</CREATED_BY>
   <HISTORY>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.0">Wed Nov 07 14:59:12 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.1">Wed Nov 07 14:59:27 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.2">Wed Nov 07 14:59:39 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.3">Wed Nov 07 14:59:48 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.4">Wed Nov 07 14:59:55 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.5">Wed Nov 07 15:00:03 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.6">Wed Nov 07 15:00:10 CST 2007</VERSION>
     <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.7">Wed Nov 07 15:00:18 CST 2007</VERSION>
   </HISTORY>
</RESULT>

HTTP/1.1 200 OK
Date: Wed, 17 Mar 2004 18:00:49 GMT
Server: Apache/2.0.48 (Unix) mod_ssl/2.0.48 OpenSSL/0.9.6l PHP/4.3.4
Last-Modified: Wed, 25 Feb 2004 22:37:23 GMT
CONTENT-TYPE : text/plain; charset=iso-8859-1
Content-Length : 45346
PERM-ITEM-ID : 4b90f328-e46f-4da3-b464-f915603afcf5
TEMP-ITEM-ID : 690236ea-e7c0-45c8-918d-1741b35eb83e
ITEM-NAME : testHeadItem.txt
ITEM-PATH : /abc/def/testHeadItem.txt
ITEM-VERSION : 1.0
ITEM-HISTORY :
<?xml version="1.0" encoding="UTF-8"?>
<HISTORY>
   <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.0">Tue Mar 25 13:58:16 CDT 2008</VERSION>
   <VERSION created_by="4806f1d0-5da3-11dd-bbf6-001d09a5d9db" name="1.1">Tue Mar 25 13:58:17 CDT 2008</VERSION>
</HISTORY>

HTTP/1.1 200 OK
Date: Wed, 17 Mar 2004 18:00:49 GMT
Server: Apache/2.0.48 (Unix) mod_ssl/2.0.48 OpenSSL/0.9.6l PHP/4.3.4
Last-Modified: Wed, 25 Feb 2004 22:37:23 GMT
CONTENT-TYPE : text/plain; charset=iso-8859-1
Content-Length : 765341
PERM-ITEM-ID : 4b90f328-e46f-4da3-b464-f915603afcf5
ITEM-NAME : testHeadItem.doc
ITEM-PATH : /abc/def/testHeadItem.txt
ITEM-VERSION : 1.7
HTTP/1.1 200 OK
Date: Wed, 17 Mar 2004 18:00:49 GMT
Server: Apache/2.0.48 (Unix) mod_ssl/2.0.48 OpenSSL/0.9.6l PHP/4.3.4
Last-Modified: Wed, 25 Feb 2004 22:37:23 GMT
CONTENT-TYPE : text/plain; charset=iso-8859-1
Content-Length : 765341
PERM-ITEM-ID : 4b90f328-e46f-4da3-b464-f915603afcf5
TEMP-ITEM-ID : 73c4196a2-3476-ae55-c600-dd5286d2e111
ITEM-NAME : testHeadItem.doc
ITEM-PATH : /abc/def/testHeadItem.txt
ITEM-VERSION : 1.7

Resource: Directories

<?xml version="1.0" encoding="UTF-8"?>
<RESPONSE>
   <dirname jcr:created="2008-04-27T13:17:27.640-05:00"
jcr:primaryType="nt:folder"
xmlns:BSG="http://storage.bsgplatform.com/bsg/1.0"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rep="internal"
xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
     <file1 jcr:created="2008-04-27T13:17:27.718-05:00" jcr:primaryType="nt:file">
       <jcr:content BSG:bsgguid="c29fad88-675a-42b0-ab80-0af36c6c3211"
jcr:baseVersion="de2d2dc3-16de-44d5-9f42-965da80b80bd"
jcr:data="JjonTEwyRlg7Ri5fRltZRDRcOiE2Vy5cMCteMzJeUCJJXEAkRzNFVTAxVT09JDdKJSk="
jcr:isCheckedOut="false"
jcr:lastModified="2008-04-27T13:17:27.625-05:00"
jcr:mimeType="text/plain" jcr:primaryType="nt:resource"
jcr:uuid="c29fad88-675a-42b0-ab80-0af36c6c3211" jcr:versionHistory="cbc018c5-40fd-48d5-b8f6-0dfc8740645b"/>
     </file1>
     <file2 jcr:created="2008-04-27T13:17:48.953-05:00" jcr:primaryType="nt:file">
       <jcr:content BSG:bsgguid="5bc2fecf-4376-4783-8d60-b7615e49ef60"
jcr:baseVersion="5c86b3c7-b279-4ddd-a63d-61cfc825b5b3"
jcr:data="Wk01WjJWLEJXXjtUKTIjPlNMLF45PFVJIDRaTF4pPjNII0kyJSosJDtUN19VWlxPKkk="
jcr:isCheckedOut="false"
jcr:lastModified="2008-04-27T13:17:48.953-05:00"
jcr:mimeType="text/plain" jcr:primaryType="nt:resource"
jcr:uuid="5bc2fecf-4376-4783-8d60-b7615e49ef60" jcr:versionHistory="99c559d9-07ed-4d44-8167-a99169c49939"/>
     </file2>
   </dirname>
</RESPONSE>

Resource: Tickets

<?xml version="1.0" encoding="UTF-8"?>
<ticket-url>http://storageauth.ngenplatform.com/items/df970957-9a8c-4d5a-a7e8-92c4ea5f6e98?ticket=ab992b23kdf3k33jk3k3j</ticket-url>

The value in the ticket-url element may be used to temporarily GET the specified item without providing a BSGRA_GUID header

Storage Service APIs yet to be published, in roughly this order:

  • search API
    • GET /items?parm1=val1&parm2=val2&parm3=val3&parm4=val4
  • account management/usage API
    • create new 'accounts' - track service accounts to S3 accounts for billing purposes
    • get usage stats - space, bandwidth, cost
  • taxonomy API
    • Generate and maintain a folder-like hierarchy, and allow the repository, search, account management and security APIs to access it
  • security API
    • Generate and maintain ACLs
  • docType API
    • Generate and maintain custom document types (i.e. sets of properties that are supported and searchable)