 Hi, my name is Vijay Sharma and I'm a Product Manager for Microsoft OneNote Team. Today in this video, I'm going to talk about OneNote APIs for Office 365. I'll talk about how you can use APIs and show you a quick demo of an application that uses OneNote APIs and see some code behind. Lastly, we will talk about OneNote Teams Roadmap for Developers. All right, I am very glad to announce the general availability of OneNote APIs for Office 365. Starting today, you can now write apps that can access OneNote notebooks stored in OneDrive for business, SharePoint site hosted notebooks and notebooks in Office 365 groups. Now, we already have the consumer version of OneNote APIs. The new version of OneNote APIs for Office 365 brings parity with the consumer APIs. This is a great opportunity for developers. The Office 365 market is growing at a very fast pace and these APIs enable developers to build apps for a vast majority of businesses and educational institutions that use Office. Now, this is a high-level architecture of OneNote REST API. With OneNote API, you can use Post to create notebooks, section, section groups and pages. You can call Get to get the notebook hierarchy, pages and page content. You can also use Update to update a page and delete a page. I will walk you through each of these APIs and then show you a quick demo of how to use APIs. Now, before we start looking at the code, I just want to give you a quick reminder that you need to register your app with Office 365 before using the APIs. You can find instructions to register your app at a connect site aka.ms-onenote-connect-2015. Now, here is how you create a page in OneNote. This is a simple HTML that you can post to create a page in OneNote. What you see here is a body, which in this case contains a header and an image. When you post this HTML to OneNote, it will create a simple page in OneNote with the title and the image. Now, OneNote has a hierarchical structure. You have notebooks under that here are section groups, under that here are sections and then pages. Here is how you get the notebook hierarchy. You can use the notebook's endpoint to get all of the user's notebooks. Similarly, you can use the section group's endpoint to get all the section groups of the user and sections endpoint to get all the sections. But if you want to avoid making a separate network call to get notebooks and sections and section groups, you can just use expand at the very bottom of the screen to get entire hierarchy in one network call. Now, here is how you get a page. Now, for getting a page, you can also pass filters to get the most recently modified pages. Now, to update a page, you need to first get the page content and pass in the include IDs parameter set to true. What this would do is this will assign an ID to each element in the content and then you can use these IDs to update that element in the page. Now, let's switch to a demo and see the code in action. All right, to demo these APIs, let's first look at a business problem. I travel a lot and meet a lot of customers. I exchange business card with the customers and end up having a lot of business cards. So how can I organize my business cards? I'm going to use my Office Lens app to scan a business card and save it to my notebook stored in OneDrive for business. Okay, I'm going to use the Office Lens app to scan the business card and save it into my notebook. Here I scan the business card and then I save it into my notebook in a section called business cards. I save it over here. Now, I was already logged into my Office 365 account and this business card should get saved into my Office 365 notebook. Now, let's flip over to my notebook where I save this business card. You see there's an image of the business card and you also see some useful information like email, phone number, et cetera. OneNote actually extracted this information from my business card and saved a VCF file in my page. This is very useful information. I can then add my notes to this contact, additional meeting notes, and save images right here in OneNote. Now, let's look at the code in Visual Studio. Here's a sample code that creates a OneNote page using the post APIs. First, I do create an HTTP client, set the default header, and set up the authentication. We are going to use OAuth authentication and set that as a bearer token. Here's a simple HTML that contains the image of the business card. Notice that I have a div where I set the data render method to extract and provide a source image. What this does is it tells OneNote to extract useful information from the image and the API will analyze the image and see if it's a business card or a recipe or a news article and extract relevant information from the image. This is very, very powerful. Now, here is the post method of the HTML. Now, here I post the HTML to a section in my notebook by specifying the full URL of the URL path and a multi-part content with the HTML and the binary of the image. I then post it async and it will create a new page in OneNote to extract the business card from the image. So, this is how you create content in OneNote. Now, this stuff was pretty useful. But wait, there is more. What else can you do with the content saved in OneNote? What if I want to send a quick email to one of my contacts after the meeting? So, let's switch to Outlook and see if we can send an email to my contact. Now, OneNote team built a sample add-in for Outlook that goes over all your notebooks, sections and pages, and extracts business cards from my notebooks and shows them as a contacts right over here. So, let's fire off this add-in and it will bring all my contacts into OneNote. So, you see all my contacts are over here and I can start writing email to my contacts. Now, this information was very useful. Imagine you meet somebody, you scan their business card and put into OneNote. You can start writing email to them within five minutes. Now, let's look at the code behind these APIs. Here is some JavaScript code to call the OneNote REST API to get the nodes and sections. I'm going to use the expand to get all the notebooks, sections and pages in one network call. Once I get the pages, I want to get the page content. Here I call the page content API and pass in the section ID and page ID to get the page content. Once I get the page content, I walk through the HTML and see if the page contains a VCF file as an attachment. If there is an attachment, I extract the email and name from the card and show it in my user interface. This was pretty simple but very useful. Now, in our demo, we use the OneNote REST API endpoint to perform operations on notebooks. You can also use a Converge endpoint at graph.microsoft.com to access OneNote notebooks. Microsoft Graph is a single converged endpoint to access information about users, groups, files, messages, calendar, contacts, tasks and notes all under the same roof. Now, the Graph API for OneNote are currently in preview and should be available next year. So, what's next from OneNote team? We are currently working on enabling live OneNote pages embedded on a website. This allows you to embed OneNote pages in your website. Users can then take notes in OneNote right from within your website. That would be really cool. We are also working on OneNote add-ins. This will allow you to build add-ins for OneNote and publish them on Office Store. Lastly, we are also working on tools to showcase apps and also some more samples. Now, if you have some suggestions, please reach out to us on our OneNote user voice page and let us know what you need. Now, I'm sure by now you must be really excited to see all the opportunities with OneNote APIs. For more information related to OneNote APIs, please go to dev.oneNote.com and get all the documentation, code samples, videos and blogs. Please engage with us on Stack Overflow or Twitter. Let us know what cool apps that you're building and thank you so much.