A Cloud Storage Software API

Post on 08-May-2015

923 views 0 download

description

By Miguel De Buf (Nomadesk) at CloudCamp Ghent 2010

Transcript of A Cloud Storage Software API

A Cloud Storage Software API

Miguel De BufCTO, Nomadesk

1This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV

What is nomadesk ?

The easiest and most secure way to share, synchronize and backup files - wherever

you are, online or offline!

This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV 2

Nomadesk = cloud storage at its best

Cloud storage : storage… and more!

• Your files in the cloud = peace of mind• Convenient – always available• Safe – always backed up

• Taking advantage of the cloud• Sharing• Collaboration

3This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV

Sharing - widget

http://wonderewereld.webs.com/fotos.htm

This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV 4

Account Management API

• REST-like API, transport over HTTP(S)• GET• POST• XML POST

• Example : • $token = logon($user, $pass)• $xml = getaccountinfo($token)• $xml = getfileservers($token)• $xml = …

This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV 5

$xml = logon($user, $pass)

• Request (GET)http://localhost/nomadesk-ctrller/api.php?Task=Logon&Email=miguel.debuf@nomadesk.com&Password=vandaag

• Response (XML)<?xml version="1.0" encoding="utf-8" ?><Response> <Status>1</Status> <Message>Success</Message> <Token>69ph529brie6hbaktpsb490ce4</Token> <AccountInfo> <FirstName>sssssss</FirstName> <LastName>aaaaaaa</LastName> <Email>miguel.debuf@nomadesk.com</Email> <Language>en-us</Language> <IsTrial>false</IsTrial> <BrandingID>NMD</BrandingID> </AccountInfo></Response>

This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV 6

File Management API

• API calls executed on a fileserver !• Request (pseudo-code)

• ls($token, $fs, $path)

• Response (XML)<Response> <Status>1</Status> <Message></Message> <FileInfos> <FileInfo> <Name>abc.txt</Name> <Path>/directory/</Path> <IsFolder>false</IsFolder> <LastModifiedDstamp>1247989470</LastModifiedDstamp> <Size>1247990693</Size> </FileInfo> <FileInfos></Response>

This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV 7

File Management API

• [$token, $fs] skipped for clarity…• mkdir($folder)• fileexists($folder)• rm($path)• mv($oldpath, $newpath)• copy($srcpath, $destpath)• $bin = download($path)• upload -> FILE POST

• Snapshots/revisions can be taken• createrevision($path, $comments)• restorerevision($path, $rev, $destpath, $overwrite)• removerevision($path, $rev)• …

This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV 8

Sharing API

• Share your files with others.• 4 types of sharing

• Inviting Users onto your Fileserver• Create/Send File Links

• Send a file to someone (replace email attachment)• Tweet a file• Publish a file on Facebook, on your blog, …

• Create/Send Folder Links• Grant people one-time (ro/rw) access to one of your

folders

• Create Widgets• Publish content on the web (blog, cms, …)

This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV 9

Sharing API

• More fileserver management API calls• [$token, $fs] skipped… • Work in team !

• inviteuser($users[], $ro, $msg, $opts…)• canceluser($user)• …

This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV 10

Inviteuser($users[], $msg, …)

• Response<Response> <Status>1</Status> <Message></Message> <Users> <AccountInfo> <FirstName>first</FirstName> <LastName>last</LastName> <Email>guest1@nomadesk.com</Email> <Address></Address> <Address2></Address2> <Status>Guest</Status> <Access>ReadWrite</Access> ... </AccountInfo> <AccountInfo> <FirstName>First Name</FirstName> <LastName>Last Name</LastName> <Email>owner@nomadesk.com</Email> <Status>Owner</Status> ... </AccountInfo> </Users></Response>

This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV 11

Sharing API

• More file management API calls• File- and folderlinks

• getfilelink($path, $expiry, $notify, $numdownloads, $pwd, …)

• sendfilelink($path, …)• sendfolderlink($path, …)

• Example response<?xml version="1.0" encoding="utf-8" ?><Response> <Status>1</Status> <Message></Message> <FileLink>https://nmd.sk/a77ac94e3c</FileLink></Response>

This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV 12

Contact Info

Miguel DE BUFCo-founder, CTO

miguel.debuf@nomadesk.comhttp://www.nomadesk.com

This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV 13

Questions ?

This document is strictly confidential and must not be given to any third party, or be reprinted or copied in whole or in part without the prior consent of the author. 2010 Nomadesk NV 14