OneDrive vs OneDrive and OneNote vs OneNote – Why the disconnect?

So you think you know OneDrive eh?  If you were knowledgeable, you'd ask, which of the three?  Maybe you knew that, maybe you didn't.  But I'd venture to say that many don't really understand the programmatic aspects between the various versions.  Additionaly, since I'm going to talk about APIs, I might as well throw the OneNote API into the mix.  One Drive exists in three states:

  • OneDrive for business (the version that runs in your O365 tenant)
  • OneDrive Pro (the version that runs in your on-premises environment)
  • OneDrive Consumer (the version that runs in your LiveID environment) 

OneDrive for business and OneDrive Pro are simply SharePoint document libraries that exist in your My Site.  The APIs for gain access to these are as "simple" as making basic document library API calls for any SharePoint document library.  These SharePoint file APIs are documented here:

 http://msdn.microsoft.com/en-us/library/office/dn292553%28v=office.15%29.aspx

Notice that you must specify the url of the site (in this case it is your My Site url) in order to give context to API calls.  For a typical O365 instance, this looks like:

"https://acs579-my.sharepoint.com/personal/givens_acs579_onmicrosoft_com"

All REST calls and CSOM will need to be instantiated with this url. Now consider folder nagivation.  In SharePoint, you must use the "GetFolderByServerRelativeUrl" method on the web object. An example of this call looks like this:

https://acs579-my.sharepoint.com/personal/givens_acs579_onmicrosoft_com/_api/web/GetFolderByServerRelativeUrl('/personal/givens_acs579_onmicrosoft_com/Shared Documents')

Umm…does anyone else think this is a super long and incredibly dumb way of getting to a file folder?  Yeah, thought so.  Let's take a look at a typical OneDrive consumer API call, which are documented here:

http://msdn.microsoft.com/en-us/library/windows/apps/hh826531.aspx

As an example, to get your current one drive folder, one simply has to do a GET to:

https://apis.live.net/v5.0/me/skydrive (yes it is still called "skydrive")

Wait, do you see that?  Instead of "https://acs579-my.sharepoint.com/personal/givens_acs579_onmicrosoft_com/_api/web/GetFolderByServerRelativeUrl('/personal/givens_acs579_onmicrosoft_com/Shared
Documents')
" it is "me".  Woah, what a concept. 

Now let's look at getting a file or posting a file.  Each file and folder has an id.  To get a folder, you simply do something like:

GET https://apis.live.net/v5.0/file.a6b2a7e8f2515e5e.A6B2A7E8F2515E5E!114
GET https://apis.live.net/v5.0/folder.a6b2a7e8f2515e5e.A6B2A7E8F2515E5E!114

Instead of…oh nevermind…its waaaay tooo long to copy and paste.

The implementation of file operations in SharePoint is horrendous and needs a total overhaul.

Now, let's take a look at OneNote.  In SharePoint, every site can have a OneNote notebook.  This notebook is rendered and edited using Office Web Apps and the OneNote.ashx handler.  Many of the features you have come to love work using the browser, but alas, we have zero programmatic capabilities. In contrast, the OneNote for consumer has a massively beautiful API to it as you can see here:

http://msdn.microsoft.com/EN-US/library/office/dn575421%28v=office.15%29.aspx

Wow, the ability to create and post to pages using a super simple HTTP REST API.  The OneNote endpoint is simply:

https://www.onenote.com/api/v1.0/pages

They are putting massive dev time into this API, but I'm afraid we won't be seeing it anytime soon in O365 or on-premises.  Check out the list of features coming via the OneNote blog (that's pretty amazing set of upcoming features):

http://blogs.msdn.com/b/onenotedev/

What should you do?

Vote for the OneDrive implementation of "me" here in UserVoice:

http://officespdev.uservoice.com/forums/224641-general/suggestions/5983861-migrate-onedrive-apis-to-sharepoint-online

Vote for the migration of the OneNote APIs here in UserVoice:

http://officespdev.uservoice.com/forums/224641-general/suggestions/5983855-migrate-onenote-apis-to-sharepoint-online

Additionally, if you are an MVP:

Make sure that you express your extreme disappointment when they send out emails saying O365, yet talk about LiveID consumer features.  It is extremely disrespectful to waste our time like that.