OneNote API with OneNote in SharePoint document library - onenote

Is there a way in the OneNote API (or Graph API) to interact with a OneNote document stored in a SharePoint document library somewhere?
Not the site notebook.
Thanks.

The OneNote API supports site-hosted notebooks. More details are in this blog post.
https://blogs.msdn.microsoft.com/onenotedev/2015/06/11/and-sharepoint-makes-three/
I'm not sure what you mean by SharePoint document library - isn't it the same as a SharePoint site?

SharePoint document libraries are contained inside of a SharePoint site. The blog talks about working with any OneNote notebook in any document library on a SharePoint site. You need to know which site you want to work with first (either by URL or ids). Then you can query for notebooks on the site etc.

Related

Programatically send a copy of a local file system notebook to Onedrive Onenote

Locally, I have several OneNote notebooks in the OneNote 2007 format. For reasons out of scope it is difficult to convert them to the new format first.
I want to be able to send a copy of the notebook to OneNote Online so that I can read-only it from wherever OneNote Online is accessible.
Programmatically, I have used the OneNote desktop API to export a page as an MHT file. Then I have used further code to convert the MHT to an HTML file. Finally, I then used MS graph explorer (because I haven't written that part of the code yet), to create a new OneNoteAPI page with the HTML that I exported.
I had expected the resulting page in OneNote Online to look like the HTML I had just uploaded.
It .. did not.
a) Where before I had a nice OneNote list with checkboxes I now had them laid out vertically. So checkbox\nitem\ncheckbox\item.
b) The title box that was exported as part of the HTML .. remained in its place and the new page did not absorb it into its title box.
So, how can I programmatically send a page from a desktop OneNote to a OneNote Online folder and have it look the same?
NB: I actually want to send the entire notebook but am trying one page at a time.
NB2: I cannot port all the notebooks to OneNote online once off and then just use that. They need to live in the local network.
NB3: I suppose I could just set up an FTP site with the HTML pages that I just exported - that is plan Z.
Thank you

Creating OneNote in a specific OneDrive folder

I'm trying to add some OneNote integration into an app using the API. I'd like to create a OneNote file in a specific subfolder of the user's OneDrive account - is this possible?
POST https://www.onenote.com/api/v1.0/me/notes/notebooks creates the new notebook in /Documents with the name you provide in the request body - but I'd like to put it somewhere specific.
For simplicity, the REST APIs does not allow this type of customization and only creates notebooks under the Documents folder.
Our feedback has found that the vast majority of users do not care about the exact location of the notebook as long as the notebook is easily and quickly discover-able.

Creating plugins for Onenote

I've been looking some at the Onenote API and it seems to me it's mainly to retrieve and post full pages (correct me if I'm wrong). What I wanted to do was to extend the functionality inside Onenote so I can pull data into my Onenote document while working in it. It could be something like making REST calls to a dictionary API or picture database API or similar. Is that possible to do in the Onenote API...or by using any other connectivity tool?
If you're looking to extend the OneNote client à la Onetastic then the only method is the OneNote COM API.
It exposes the full page object model and will allow you to interact with the OneNote client from your own Win32 application, which could easily connect to the resources you mentioned.

Generating a web site from xsn files

As we all know, the infopath forms service residing on a sharepoint server generates a web site each time we publish an inforpath form template to the sharepoint server.
Here is the question: how does sharepoint do that. Is there any way for us to do that programmatically via some kind of api provided by MS?
In fact, what I need to do is getting all the html, js, css etc. files and applying some kind of operations like deleting some divs or insert some html code into the particular web page. I have come up with two ways to do this.
Generating the web page via sharepoint api and apply those operations at the same time
Extracting the web page files from the IIS server and apply those operations
I am totally new to this kind of work. All in my mind is that each time we right click on a web page in the browser and choose to save the web page, the browser gets some of the files we need to render the web page and makes it possible for us to browse the web page offline.
httrack
WinWSD
and tools like that seems to work fine with extracting html files from online web pages but not that well with js, css files.
Now I am trying to dig into the chromium project for some kind of inspiration, although whether it helps or not is unpredictable.
Any kind of advice will be appreciated.
Best Regards,
Jordan
Infopath xsn files are just zip files with a different extension. you can rename the extension to .zip and extract out the files. you will find a number of files that make up the form. the two main ones are the .xml and .xsl files. the .xsl will have the html to generate when applied to the xml.

API for Microsoft OneNote 2010 + SkyDrive Web Services?

I am quite familiar with the Microsoft OneNote 2007 and 2010 APIs, however these interface directly with OneNote itself. In 2010 we have the great facility of syncing OneNote with SkyDrive. This works really well. We can also use the OneNote Web App, Windows Phone 7 and now the iPhone app to access our documents.
My question is this, is there any way of accessing the SkyDrive (or similiar) API directly to enable access to our OneNote notebooks on SkyDrive itself? I trust existing OneNote Uers will see the power of this.
Opening up fiddler I see all sorts of calls to http://docs.live.net/SkyDocsService.svc. The services are also referenced in a forum post by Daniel "Mr OneNote" Escapa on a forum post below:
OneNote has a 3 screen solution with the 2010 release. We will have the desktop app, the web app and a mobile app all which sync to the same place in the cloud to Windows Live. This will allow you to do all of the same things you mention above. So when you are at your parents you can use the browser to view your notes (IE, Firefox & Safari). You can also view your notes in the Android browser on your phone and finally I hope there is a OneNote app for the Android in the future. For example there is a 3rd party group which has released an iPhone solution for OneNote 2007 even without all of these web services we are adding in Office 2010.
Daniel Escapa
This is supported REST SKYDRIVE API http://msdn.microsoft.com/en-us/library/live/hh826521.aspx
Video:The complete developer's guide to the SkyDrive API: http://channel9.msdn.com/Events/BUILD/BUILD2011/PLAT-134C
SkyDrive core concepts: http://msdn.microsoft.com/en-us/library/live/hh826545.aspx
Create, read, update, and delete folders and files, and get links to files so that other users can access those files directly.: http://msdn.microsoft.com/en-us/library/live/hh826531.aspx
Create, read, update, and delete albums, photos, videos, and audio. Read, create, and delete tags on photos and videos.: http://msdn.microsoft.com/en-us/library/live/hh826522.aspx
Code Samples (Interactive SDK): http://isdk.dev.live.com/ISDK.aspx
We finally have a result! Read Scott Hanselman's blog post, OneNote and Microsoft's quiet API revolution of 17 March 2014 which breaks the news on the new OneNote REST API.