Content Addressable Storage

Massive Array of Idle Disks

Hierarchical Storage Management

Welcome

Welcome to the Diomede Storage API (Application Programming Interface). Diomede was intentionally built to be very easy-to-use. You can use a minimal feature set to get started quickly, and then explore some of the more advanced options as needed.

All of Diomede's functionality is accessible via our API - everything from creating new accounts and uploading, to file replication and detailed reports of real-time power consumption on a per-file basis.

Service Endpoints

Diomede Storage can be accessed programmatically via REST (HTTP/XML), SOAP, or Microsoft's WCF protocols. Each protocol provides full access to Diomede's functionality.

REST endpoints:

http://rest.diomedestorage.com/1.1/Service.svc/
https://rest.diomedestorage.com/1.1/Service.svc/ (SSL)

http://rest.diomedestorage.com/1.1/Transfer.svc/
https://rest.diomedestorage.com/1.1/Transfer.svc/ (SSL)

WCF service endpoints:

http://service.diomedestorage.com/1.1/
https://service.diomedestorage.com/1.1/ (SSL)

http://transfer.diomedestorage.com/1.1/
https://transfer.diomedestorage.com/1.1/ (SSL)

SOAP endpoints (WSDL):

http://service.diomedestorage.com/1.1/DiomedeStorageService.svc?wsdl
https://service.diomedestorage.com/1.1/DiomedeStorageService.svc?wsdl (SSL)

http://transfer.diomedestorage.com/1.1/DiomedeStorageTransfer.svc?wsdl
https://transfer.diomedestorage.com/1.1/DiomedeStorageTransfer.svc?wsdl (SSL)

Command line:

Diomede can also be accessed via a scriptable, command-line interface, DioCLI (available on Windows, Linux, and OSX).

Type HELP from within DioCLI to review the following list of commands. Type HELP <command name> (e.g. HELP SEARCHFILES) for more

Diomede:\jeffb> HELP

 User management:
 CREATEUSER                Create a new Diomede user.
 CHANGEPASSWORD            Change your password.
 RESETPASSWORD             Reset your password.
 LOGIN                     Logs onto to the Diomede service.
 LOGOUT                    Logs out from the Diomede service.
 SETUSERINFO               Updates information for the current user.
 GETUSERINFO               Returns your user information.
 DELETEUSERINFO            Delete your user information field(s).
 DELETEUSER                Delete the currently logged in user.
 GETALLEMAILS              Returns your email addresses.
 ADDEMAIL                  Add an email for the currently logged in user.
 DELETEEMAIL               Deletes an email from the currently logged in user.
 SETPRIMARYEMAIL           Set your primary email address.

 Uploading & Downloading:
 UPLOAD                    Upload files to Diomede.
 RESUME                    Resume uploading files to Diomede.
 DOWNLOAD                  Download a file from Diomede.
 GETUPLOADTOKEN            Returns a token to use for alternate upload methods.
 GETDOWNLOADURL            Returns a url for downloading a file.

 File operations:
 SEARCHFILES               Returns files matching the input filter.
 SEARCHTOTAL               Returns a file aggregation matching a filter.
 SEARCHTOTALLOG            Returns aggregates for upload and download data.
 DELETE                    Deletes a file.
 UNDELETE                  Undeletes a file.
 RENAME                    Renames a file.
 TYPE                      Display a range of file contents to stdout.

 Metadata operations:
 CREATEMETADATA            Create metadata.
 CREATEFILEMETADATA        Create a new metadata for a file.
 SETFILEMETADATA           Set an existing metadata for a file.
 GETMETADATA               Get metadata.
 GETFILEMETADATA           Get file metadata.
 DELETEFILEMETADATA        Delete file metadata.
 DELETEMETADATA            Delete metadata.
 EDITMETADATA              Edit metadata.

 Replication management:
 REPLICATE                 Replicate a file.
 UNREPLICATE               Unreplicate a file.
 GETPHYSICALFILES          Get physical file info for a logical file.
 GETSTORAGETYPES           Returns the available storage types.

 Replication policy management:
 CREATERP                  Create a replication policy.
 GETRPS                    Returns all replication policies.
 EDITRP                    Edit a replication policy.
 DELETERP                  Deletes a replication policy.
 SETRP                     Set an existing replication policy for a file.
 SETDEFAULTRP              Set the default replication policy.
 GETDEFAULTRP              Returns the default replication policy.

 Log access:
 SEARCHLOGINS              Search the login log.
 SEARCHUPLOADS             Search the upload log.
 SEARCHDOWNLOADS           Search the download log.

 Product information access:
 SETBILLINGINFO            Set your billing information.
 GETBILLINGINFO            Return the billing data for the current user.
 DELETEBILLINGINFO         Delete the user info field for the current user.
 GETALLPRODUCTS            Returns all the Diomede products.
 PURCHASEPRODUCT           Purchase a Diomede product.
 GETMYPRODUCTS             Returns the logged in user's Diomede products.
 CANCELPRODUCT             Cancels a product.
 GETALLCONTRACTS           Returns all the Diomede contracts.
 PURCHASECONTRACT          Purchase a Diomede contract.
 GETMYCONTRACTS            Returns the logged in user's Diomede contracts.
 CANCELCONTRACT            Cancels a contract.
 SEARCHINVOICES            Search the invoices.

 DioCLI client-only commands:
 HELP                      Show usage information for DioCLI commands.
 ABOUT                     Shows general information about DioCLI.
 EXIT                      Exit the Diomede Command Line interface.
 CLS                       Clear the Diomede Command Line interface.
 REM                       Indicates a remark to follow.
 ECHO                      Changes the command echoing setting.
 SETCONF                   Set a configuration option.
 SESSIONTOKEN              Returns the current session token.
 CHECKACCOUNT              Checks account subscription status on login.
 SUBSCRIBE                 Calls SETBILLINGINFO and PURCHASEPRODUCT.

Diomede:\steve14>                    

Sample Code

Below are some open source projects and code examples that utilize Diomede. Most licensed under the New BSD licence so can be used in open source and commercial applications.


Project Name Technologies Used Diomede functions implemented
DioCLI C++, SOAP, gSOAP, OpenSSL Almost all.
DioExplorer C#, Winform, .NET 3.5, WCF Almost all.
Sample C# SDK C#, DLL/SDK, .NET 3.5, WCF Almost all.

Getting Started

Diomede supports a number of objects that can be accessed and manipulated via our API. This API enables comprehensive access to all of Diomede's functionality so applications can have seamless integration with Diomede and also gain full visibility into Diomede's backend and care of your files. With Diomede, you always know exactly what is happening with all of your data. You can get started by just understanding the basic User and Logical File objects, and then later study the optional Diomede objects as needed.

User Accounts

A Diomede user account contains all of the user’s Diomede objects (files, metadata, settings, user information, etc) and provides an authentication mechanism to gain access to those objects. A program may have a dedicated Diomede account for its own use and never expose the Diomede implementation to the end user, or the program may serve as a front-end to allow users to create and manipulate their own Diomede accounts.

Authentication

Certain methods do not require requests to be authenticated, like CreateUser, Login, or GetStorageTypes. However, most methods do require authenticated requests in the form of a session token. A Diomede session token is a string that looks like this:

Sample session token: d6ebb2f9914c41bca5f9ec5db6e4f8d3

A session token is returned from a successful Login request (submit username and password to the service, and the service returns a session token). A session token is valid for at least 10 minutes from its creation or last use.

Uploading

There are two steps to upload a new file to Diomede:

1. Create a new logical file on Diomede.
2. Upload data to that new logical file.

Create a new logical file. To upload a file to a Diomede Storage account, first create a new logical file object on Diomede that will recieve your uploaded data. An empty logical file object can be created by calling CreateFile. The CreateFile method returns a new logical file ID, that can then be used on subsequent calls to reference this new logical file. Because Diomede is a fully Content Addressible Storage (CAS) system, the filename parameter on CreateFile is optional, but if you have a filename available it's recommended that you send that too as it tends to keep things a little simpler for Diomede clients that may not leverage CAS features.

Upload data in "chunks". Then, you can upload data to this new logical file by calling Upload. The Upload method accepts the destination offset and length for the chunk/buffer that you are currently uploading. To upload large files (Diomede supports files up to 1,024 GB (1 terabyte)), just send sequential chunks of the file until the whole is complete. Each chunk can be up to 2 GB, but it recommended that much smaller chunks are used.

Determining "chunk" sizes. For low speed Internet connections (e.g. < T3, 50 mbps) a chunk size between 64KB to 256KB is probably a good place to start testing. The optimal chunk size will depend on the client's specific connection to Diomede and other Internet traffic at the time (but don't worry, picking one static chunk size will generally provide pretty good efficiency). Currently, Diomede supports only one connection per file upload at a time. If a second connection to the same logical file is made while an upload or edit is in progess, it will be rejected. Note: a multithreaded application can upload multiple files simultenously, but it can not have multiple threads writing to the same file.

Set "isComplete" on last chunk. When you are uploading the last chunk of a file, or have completed editing a file, set the isComplete flag to true. Once set, the file will be available for download, replication for that file will start, and regular file "exercise" will begin to insure and maintain data integrity.

Uploading small files. Diomede's SOAP/WCF interface also supports the UploadWithCreateFile method for uploading small files (e.g. files < 256KB) in one call. It's input parameters are a combination of CreateFile and Upload, and does not support multiple chunks. This is a good method to use if you know your upload is going to be completed in one chunk. To edit or later grow this file, you can later call the Upload method.

SOAP/WCF uploading considerations. Uploading using SOAP/WCF is straightforward and, in general, the default settings can be used with most libraries. One exception is that you may want to increase the default maximum message size if you're uploading large chunks. For example, Microsoft .NET sets the maxBufferSize at 64KB (in the autogenerated app.config), but you may want to set this as large as several megabytes if you have a fast connection to Diomede.

REST/HTTP uploading considerations. The parameters for the Upload method are to be appended to the Upload URI (e.g. /upload?fileid=914&offset=8276301&etc...), and the file contents are sent via POST using a content type of "multipart/form data". Also required is a Content-Length header specifing the length of the entire HTTP request.

For example, here is a proper HTTP upload request as constructed by the cURL library with the -F flag (cURL help: -F/--form <name=content> Specify HTTP multipart POST data (H)):

POST /1.1/Transfer.svc/3613b7eed2a04a10845ca5d43418f435/lfile/upload?fileid=1&offset=0&length=1024&iscomplete=True HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Expect: 100-continue
Content-Length: 1236
Content-Type: multipart/form-data; boundary=----------------------------c8a226fa519d
(1,024 bytes of data to follow)

Note, that the Content-Length specified in the header is greater than the length of the actual file being uploaded (which is exactly 1,024 bytes) because the Content-Length also includes the size of the header and any associated encoding. Also note that the Content-Type specifies "multipart/form-data" with a "boundary" of "----------------------------c8a226fa519d". That boundary label will specify the begining and the end of a chunk, and therefore that sequence of characters can not appear anywhere in the data to be uploaded.

Whew. That HTTP stuff may sound fragile and complicated, but don't worry because the details of constructing such a request are typically hidden by the library you'll use to construct the request. Uploading a file to Diomede is really quite simple and we're happy to help if you need it. But we thought we'd disect the gory details in case you were interested.

Downloading

Diomede will generate URLs for stored logical files by calling GetDownloadUrl. The returned URLs are in the format of:
http://<Diomede server>.diomedestorage.com/dl/<download token>/<filename>

Download tokens. A unqiue download token is generated for each new GetDownloadUrl request. Unless specified in the request, download token do not expire, so that can be used as a permenant URL to a particular logical file.

HTTP Range header is supported. If provided, Diomede's servers will honor HTTP Range requests for these download URLs. This allows specific parts of a file to be downloaded. This also enables support for "downloading resuming" functionality that is implemented in many popular download managers.

The content type of the response will be determined by the file extension (if any) of the logical file being requested. Diomede currently maps these following file extensions (click to view).

Logical Files

Diomede logical files are the primary objects that a program creates and manipulates when storing data on Diomede. These are the files that you see and use when you upload, search, request to download, etc.

The physical data components of logical files (the actual bits on a disk or tape) are represented by physical files, which are discussed in more detail below. Briefly: The default replication policy creates three physical files for each logical file. The concept is similar to disk array abstraction, but at a file level. For example, you may have one logical disk volume, but that may be a RAID disk array that was actually created using several physical hard disks. The number of physical files stored per logical file, and the type of storage (e.g. Online, Nearline, or Offline) that each physical file is stored on, can be adjusted on a per file basis (using Replicate and Unreplicate), or by creating new replication policies. If necessary, this allows you to tune Diomede's performance to your specific application's requirements and to reduce storage costs.

Response Codes

The response mechanism varies slightly between the REST and SOAP/WCF endpoints:

REST response codes.
The REST API returns standard HTTP return codes as defined by RFC 2616. For example, a successful call to CreateUser returns 201 (Created) with no contents in the response body, and a successful DeleteFile returns 200 (OK) with no contents in the response body.

Some Diomede methods will also return additional information in the response body in XML. This returned XML can be (1) serialized into objects you can manipulate, (2) queried directly via technologeis like Microsoft's Linq to XML, or (3) manually parsed to find the specific values you need. For example, a successful SearchFiles query will with a result code of 200 (OK) and a body with a set of matching Logical File objects in XML. A successful Login has result code 200 (OK) and the body contains a new session token to use. Example successful responses values and bodies for each method are below.

WCF response via exception.
Diomede's WCF interface leverages Microsoft's exception handling framework to return errors. If a request was successful, no exception will be thrown and data will be returned as defined in the method prototype (of course no data will be returned if the method prototype has a "void" return type.) Returned objects are "ready to use" and their data members are bound to the appropriate data type; this is one benefit that is gained from the overhead associated with SOAP & WCF).

Advanced Features

Note: There are several additional objects and concepts presented below, but they are all optional. To use Diomede, and gain access to the best Internet storage service available, all a program needs to be capable of is authenticating a user account and uploading and downloading logical files (discussed above). There are some additional neat and powerful objects presented below to maximize your use of Diomede, but again, they are optional so please don’t let all these gory details scare you away. You can start with the core concepts and functions present above, and then move forward with the more advanced functionality as necessary.

We made the decision to expose all of the Diomede backend processes and objects (like physical files, storage type, exercising of files, and more) to the end user so you'd always know exactly what is happening with your data. There is no second guessing or marketing spin on how your data is being managed and continuously cared for by Diomede - you can query the service yourself and see. This also gives you an unmatched ability to tweak and modify these settings for your particular application, if needed.

Content Addressible Storage (CAS).
Diomede supports a fully Content Addressible Storage (CAS) model, and logical files can be referenced by their MD5 hash, SHA1 hash, or Diomede-assigned FileID (an index that starts at 1 and auto-increments with each new logical file).

Physical files.
Physical file objects represent the physical, separate instances of data that Diomede manages for each logical file. Multiple physical copies of a file maintain the data integrity of stored files. A Diomede logical file can be represented by 1 to 15 physical files. 3 physical files is the default (and recommended) number of physical files created for all new logical files.

You can manage physical file creation two ways:
1. Manual physical file creation. You can manually issue individual Replicate and Unreplicate requests to create or delete physical file copies. Note that Replicate accepts a LogicalFileID as input, and the Unreplicate accepts a PhysicalFileId as input.
2. Replication Policies. You can create ReplicationPolicies to have the same set of rules apply to a set of files. This is convienent for managing sets of data that has the same data retention and integrity requirements. You may just need one replicatiopn policy (the default) for all the files in our account, but the flexibilty is there if needed.

Replication Policies.
A ReplicationPolicy is a Diomede rule set that is applied to a logical file or set of logical files to automatically control the number of physical files creating for each a logical file.

By default, all new logical files are assigned to ReplicationPolicy ID #1. You can edit this ReplicationPolicy if the default parameters do not meet your requirements, or you can create a new ReplicationPolicy and assign its ID to be the default replication policy ID by calling the SetDefaultReplicationPolicy function.

Replication Policy "Trigger State." Replication Policies control two states of a logical file: the first default state is applied immediately when the logical file is created (e.g. upon upload), and the second optional state is applied after the specified number of “TriggerHours” has elapsed since the creation of the logical file. If the TriggerHours is set to 0 (none), then the first default state will always apply and all Trigger parameters are ignored.

For the default state and the Trigger state, you can request a specific number of copies of physical files to be created for each available Diomede Storage Type.

Replication Policy constraints. A replication policy must specify a total of at least 3 physical file copies (of any type) for each state (default and trigger), and can not specify more than 5 copies for any single storage type. For example, 1 Online and 2 Offline is a valid ReplicationPolicy specification, but just 1 Online copy is not valid. Further, 5 Online, 5 Nearline, and 5 Offline is valid (15 total copies of the file), but 6 Online is not.

Diomede ninjas: If you know what you’re doing and you’d really like to be able to create a replication policy with less than 3 physical files, please email support@diomedestorage.com to lower this constraint.

The default Replication Policy. The default replication policy for all new accounts is:

Default Online: 3
Default Nearline: 0
Default Offline 0:

Trigger Hours: 2160 (90 days)
Trigger Online: 0
Trigger Nearline: 0
Trigger Offline: 3

This means that upon file creation, Diomede will store 3 physically separate Online copies of each logical file. After 90 days since their last read/download, Diomede will automatically move those 3 copies to 3 physically separate Offline copies (at all times there will be at least 3 copies of the file). Once “offline”, the data integrity will remain high and secure, but the files will consume much less power and will be much less expensive to maintain. Note: if a file needs to be read but all of its copies are offline, then it may take up to 4 hours (though typically much faster) to create a new online copy that can be read/downloaded. If those performance requirements do not meet your specific needs, you can adjust the number and type of physical file copies using the Replicate function or ReplicationPolicy objects as discussed above.

Metadata.
Independent of logical file objects, Diomede allows the creation of user-defined Metadata objects (name/value pairs) that can be associated with a file or sets of files. This can aid in storing some application specific data "in the cloud" to avoid having to maintain and reference a 2nd service that you'd need to maintain in certain instances.

Metadata objects are simply user defined name/value pairs (e.g. BackupSet:914, Artist:Britney, etc). Assigning metadata to logical file objects also enables searching for logical file records by their metadata objects (e.g. return all logical files with the metadata "DBSnapshot:7b").

System Capacities and Constraints

Maximum file size: 1,024 GB (1 terabyte)
Maximum number of logical files per account: 100 billion files
Maximum total storage capacity per account: 100 zetabytes
Maximum account password length: 30 characters

Maximum time to start replication from Offline Storage: 4 hours (average: 10 minutes)
Maximum time to start replication from Nearline Storage: 5 minutes (average: 1 minute)

Maximum number of physical files per logical file: 15
Minimum number of physical files per logical file: 3 (default, request to lower if needed)

Maximum filename length: 256 characters
Maximum metadata name length: 128 characters
Maximum metadata value length: 256 characters
Maximum number of metadata objects assigned to a single logical file: 512



User Management Methods

Create User

SOAP/WCF Method: CreateUser

REST URL: http://rest.diomedestorage.com/Service.svc/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/?username={username}&password={password}&email={email}

Parameters (applies to both SOAP & REST methods):

usernamestringDiomede account username.
passwordstringDiomede account password.
emailstringThe email address associated with your Diomede account and stored in your Diomede user information.

HTTP Method: POST

Format: XML

Sample cURL command:
curl -v -d "" "http://rest.diomedestorage.com/1.1/Service.svc/?username=dct-0-fnwieig2&password=password123&email=dct-0-fnwieig2@diomedestorage.com"

Sample HTTP request:
POST /1.1/Service.svc/?username=dct-0-fnwieig2&password=password123&email=dct-0-fnwieig2@diomedestorage.com HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 201 Created
Cache-Control: private
Location: http://rest.diomedestorage.com/1.1/Service.svc/dct-0-fnwieig2/?password=password123
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Delete User

SOAP/WCF Method: DeleteUser

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).

HTTP Method: DELETE

Format: XML

Sample cURL command:
curl -v -X DELETE "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/user"

Sample HTTP request:
DELETE /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/user HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Change Password

SOAP/WCF Method: ChangePassword

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/password/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/password/?oldpassword={oldPassword}&newpassword={newPassword}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
oldPasswordstringThe current Diomede account password.
newPasswordstringThe new desired Diomede account password.

HTTP Method: PUT

Format: XML

Sample cURL command:
curl -v -d "" -X PUT "http://rest.diomedestorage.com/1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/password/?oldpassword=password123&newpassword=newpword123"

Sample HTTP request:
PUT /1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/password/?oldpassword=password123&newpassword=newpword123 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Reset Password

SOAP/WCF Method: ResetPassword

REST URL: http://rest.diomedestorage.com/Service.svc/{username}/password

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{username}/password

Parameters (applies to both SOAP & REST methods):

usernamestringDiomede account username.

HTTP Method: DELETE

Format: XML


Login

SOAP/WCF Method: Login

REST URL: http://rest.diomedestorage.com/Service.svc/{username}/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{username}/?password={password}

Parameters (applies to both SOAP & REST methods):

usernamestringDiomede account username.
passwordstringDiomede account password.

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/dct-0-fnwieig2/?password=password123"

Sample HTTP request:
GET /1.1/Service.svc/dct-0-fnwieig2/?password=password123 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 131
<LoginResponse xmlns="http://data.diomedestorage.com">
<sessionToken>9e71e7e206ed43978564c101c41918c3</sessionToken>
</LoginResponse>


Logout

SOAP/WCF Method: Logout

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).

HTTP Method: DELETE

Format: XML

Sample cURL command:
curl -v -X DELETE "http://rest.diomedestorage.com/1.1/Service.svc/da44a8fec0704d419aa40751bbc2d2a0"

Sample HTTP request:
DELETE /1.1/Service.svc/da44a8fec0704d419aa40751bbc2d2a0 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)



Upload Methods

Create File

SOAP/WCF Method: CreateFile

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/{filename}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/{filename}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
filenamestringFilename as stored on Diomede.

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Transfer.svc/9e71e7e206ed43978564c101c41918c3/lfile/MyFilename.dat"

Sample HTTP request:
GET /1.1/Transfer.svc/9e71e7e206ed43978564c101c41918c3/lfile/MyFilename.dat HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 201 Created
Cache-Control: private
Transfer-Encoding: chunked
Content-Type: application/xml; charset=utf-8
Location: http://rest.diomedestorage.com/1.1/Transfer.svc/9e71e7e206ed43978564c101c41918c3/lfile/?offset=0&page=1&fileid=2
Server: Microsoft-IIS/7.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
<CreateFileResponse xmlns="http://data.diomedestorage.com">
<newFileID>2</newFileID>
</CreateFileResponse>


Upload

SOAP/WCF Method: Upload

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/upload

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/upload?fileid={fileID}&offset={offset}&length={bufferLength}&iscomplete={isComplete}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
fileIDint64The logical file ID.
offsetint64Starting index (from 0) for paged results.
bufferLengthint32The size of this buffer.
isCompleteboolTRUE=ONLY complete files, FALSE=only NOT complete files, not specified=ALL files.

HTTP Method: POST

Format: XML

Sample cURL command:
curl -v -F "file=@c:\2asfw5b0.curlgen.dat" "http://rest.diomedestorage.com/1.1/Transfer.svc/9e71e7e206ed43978564c101c41918c3/lfile/upload?fileid=1&offset=0&length=1024&iscomplete=True"

Sample HTTP request:
POST /1.1/Transfer.svc/9e71e7e206ed43978564c101c41918c3/lfile/upload?fileid=1&offset=0&length=1024&iscomplete=True HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 1236
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------f755ac50926e

Sample HTTP response:
HTTP/1.1 100 Continue
HTTP/1.1 200 OK
Cache-Control: private
Server: Microsoft-IIS/7.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)



Download Methods

Get Download URL

SOAP/WCF Method: GetDownloadURL

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/url/{fileID}/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/url/{fileID}/?maxdownloads={maxDownloads}&errorredirect={errorRedirect}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
fileIDint64The logical file ID.
maxDownloadsint32Maximum number times this download token can be used. Not specified = unlimited.
errorRedirectstringThe URL to redirect to if the download token fails (max uses exceeded, expired, etc).

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/lfile/url/1/?"

Sample HTTP request:
GET /1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/lfile/url/1/? HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 176
<GetDownloadURLResponse xmlns="http://data.diomedestorage.com">
<url>http://dio314.diomedestorage.com/dl/51RHQVO77GZQV6ESNHF3/2asfw5b0.curlgen.dat</url>
</GetDownloadURLResponse>


Download

SOAP/WCF Method: Download

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/{fileID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/{fileID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
fileIDint64The logical file ID.

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/lfile/1"

Sample HTTP request:
GET /1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/lfile/1 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=utf-8
Location: http://dio314.diomedestorage.com/dl/6NHBG5I68QJHUXRQKCGJ/2asfw5b0.curlgen.dat
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 194
<html>
<head>
<title>Object moved</title>
</head>
<body> <h2>Object moved to <a href="http://dio314.diomedestorage.com/dl/6NHBG5I68QJHUXRQKCGJ/2asfw5b0.curlgen.dat">here</a>
.</h2>
</body>
</html>



O Auth Management Methods

Create O Auth Secret And Key

SOAP/WCF Method: CreateOAuthSecretAndKey

REST URL: http://rest.diomedestorage.com/Service.svc/oauth/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/oauth/?username={username}&password={password}

Parameters (applies to both SOAP & REST methods):

usernamestringDiomede account username.
passwordstringDiomede account password.

HTTP Method: POST

Format: XML


Get O Auth Secret And Key

SOAP/WCF Method: GetOAuthSecretAndKey

REST URL: http://rest.diomedestorage.com/Service.svc/oauth/{oauthID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/oauth/{oauthID}

Parameters (applies to both SOAP & REST methods):

oauthIDint32A Diomede-created ID that is assigned to each Oauth key/secret pair created.

HTTP Method: GET

Format: XML



File Management Methods

Search Files

SOAP/WCF Method: SearchFiles

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/?fileid={fileID}&getpfs={getPhysicalFileInfoBool}&filename={filename}&hashmd5={hashMD5}&hashsha1={hashSHA1}&minsize={minSize}&maxsize={maxSize}&startdate={startDate}&enddate={endDate}&isdeleted={isDeleted}&iscomplete={isComplete}&metaname={metaName}&metavalue={metaValue}&offset={offset}&page={pageSize}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
fileIDint64The logical file ID.
getPhysicalFileInfoBoolboolSpecifies if physical file information should also be returned with the results. Retrieving this information slightly slows down queries, so only use when necessary.
filenamestringFilename as stored on Diomede.
hashMD532 char HEX stringMD5 hash.
hashSHA140 char HEX stringSHA1 hash.
minSizeint64Minimum file size in bytes.
maxSizeint64Maximum file size in bytes.
startDatedateStart date (yyyy-mm-dd hh-mm-ss).
endDatedateEnd date (yyyy-mm-dd hh-mm-ss).
isDeletedboolTRUE=ONLY deleted files, FALSE=only NOT deleted files, not specified=ALL files.
isCompleteboolTRUE=ONLY complete files, FALSE=only NOT complete files, not specified=ALL files.
metaNamestringMetadata name data.
metaValuestringMetadata value data.
offsetint64Starting index (from 0) for paged results.
pageSizeint64Number of results to return (this page's size).

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/lfile/?getpfs=true&offset=0&page=3"

Sample HTTP request:
GET /1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/lfile/?getpfs=true&offset=0&page=3 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 932
<LogicalSearchFilesResult xmlns="http://data.diomedestorage.com">
<logicalFiles xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<RestLogicalFile>
<fileID>1</fileID>
<fileName>2asfw5b0.curlgen.dat</fileName>
<hashMD5/>
<hashSHA1/>
<fileSize>1024</fileSize>
<createdDate>2010-01-31T00:50:33.64</createdDate>
<lastModifiedDate>2010-01-31T00:50:33.64</lastModifiedDate>
<lastAccessDate i:nil="true"/>
<isDeleted>false</isDeleted>
<power>0.02354541</power>
<isComplete>true</isComplete>
<replicationPolicyID>1</replicationPolicyID>
<physicalFiles>
<PhysicalFileInfo>
<physicalFileID>1</physicalFileID>
<storageTypeID>1</storageTypeID>
<power>0.02354534967</power>
<requestedDate>2010-01-31T00:50:33.703</requestedDate>
<createdDate>2010-01-31T00:50:33.703</createdDate>
<exercisedDate i:nil="true"/>
<expirationDate i:nil="true"/>
</PhysicalFileInfo>
</physicalFiles>
</RestLogicalFile>
</logicalFiles>
<totalResults>1</totalResults>
</LogicalSearchFilesResult>


Search Files Total

SOAP/WCF Method: SearchFilesTotal

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/totals/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/totals/?fileid={fileID}&filename={filename}&hashmd5={hashMD5}&hashsha1={hashSHA1}&minsize={minSize}&maxsize={maxSize}&startdate={startDate}&enddate={endDate}&iscomplete={isComplete}&metaname={metaName}&metavalue={metaValue}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
fileIDint64The logical file ID.
filenamestringFilename as stored on Diomede.
hashMD532 char HEX stringMD5 hash.
hashSHA140 char HEX stringSHA1 hash.
minSizeint64Minimum file size in bytes.
maxSizeint64Maximum file size in bytes.
startDatedateStart date (yyyy-mm-dd hh-mm-ss).
endDatedateEnd date (yyyy-mm-dd hh-mm-ss).
isCompleteboolTRUE=ONLY complete files, FALSE=only NOT complete files, not specified=ALL files.
metaNamestringMetadata name data.
metaValuestringMetadata value data.

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/lfile/totals/"

Sample HTTP request:
GET /1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/lfile/totals/ HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 921
<SearchFilesTotalResponse xmlns="http://data.diomedestorage.com">
<fileTotals xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<createdDate>2010-01-31T00:50:38.163</createdDate>
<fileCount>1</fileCount>
<fileBytes>1024</fileBytes>
<deletedFileCount>0</deletedFileCount>
<deletedFileBytes>0</deletedFileBytes>
<downloadCount>0</downloadCount>
<downloadBytes>0</downloadBytes>
<uploadCount>1</uploadCount>
<uploadBytes>1024</uploadBytes>
<storageTypeTotals>
<StorageTypeTotal>
<storageTypeID>1</storageTypeID>
<fileCount>1</fileCount>
<fileBytes>1024</fileBytes>
<power>0.0235454099</power>
</StorageTypeTotal>
<StorageTypeTotal>
<storageTypeID>2</storageTypeID>
<fileCount>0</fileCount>
<fileBytes>0</fileBytes>
<power>0</power>
</StorageTypeTotal>
<StorageTypeTotal>
<storageTypeID>3</storageTypeID>
<fileCount>0</fileCount>
<fileBytes>0</fileBytes>
<power>0</power>
</StorageTypeTotal>
</storageTypeTotals>
</fileTotals>
</SearchFilesTotalResponse>


Delete File

SOAP/WCF Method: DeleteFile

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/{fileID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/{fileID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
fileIDint64The logical file ID.

HTTP Method: DELETE

Format: XML

Sample cURL command:
curl -v -X DELETE "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/lfile/1"

Sample HTTP request:
DELETE /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/lfile/1 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Rename Or Undelete File

SOAP/WCF Method: RenameOrUndeleteFile

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/{fileID}/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/lfile/{fileID}/?filename={filename}&isdeleted={isDeleted}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
fileIDint64The logical file ID.
filenamestringFilename as stored on Diomede.
isDeletedboolTRUE=ONLY deleted files, FALSE=only NOT deleted files, not specified=ALL files.

HTTP Method: PUT

Format: XML

Sample cURL command:
curl -v -d "" -X PUT "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/lfile/1/?filename=NewNameForFid1.dat"

Sample HTTP request:
PUT /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/lfile/1/?filename=NewNameForFid1.dat HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)



Replication Management Methods

Replicate File

SOAP/WCF Method: ReplicateFile

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/pfile/{fileID}/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/pfile/{fileID}/?storagetypeid={storageTypeID}&expirationdate={expirationDate}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
fileIDint64The logical file ID.
storageTypeIDint32The desired storage type. Current storage type IDs can determined via GetStorageTypes.
expirationDatedateThe expiration date of this download token (yyyy-mm-dd hh-mm-ss).

HTTP Method: POST

Format: XML

Sample cURL command:
curl -v -d "" "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/pfile/1/?storagetypeid=3"

Sample HTTP request:
POST /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/pfile/1/?storagetypeid=3 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Location: http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/pfile/3
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 126
<ReplicateFileResponse xmlns="http://data.diomedestorage.com">
<newPhysicalFileID>3</newPhysicalFileID>
</ReplicateFileResponse>


Unreplicate File

SOAP/WCF Method: UnreplicateFile

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/pfile/{physicalFileID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/pfile/{physicalFileID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
physicalFileIDint64The physical file ID.

HTTP Method: DELETE

Format: XML

Sample cURL command:
curl -v -X DELETE "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/pfile/3"

Sample HTTP request:
DELETE /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/pfile/3 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Get Physical File

SOAP/WCF Method: GetPhysicalFile

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/pfile/{physicalFileID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/pfile/{physicalFileID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
physicalFileIDint64The physical file ID.

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/pfile/1"

Sample HTTP request:
GET /1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/pfile/1 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 428
<GetPhysicalFileResponse xmlns="http://data.diomedestorage.com">
<physicalFile xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<physicalFileID>1</physicalFileID>
<storageTypeID>1</storageTypeID>
<power>0.02354534967</power>
<requestedDate>2010-01-31T00:50:33.703</requestedDate>
<createdDate>2010-01-31T00:50:33.703</createdDate>
<exercisedDate i:nil="true"/>
<expirationDate i:nil="true"/>
</physicalFile>
</GetPhysicalFileResponse>


Get Storage Types

SOAP/WCF Method: GetStorageTypes

REST URL: http://rest.diomedestorage.com/Service.svc/storagetype
Parameters: none

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/storagetype"

Sample HTTP request:
GET /1.1/Service.svc/storagetype HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 519
<GetStorageTypesResponse xmlns="http://data.diomedestorage.com">
<storageTypes xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<StorageType>
<storageTypeID>1</storageTypeID>
<name>Online</name>
<powerPerMB>24.1104997819</powerPerMB>
</StorageType>
<StorageType>
<storageTypeID>2</storageTypeID>
<name>Nearline</name>
<powerPerMB>1.9594840324</powerPerMB>
</StorageType>
<StorageType>
<storageTypeID>3</storageTypeID>
<name>Offline</name>
<powerPerMB>0.485548471</powerPerMB>
</StorageType>
</storageTypes>
</GetStorageTypesResponse>



Replication Policy Management Methods

Create Replication Policy

SOAP/WCF Method: CreateReplicationPolicy

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy/?defaultonline={defaultOnline}&defaultnearline={defaultNearline}&defaultoffline={defaultOffline}&triggerhours={triggerHours}&triggeronline={triggerOnline}&triggernearline={triggerNearline}&triggeroffline={triggerOffline}&expirehours={expireHours}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
defaultOnlineint8The desired number of Online Storage copies (1-5) by default.
defaultNearlineint8The desired number of Nearline Storage copies (1-5) by default.
defaultOfflineint8The desired number of Offline Storage copies (1-5) by default.
triggerHoursint32The number of hours after the last successful read/download that the 'TriggerPolicy' will be used.
triggerOnlineint8The desired number of Online Storage copies (1-5) when the 'TriggerPolicy' is active.
triggerNearlineint8The desired number of Nearline Storage copies (1-5) when the 'TriggerPolicy' is active.
triggerOfflineint8The desired number of Offline Storage copies (1-5) when the 'TriggerPolicy' is active.
expireHoursint32The number of hours after which this file should be deleted (expired). Not specified=unlimited=keep until manually deleted.

HTTP Method: POST

Format: XML

Sample cURL command:
curl -v -d "" "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy/?defaultonline=0&defaultnearline=0&defaultoffline=5&"

Sample HTTP request:
POST /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy/?defaultonline=0&defaultnearline=0&defaultoffline=5& HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Location: http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 156
<CreateReplicationPolicyResponse xmlns="http://data.diomedestorage.com">
<newReplicationPolicyID>3</newReplicationPolicyID>
</CreateReplicationPolicyResponse>


Get Replication Policies

SOAP/WCF Method: GetReplicationPolicies

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy"

Sample HTTP request:
GET /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 1122
<GetReplicationPoliciesResponse xmlns="http://data.diomedestorage.com">
<replicationPolicies xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ReplicationPolicy>
<replicationPolicyID>1</replicationPolicyID>
<defaultNumOnline>3</defaultNumOnline>
<defaultNumNearline>0</defaultNumNearline>
<defaultNumOffline>0</defaultNumOffline>
<lastAccessTriggerHours>2160</lastAccessTriggerHours>
<lastAccessTriggerNumOnline>0</lastAccessTriggerNumOnline>
<lastAccessTriggerNumNearline>0</lastAccessTriggerNumNearline>
<lastAccessTriggerNumOffline>3</lastAccessTriggerNumOffline>
<expireHours i:nil="true"/>
</ReplicationPolicy>
<ReplicationPolicy>
<replicationPolicyID>2</replicationPolicyID>
<defaultNumOnline>0</defaultNumOnline>
<defaultNumNearline>0</defaultNumNearline>
<defaultNumOffline>5</defaultNumOffline>
<lastAccessTriggerHours>0</lastAccessTriggerHours>
<lastAccessTriggerNumOnline>0</lastAccessTriggerNumOnline>
<lastAccessTriggerNumNearline>0</lastAccessTriggerNumNearline>
<lastAccessTriggerNumOffline>0</lastAccessTriggerNumOffline>
<expireHours i:nil="true"/>
</ReplicationPolicy>
</replicationPolicies>
</GetReplicationPoliciesResponse>


Edit Replication Policy

SOAP/WCF Method: EditReplicationPolicy

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy/{policyID}/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy/{policyID}/?defaultonline={defaultOnline}&defaultnearline={defaultNearline}&defaultoffline={defaultOffline}&triggerhours={triggerHours}&triggeronline={triggerOnline}&triggernearline={triggerNearline}&triggeroffline={triggerOffline}&expirehours={expireHours}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
policyIDint32The Replication Policy ID.
defaultOnlineint8The desired number of Online Storage copies (1-5) by default.
defaultNearlineint8The desired number of Nearline Storage copies (1-5) by default.
defaultOfflineint8The desired number of Offline Storage copies (1-5) by default.
triggerHoursint32The number of hours after the last successful read/download that the 'TriggerPolicy' will be used.
triggerOnlineint8The desired number of Online Storage copies (1-5) when the 'TriggerPolicy' is active.
triggerNearlineint8The desired number of Nearline Storage copies (1-5) when the 'TriggerPolicy' is active.
triggerOfflineint8The desired number of Offline Storage copies (1-5) when the 'TriggerPolicy' is active.
expireHoursint32The number of hours after which this file should be deleted (expired). Not specified=unlimited=keep until manually deleted.

HTTP Method: PUT

Format: XML

Sample cURL command:
curl -v -d "" -X PUT "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy/2/?defaultonline=0&defaultnearline=2&defaultoffline=1&"

Sample HTTP request:
PUT /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy/2/?defaultonline=0&defaultnearline=2&defaultoffline=1& HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Delete Replication Policy

SOAP/WCF Method: DeleteReplicationPolicy

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy/{policyID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy/{policyID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
policyIDint32The Replication Policy ID.

HTTP Method: DELETE

Format: XML

Sample cURL command:
curl -v -X DELETE "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy/3"

Sample HTTP request:
DELETE /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy/3 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Set Default Replication Policy

SOAP/WCF Method: SetDefaultReplicationPolicy

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy/default/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy/default/?policyid={policyID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
policyIDint32The Replication Policy ID.

HTTP Method: PUT

Format: XML

Sample cURL command:
curl -v -d "" -X PUT "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy/default/?policyid=2"

Sample HTTP request:
PUT /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy/default/?policyid=2 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Get Default Replication Policy

SOAP/WCF Method: GetDefaultReplicationPolicy

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy/default

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy/default

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy/default"

Sample HTTP request:
GET /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy/default HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 551
<ReplicationPolicy xmlns="http://data.diomedestorage.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<replicationPolicyID>2</replicationPolicyID>
<defaultNumOnline>0</defaultNumOnline>
<defaultNumNearline>0</defaultNumNearline>
<defaultNumOffline>5</defaultNumOffline>
<lastAccessTriggerHours>0</lastAccessTriggerHours>
<lastAccessTriggerNumOnline>0</lastAccessTriggerNumOnline>
<lastAccessTriggerNumNearline>0</lastAccessTriggerNumNearline>
<lastAccessTriggerNumOffline>0</lastAccessTriggerNumOffline>
<expireHours i:nil="true"/>
</ReplicationPolicy>


Set Replication Policy

SOAP/WCF Method: SetReplicationPolicy

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy/lfile/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/replicationpolicy/lfile/?policyid={policyID}&fileid={fileID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
policyIDint32The Replication Policy ID.
fileIDint64The logical file ID.

HTTP Method: PUT

Format: XML

Sample cURL command:
curl -v -d "" -X PUT "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy/lfile/?policyid=2&fileid=1"

Sample HTTP request:
PUT /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/replicationpolicy/lfile/?policyid=2&fileid=1 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)



Metadata Operations Methods

Create File Metadata

SOAP/WCF Method: CreateFileMetaData

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/lfile/{fileID}/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/lfile/{fileID}/?metaname={metaName}&metavalue={metaValue}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
fileIDint64The logical file ID.
metaNamestringMetadata name data.
metaValuestringMetadata value data.

HTTP Method: POST

Format: XML

Sample cURL command:
curl -v -d "" "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/lfile/1/?metaname=myMetaName&metavalue=myMetaValue"

Sample HTTP request:
POST /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/lfile/1/?metaname=myMetaName&metavalue=myMetaValue HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Location: http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/?metadataid=1
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 128
<CreateFileMetaDataResponse xmlns="http://data.diomedestorage.com">
<newMetaDataID>1</newMetaDataID>
</CreateFileMetaDataResponse>


Get File Metadata

SOAP/WCF Method: GetFileMetaData

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/lfile/{fileID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/lfile/{fileID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
fileIDint64The logical file ID.

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/lfile/1"

Sample HTTP request:
GET /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/lfile/1 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 310
<GetFileMetaDataResponse xmlns="http://data.diomedestorage.com">
<metaDatas xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<MetaData>
<metaDataID>1</metaDataID>
<name>myMetaName</name>
<value>myMetaValue</value>
<createdDate>2010-01-31T00:50:43.78</createdDate>
</MetaData>
</metaDatas>
</GetFileMetaDataResponse>


Set File Metadata

SOAP/WCF Method: SetFileMetaData

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/{metaDataID}/lfile/{fileID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/{metaDataID}/lfile/{fileID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
metaDataIDstringMetadata object ID.
fileIDint64The logical file ID.

HTTP Method: PUT

Format: XML

Sample cURL command:
curl -v -d "" -X PUT "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/2/lfile/1"

Sample HTTP request:
PUT /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/2/lfile/1 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Delete File Metadata

SOAP/WCF Method: DeleteFileMetaData

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/{metaDataID}/lfile/{fileID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/{metaDataID}/lfile/{fileID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
metaDataIDstringMetadata object ID.
fileIDint64The logical file ID.

HTTP Method: DELETE

Format: XML

Sample cURL command:
curl -v -X DELETE "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/2/lfile/1"

Sample HTTP request:
DELETE /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/2/lfile/1 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Create Metadata

SOAP/WCF Method: CreateMetaData

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/{metaName}/{metaValue}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/{metaName}/{metaValue}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
metaNamestringMetadata name data.
metaValuestringMetadata value data.

HTTP Method: POST

Format: XML

Sample cURL command:
curl -v -d "" "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/myMetaName/myMetaValue"

Sample HTTP request:
POST /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/myMetaName/myMetaValue HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Location: http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/?metadataid=2
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 120
<CreateMetaDataResponse xmlns="http://data.diomedestorage.com">
<newMetaDataID>2</newMetaDataID>
</CreateMetaDataResponse>


Get Metadata

SOAP/WCF Method: GetMetaData

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/?metadataid={metaDataID}&metaname={metaName}&metavalue={metaValue}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
metaDataIDstringMetadata object ID.
metaNamestringMetadata name data.
metaValuestringMetadata value data.

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/"

Sample HTTP request:
GET /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/ HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 448
<GetMetaDataResponse xmlns="http://data.diomedestorage.com">
<metaDatas xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<MetaData>
<metaDataID>1</metaDataID>
<name>myMetaName</name>
<value>myMetaValue</value>
<createdDate>2010-01-31T00:50:43.78</createdDate>
</MetaData>
<MetaData>
<metaDataID>2</metaDataID>
<name>myMetaName</name>
<value>myMetaValue</value>
<createdDate>2010-01-31T00:50:44.053</createdDate>
</MetaData>
</metaDatas>
</GetMetaDataResponse>


Edit Metadata

SOAP/WCF Method: EditMetaData

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/{metaDataID}/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/{metaDataID}/?metaname={metaName}&metavalue={metaValue}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
metaDataIDstringMetadata object ID.
metaNamestringMetadata name data.
metaValuestringMetadata value data.

HTTP Method: PUT

Format: XML

Sample cURL command:
curl -v -d "" -X PUT "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/2/?metaname=newMetaName&metavalue=newMetaValue"

Sample HTTP request:
PUT /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/2/?metaname=newMetaName&metavalue=newMetaValue HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Delete Metadata

SOAP/WCF Method: DeleteMetaData

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/{metaDataID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/metadata/{metaDataID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
metaDataIDstringMetadata object ID.

HTTP Method: DELETE

Format: XML

Sample cURL command:
curl -v -X DELETE "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/2"

Sample HTTP request:
DELETE /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/metadata/2 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)



Log Searches Methods

Search Login Log

SOAP/WCF Method: SearchLoginLog

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/logs/login/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/logs/login/?offset={offset}&page={pageSize}&startdate={startDate}&enddate={endDate}&ip={IP}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
offsetint64Starting index (from 0) for paged results.
pageSizeint64Number of results to return (this page's size).
startDatedateStart date (yyyy-mm-dd hh-mm-ss).
endDatedateEnd date (yyyy-mm-dd hh-mm-ss).
IPstringIP address (###.###.###.###).

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/logs/login/?offset=0&page=10"

Sample HTTP request:
GET /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/logs/login/?offset=0&page=10 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 356
<SearchLoginLogResponse xmlns="http://data.diomedestorage.com">
<logEntries xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<LoginLogEntry>
<userID>12b4825a-13fc-48a1-959b-0f83b9014e4d</userID>
<loginDate>2010-01-31T00:50:40.56</loginDate>
<loginIP>72.197.91.160</loginIP>
</LoginLogEntry>
</logEntries>
<totalResults>1</totalResults>
</SearchLoginLogResponse>


Search Invoice Log

SOAP/WCF Method: SearchInvoiceLog

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/logs/invoice/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/logs/invoice/?startdate={startDate}&enddate={endDate}&invoiceStatus={invoiceStatus}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
startDatedateStart date (yyyy-mm-dd hh-mm-ss).
endDatedateEnd date (yyyy-mm-dd hh-mm-ss).
invoiceStatusenumInvoice Status field (0=unknown, 1=not paid, 2=paid)

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/logs/invoice/?invoiceStatus=unpaid"

Sample HTTP request:
GET /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/logs/invoice/?invoiceStatus=unpaid HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 149
<SearchInvoiceResponse xmlns="http://data.diomedestorage.com">
<invoices xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
</SearchInvoiceResponse>


Search Payment Log

SOAP/WCF Method: SearchPaymentLog

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/logs/payment/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/logs/payment/?startdate={startDate}&enddate={endDate}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
startDatedateStart date (yyyy-mm-dd hh-mm-ss).
endDatedateEnd date (yyyy-mm-dd hh-mm-ss).

HTTP Method: GET

Format: XML


Search Files Total Log

SOAP/WCF Method: SearchFilesTotalLog

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/logs/lfile/totals/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/logs/lfile/totals/?offset={offset}&pagesize={pageSize}&startdate={startDate}&enddate={endDate}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
offsetint64Starting index (from 0) for paged results.
pageSizeint64Number of results to return (this page's size).
startDatedateStart date (yyyy-mm-dd hh-mm-ss).
endDatedateEnd date (yyyy-mm-dd hh-mm-ss).

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/logs/lfile/totals/?offset=0&page=3"

Sample HTTP request:
GET /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/logs/lfile/totals/?offset=0&page=3 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 962
<SearchFilesTotalLogResponse xmlns="http://data.diomedestorage.com">
<fileTotals xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<FileTotals>
<createdDate>2010-01-31T00:50:40.193</createdDate>
<fileCount>0</fileCount>
<fileBytes>0</fileBytes>
<deletedFileCount>0</deletedFileCount>
<deletedFileBytes>0</deletedFileBytes>
<downloadCount>0</downloadCount>
<downloadBytes>0</downloadBytes>
<uploadCount>0</uploadCount>
<uploadBytes>0</uploadBytes>
<storageTypeTotals>
<StorageTypeTotal>
<storageTypeID>1</storageTypeID>
<fileCount>0</fileCount>
<fileBytes>0</fileBytes>
<power>0</power>
</StorageTypeTotal>
<StorageTypeTotal>
<storageTypeID>2</storageTypeID>
<fileCount>0</fileCount>
<fileBytes>0</fileBytes>
<power>0</power>
</StorageTypeTotal>
<StorageTypeTotal>
<storageTypeID>3</storageTypeID>
<fileCount>0</fileCount>
<fileBytes>0</fileBytes>
<power>0</power>
</StorageTypeTotal>
</storageTypeTotals>
</FileTotals>
</fileTotals>
<totalResults>1</totalResults>
</SearchFilesTotalLogResponse>


Search Download Log

SOAP/WCF Method: SearchDownloadLog

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/logs/download/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/logs/download/?offset={offset}&pagesize={pageSize}&fileid={fileID}&startdate={startDate}&enddate={endDate}&token={downloadToken}&ip={IP}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
offsetint64Starting index (from 0) for paged results.
pageSizeint64Number of results to return (this page's size).
fileIDint64The logical file ID.
startDatedateStart date (yyyy-mm-dd hh-mm-ss).
endDatedateEnd date (yyyy-mm-dd hh-mm-ss).
downloadTokenstringDiomede download token.
IPstringIP address (###.###.###.###).

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/logs/download/?offset=0&page=3"

Sample HTTP request:
GET /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/logs/download/?offset=0&page=3 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 189
<SearchDownloadLogResponse xmlns="http://data.diomedestorage.com">
<logEntries xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
<totalResults>0</totalResults>
</SearchDownloadLogResponse>


Search Upload Log

SOAP/WCF Method: SearchUploadLog

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/logs/upload/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/logs/upload/?offset={offset}&pagesize={pageSize}&fileid={fileID}&startdate={startDate}&enddate={endDate}&ip={IP}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
offsetint64Starting index (from 0) for paged results.
pageSizeint64Number of results to return (this page's size).
fileIDint64The logical file ID.
startDatedateStart date (yyyy-mm-dd hh-mm-ss).
endDatedateEnd date (yyyy-mm-dd hh-mm-ss).
IPstringIP address (###.###.###.###).

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/logs/upload/"

Sample HTTP request:
GET /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/logs/upload/ HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 334
<SearchUploadLogResponse xmlns="http://data.diomedestorage.com">
<logEntries xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<UploadLogEntry>
<fileID>1</fileID>
<uploadTime>2010-01-31T00:50:41.127</uploadTime>
<uploaderIP>72.197.91.160</uploaderIP>
</UploadLogEntry>
</logEntries>
<totalResults>1</totalResults>
</SearchUploadLogResponse>



User Information Methods

Set User Info

SOAP/WCF Method: SetUserInfo

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user/

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user/?lastName={lastName}&firstName={firstName}&companyName={companyName}&websiteUrl={websiteUrl}&phone={phone}&cardName={cardName}&cardNumber={cardNumber}&cardExpiryYear={cardExpiryYear}&cardExpiryMonth={cardExpiryMonth}&cardCvv2={cardCvv2}&cardAddress1={cardAddress1}&cardAddress2={cardAddress2}&cardCity={cardCity}&cardState={cardState}&cardZip={cardZip}&cardCountry={cardCountry}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
lastNamestringThe account holder's last name.
firstNamestringThe account holder's first name.
companyNamestringThe company name of the account holder.
websiteUrlstringThe website URL for the account holder.
phonestringThe account holder's telephone number.
cardNamestringThe name on the credit card.
cardNumberstringThe credit card number (15 or 16 digits).
cardExpiryYearint32The credit card expiration year (4 digits).
cardExpiryMonthint32The credit card expiration month (2 digits).
cardCvv2stringThe 3 or 4 digital code printed on the back of the credit card.
cardAddress1stringThe 1st line of the credit card's billing address.
cardAddress2stringThe 2nd line of the credit card's billing address.
cardCitystringThe city of the credit card's billing address.
cardStatestringThe state of the credit card's billing address.
cardZipstringThe zip code of the credit card's billing address.
cardCountrystringThe country of the credit card's billing address.

HTTP Method: PUT

Format: XML

Sample cURL command:
curl -v -d "" -X PUT "http://rest.diomedestorage.com/1.1/Service.svc/da44a8fec0704d419aa40751bbc2d2a0/user/?cardName=Jeff%20Bezos&cardNumber=1111111111111914&cardExpiryYear=2025&cardExpiryMonth=12&cardCvv2=123&cardAddress1=123%20Main%20St.&cardCity=San%20Francisco&cardState=CA&cardZip=94120"

Sample HTTP request:
PUT /1.1/Service.svc/da44a8fec0704d419aa40751bbc2d2a0/user/?cardName=Jeff%20Bezos&cardNumber=1111111111111914&cardExpiryYear=2025&cardExpiryMonth=12&cardCvv2=123&cardAddress1=123%20Main%20St.&cardCity=San%20Francisco&cardState=CA&cardZip=94120 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Delete User Info

SOAP/WCF Method: DeleteUserInfo

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user/{infoType}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user/{infoType}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
infoTypeenumUser information field.

HTTP Method: DELETE

Format: XML

Sample cURL command:
curl -v -X DELETE "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/user/websiteUrl"

Sample HTTP request:
DELETE /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/user/websiteUrl HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Get Email Addresses

SOAP/WCF Method: GetEmailAddresses

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user/email

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user/email

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/user/email"

Sample HTTP request:
GET /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/user/email HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 323
<GetEmailsResponse xmlns="http://data.diomedestorage.com">
<emails xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:string>dct-0-fnwieig2@diomedestorage.com</a:string>
<a:string>email-e8aokav5@diomedestorage.com</a:string>
</emails>
</GetEmailsResponse>


Add Email Address

SOAP/WCF Method: AddEmailAddress

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user/email/{email}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user/email/{email}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
emailstringThe email address associated with your Diomede account and stored in your Diomede user information.

HTTP Method: POST

Format: XML

Sample cURL command:
curl -v -d "" "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/user/email/email-e8aokav5@diomedestorage.com"

Sample HTTP request:
POST /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/user/email/email-e8aokav5@diomedestorage.com HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Delete Email Address

SOAP/WCF Method: DeleteEmailAddress

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user/email/{email}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user/email/{email}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
emailstringThe email address associated with your Diomede account and stored in your Diomede user information.

HTTP Method: DELETE

Format: XML

Sample cURL command:
curl -v -X DELETE "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/user/email/dct-0-fnwieig2@diomedestorage.com"

Sample HTTP request:
DELETE /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/user/email/dct-0-fnwieig2@diomedestorage.com HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Set Primary Email Address

SOAP/WCF Method: SetPrimaryEmailAddress

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user/email/primary/{email}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/user/email/primary/{email}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
emailstringThe email address associated with your Diomede account and stored in your Diomede user information.

HTTP Method: PUT

Format: XML

Sample cURL command:
curl -v -d "" -X PUT "http://rest.diomedestorage.com/1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/user/email/primary/email-e8aokav5@diomedestorage.com"

Sample HTTP request:
PUT /1.1/Service.svc/9e71e7e206ed43978564c101c41918c3/user/email/primary/email-e8aokav5@diomedestorage.com HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)



Billing Management Methods

Get All Products

SOAP/WCF Method: GetAllProducts

REST URL: http://rest.diomedestorage.com/Service.svc/products
Parameters: none

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/products"

Sample HTTP request:
GET /1.1/Service.svc/products HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 1075
<GetAllProductsResponse xmlns="http://data.diomedestorage.com">
<products xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Product>
<productID>1</productID>
<name>Diomede Premium Subscription</name>
<description/>
<minMonthlyFee>30000</minMonthlyFee>
<productComponents>
<ProductComponent>
<description/>
<storageTypeID>1</storageTypeID>
<meterType>Storage</meterType>
<ratePerGB>333</ratePerGB>
</ProductComponent>
<ProductComponent>
<description/>
<storageTypeID>1</storageTypeID>
<meterType>Download Bandwidth</meterType>
<ratePerGB>750</ratePerGB>
</ProductComponent>
<ProductComponent>
<description/>
<storageTypeID>1</storageTypeID>
<meterType>Upload Bandwidth</meterType>
<ratePerGB>750</ratePerGB>
</ProductComponent>
<ProductComponent>
<description/>
<storageTypeID>2</storageTypeID>
<meterType>Storage</meterType>
<ratePerGB>267</ratePerGB>
</ProductComponent>
<ProductComponent>
<description/>
<storageTypeID>3</storageTypeID>
<meterType>Storage</meterType>
<ratePerGB>100</ratePerGB>
</ProductComponent>
</productComponents>
<supportFee>0</supportFee>
</Product>
</products>
</GetAllProductsResponse>


Get My Products

SOAP/WCF Method: GetMyProducts

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/products

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/products

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/products"

Sample HTTP request:
GET /1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/products HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 1132
<GetMyProductsResponse xmlns="http://data.diomedestorage.com">
<products xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<UserProduct>
<product>
<productID>1</productID>
<name>Diomede Premium Subscription</name>
<description/>
<minMonthlyFee>30000</minMonthlyFee>
<productComponents>
<ProductComponent>
<description/>
<storageTypeID>1</storageTypeID>
<meterType>Storage</meterType>
<ratePerGB>333</ratePerGB>
</ProductComponent>
<ProductComponent>
<description/>
<storageTypeID>1</storageTypeID>
<meterType>Download Bandwidth</meterType>
<ratePerGB>750</ratePerGB>
</ProductComponent>
<ProductComponent>
<description/>
<storageTypeID>1</storageTypeID>
<meterType>Upload Bandwidth</meterType>
<ratePerGB>750</ratePerGB>
</ProductComponent>
<ProductComponent>
<description/>
<storageTypeID>2</storageTypeID>
<meterType>Storage</meterType>
<ratePerGB>267</ratePerGB>
</ProductComponent>
<ProductComponent>
<description/>
<storageTypeID>3</storageTypeID>
<meterType>Storage</meterType>
<ratePerGB>100</ratePerGB>
</ProductComponent>
</productComponents>
<supportFee>0</supportFee>
</product>
<withSupport>false</withSupport>
</UserProduct>
</products>
</GetMyProductsResponse>


Purchase Product

SOAP/WCF Method: PurchaseProduct

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/products/{productID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/products/{productID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
productIDint32Diomede product (subscription) ID.

HTTP Method: PUT

Format: XML

Sample cURL command:
curl -v -d "" -X PUT "http://rest.diomedestorage.com/1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/products/1"

Sample HTTP request:
PUT /1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/products/1 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Cancel Product

SOAP/WCF Method: CancelProduct

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/products/{productID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/products/{productID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
productIDint32Diomede product (subscription) ID.

HTTP Method: DELETE

Format: XML

Sample cURL command:
curl -v -X DELETE "http://rest.diomedestorage.com/1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/products/1"

Sample HTTP request:
DELETE /1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/products/1 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)


Get All Contracts

SOAP/WCF Method: GetAllContracts

REST URL: http://rest.diomedestorage.com/Service.svc/contracts
Parameters: none

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/contracts"

Sample HTTP request:
GET /1.1/Service.svc/contracts HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 1588
<GetAllContractsResponse xmlns="http://data.diomedestorage.com">
<contracts xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Contract>
<contractID>1</contractID>
<ratePerTerm>19899600</ratePerTerm>
<term>24</term>
<contractComponents>
<ContractComponent>
<storageTypeID>1</storageTypeID>
<meterType>Storage</meterType>
<committedGB>3000</committedGB>
</ContractComponent>
</contractComponents>
<description/>
</Contract>
<Contract>
<contractID>2</contractID>
<ratePerTerm>15895700</ratePerTerm>
<term>24</term>
<contractComponents>
<ContractComponent>
<storageTypeID>2</storageTypeID>
<meterType>Storage</meterType>
<committedGB>3000</committedGB>
</ContractComponent>
</contractComponents>
<description/>
</Contract>
<Contract>
<contractID>3</contractID>
<ratePerTerm>4751500</ratePerTerm>
<term>24</term>
<contractComponents>
<ContractComponent>
<storageTypeID>3</storageTypeID>
<meterType>Storage</meterType>
<committedGB>3000</committedGB>
</ContractComponent>
</contractComponents>
<description/>
</Contract>
<Contract>
<contractID>4</contractID>
<ratePerTerm>45143500</ratePerTerm>
<term>24</term>
<contractComponents>
<ContractComponent>
<storageTypeID>3</storageTypeID>
<meterType>Storage</meterType>
<committedGB>30000</committedGB>
</ContractComponent>
</contractComponents>
<description/>
</Contract>
<Contract>
<contractID>5</contractID>
<ratePerTerm>428867500</ratePerTerm>
<term>24</term>
<contractComponents>
<ContractComponent>
<storageTypeID>3</storageTypeID>
<meterType>Storage</meterType>
<committedGB>300000</committedGB>
</ContractComponent>
</contractComponents>
<description/>
</Contract>
</contracts>
</GetAllContractsResponse>


Get My Contracts

SOAP/WCF Method: GetMyContracts

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/contracts

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/contracts

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).

HTTP Method: GET

Format: XML

Sample cURL command:
curl -v "http://rest.diomedestorage.com/1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/contracts"

Sample HTTP request:
GET /1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/contracts HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 595
<GetMyContractsResponse xmlns="http://data.diomedestorage.com">
<contracts xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<UserContract>
<userContractID>196013</userContractID>
<contract>
<contractID>1</contractID>
<ratePerTerm>19899600</ratePerTerm>
<term>24</term>
<contractComponents>
<ContractComponent>
<storageTypeID>1</storageTypeID>
<meterType>Storage</meterType>
<committedGB>3000</committedGB>
</ContractComponent>
</contractComponents>
<description/>
</contract>
<startDate>2010-01-31T00:00:00</startDate>
<endDate>2012-01-31T00:00:00</endDate>
</UserContract>
</contracts>
</GetMyContractsResponse>


Purchase Contract

SOAP/WCF Method: PurchaseContract

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/contracts/{contractID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/contracts/{contractID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
contractIDint32Diomede contract ID.

HTTP Method: PUT

Format: XML

Sample cURL command:
curl -v -d "" -X PUT "http://rest.diomedestorage.com/1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/contracts/1"

Sample HTTP request:
PUT /1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/contracts/1 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 131
<PurchaseContractResponse xmlns="http://data.diomedestorage.com">
<userContractID>196013</userContractID>
</PurchaseContractResponse>


Cancel Contract

SOAP/WCF Method: CancelContract

REST URL: http://rest.diomedestorage.com/Service.svc/{sessionToken}/contracts/{contractID}

Full REST URL prototype: http://rest.diomedestorage.com/Service.svc/{sessionToken}/contracts/{contractID}

Parameters (applies to both SOAP & REST methods):

sessionTokenstringDiomede session token (retrieved after successful login/authentication).
contractIDint32Diomede contract ID.

HTTP Method: DELETE

Format: XML

Sample cURL command:
curl -v -X DELETE "http://rest.diomedestorage.com/1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/contracts/196013"

Sample HTTP request:
DELETE /1.1/Service.svc/2a896b3e7dfe45cdb1a5bedfbe956c37/contracts/196013 HTTP/1.1
Host: rest.diomedestorage.com
Accept: */*

Sample HTTP response:
HTTP/1.1 200 OK
Cache-Control: private
Server: Diomede
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 23 Jan 2009 09:14:00 GMT
Content-Length: 0
(no body)