Our latest release adds useful tools for your applications. The API now has two new additions in the form of GetPathInfo and Upload callbacks to give you more details about your files and notification when an upload completes.
GetPathInfo
There were many requests for this API call that will give detailed information about a specific path. We have thrown in the kitchen sink with this call; it's fast and has the ability to return every bit of information about a single file or folder. The call returns the following information:
ItemName, IsFile, CreatedDate, SizeBytes, FileType, MetaData, Tags, IsShared, ModifiedDate and ItemID
The ItemID is a new value that is returned in this call. It is an ID that is unique across a single application. This does not tie to the filename but to the file itself.
In REST the xml response looks like this:
<?xml version="1.0" encoding="utf-8"?>
<Response>
<ResponseCode>0</ResponseCode>
<GetPathInfo>
<ItemName>F8.jpg</ItemName>
<IsFile>true</IsFile>
<CreatedDate>Wed, 02 May 2007 13:36:41 GMT</CreatedDate>
<SizeBytes>1000000</SizeBytes>
<FileType>Image</FileType>
<Metadata>
<MetaData FileName="F8.jpg">
<Data Key="Height">480</Data>
<Data Key="MD5">JCiPH3sH4S3f/Ad93uWk+w==</Data>
<Data Key="Width">640</Data>
</MetaData>
</Metadata>
<Tags></Tags>
<IsShared>false</IsShared>
<ModifiedDate>Wed, 02 May 2007 13:36:41 GMT</ModifiedDate>
<ItemID>1045632</ItemID>
</GetPathInfo>
</response>
Upload Callback
The ability to receive a callback after an upload is a critical step when letting a client perform uploads directly to the Nirvanix servers. The primary use for this is when you use a browser to do an HTTP Upload. It gives you an option to receive an update telling your system that a file has been updated. Usually this is used in concert with a database that keeps information on the files and mirrors which appear on the Nirvanix file system.
The parameter is quite simple to add: you will need a new HTTP parameter called callbackURL. The callbackURL parameter takes a fully qualified URI including the server you wish to call. You will need a web server accepting requests to handle this as well. This functionality works the same as all of the rest of our callback operations. The callback is initiated as soon as the upload is complete but the processing to get the MD5 and other metadata may still continue after the callback is returned