onenote api @ silicon valley code camp
DESCRIPTION
Build new and exciting experiences that captivate consumers using the new OneNote API.TRANSCRIPT
Omar VenadoSenior Program Manager
Apps evolved with the OneNote API
Agenda The OneNote Ecosystem OneNote API
• What is it? Why should I care?• Our partners• Current investments and future roadmap
Getting started with the OneNote API Next gen apps. Better with OneNote
• Make your existing apps more personal, more insightful• Build new unobtrusive and contextualized experiences• Use OneNote to increase your app traffic
Free on all platforms• Windows• Windows Phone• Mac OS X• iOS• Android and Android Wear• And on the web with OneNote Online
Pre-installed with every new Windows device
New 1st party experiences• Office Lens for WP: Your pocket scanner. Fixes, enhances, and makes pictures
readable• OneNote Clipper: Clip the web using your favorite browser• [email protected]: Emails saved to OneNote
10’s of millions of users 15 GB of free storage with OneDrive No upload quota
OneNote API VisionLightweight, simple, and available anywhereRESTful CRUD API for NotesBuilt on JSON, HTML, and OData
Find anything quicklyEntity recognition, image/audio/video processing, schematized content and metadataFull text search and structured queriesNatural language search
Your memory store in the cloudOne place for all your memories. Never forget anything again.Effortlessly evoke your memories whenever you need themEnable more personalized devices, apps, and smarter digital assistantsEnable next gen apps to start bridging personal data silos
Our Partners
What’s in it for partners and developers?Make your existing apps more personal Tap into users notes and memories and improve your app experience using the power of full text searchLeverage data saved by other apps and devicesE.g. A restaurant app can make better suggestions based on previously visited restaurants or recipes saved to OneNote. A retail app can notify users when items they saved to OneNote go on sale.
Use OneNote to increase your app usageEnable users to save content for later to OneNote from within your app. Use OneNote’s powerful canvas to create captivating layouts that link users back to your app when they search their memories in OneNote.
OneNote as a data feedSurface domain-specific data like products, recipes, web sites, shopping lists, todo items, news articles, etc. in OneNote within the context of your app experience. E.g. news reader apps, todo apps, health apps, food/restaurant apps, photo apps, etc.
Our Roadmap
Available today• Create page in default
location• Create page in specific
location• Query notebooks,
sections, and section groups
• Create notebooks and sections
• PDF Rendering• Query pages*• Get page content*• Todo tags*
Available soon • Patch page• Append/prepend• Full text search• Page thumbnails• Query images• Notebook sharing
Planned• Office 365 support• Natural language
search• Query for common
entities
What to store in OneNote?
OneNote API != Database ServiceSave captivating content for users to view and annotate in OneNoteNot likely the best store for machine data like XML, JSON, etc. or large media like HD movies.
OneNote is a store for notes and memoriesStore relevant pieces of content that link OneNote users back to your appStore notes, todo lists, websites, receipts, workout summaries, annotations, etc. Account for end users modifying and deleting pages saved by your appNot likely the primary store for most apps. A great data source for apps to make better decisions and a contextual entry point for your app.
Demo
Hello OneNote API
https://www.onenote.com/api/v1.0
What did we learn?Simple, simple, simple to useWorks as you would expect
Standard HTTP verbs on resource endpoints: ~/notebooks, ~/sections, ~/pages
Restful notation: ~/notebooks/{id}, ~/sections/{id}/page
Use your favorite HTTP request and JSON parsing libraries (jQuery, JSON.NET, etc.)You don’t have to learn a new query language
OData v4 verbs such as filter, select, orderby, etc. all work as expected
OAuth made easyNo OAuth knowledge required. Libraries available for most popular platformsRegister your App with Windows Live and append the access token to the request headers
Auth and ScopesWL.Event.subscribe("auth.login", onLogin);WL.init({ client_id: 'YOUR CLIENT ID GOES HERE', redirect_uri: 'YOUR APP REDIRECT GOES HERE', scope: ["wl.signin", //wl sign in access “wl.offline_access", //if your app needs to refresh the token "office.onenote", //read access to all pages
"office.onenote_create", //create pages in any location "office.onenote_update_by_app", //edit pages modified by app "office.onenote_update" //full access to all pages and
notebooks ],
response_type: "token"}); WL.login({ scope: yourAppScopes });
Register you app with Live and use initialize the Win Live
wrappers
Auth and ScopesWL.Event.subscribe("auth.login", onLogin);WL.init({ client_id: 'YOUR CLIENT ID GOES HERE', redirect_uri: 'YOUR APP REDIRECT GOES HERE', scope: ["wl.signin", //wl sign in access “wl.offline_access", //if your app needs to refresh the token "office.onenote", //read access to all pages
"office.onenote_create", //create pages in any location "office.onenote_update_by_app", //edit pages modified by app "office.onenote_update" //full access to all pages and
notebooks ],
response_type: "token"}); WL.login({ scope: yourAppScopes });
Ask the user to grant your app the permissions it needs to work
Making the requestfunction onLogin(session) { if (!session.error) {
//extracts the token from the cookies access_token = getAccessToken();
$.ajax({ accept: "application/json", type: "GET", url: "https://www.onenote.com/api/v1.0/notebooks",
//appends the access token to the request headers: { "Authorization": "Bearer " + access_token }, complete: function (data, status, xhr) { $(“#response").text(data.responseText); } }); } } Attach the access token to the
Authorization header
Apps
Apps evolved with the OneNote API API Surface
Now
Near Future
Save to OneNote – News360, Feedly, Neat scanner, IFTTT actionEnumerate hierarchy – Location pickersQuery pages and get content- Query pages, display page content within your app or open page in OneNote, IFTTT triggers (coming soon)Implicit capture – Journal and event apps, health apps for wearables, smart appliances, etc.
Apps
Apps evolved with the OneNote API API Surface
Now
Near Future
Save to OneNote – News360, Feedly, Neat scanner, IFTTT actionEnumerate hierarchy – Location pickersQuery pages and get content- Query pages, display page content within your app or open page in OneNote, IFTTT triggers (coming soon)Implicit capture – Journal and event apps, health apps for wearables, smart appliances, etc.
OneNote as a source for user memories– Get images, documents, recipes, news, articles, business cards, location info, etc. captured by other 3rd party apps and build beautiful vertical experiences. Take advantage of full text search with spell correction to find relevant content
Apps
Apps evolved with the OneNote API API Surface
Now
Near Future
Save to OneNote – News360, Feedly, Neat scanner, IFTTT actionEnumerate hierarchy – Location pickersQuery pages and get content- Query pages, display page content within your app or open page in OneNote, IFTTT triggers (coming soon)Implicit capture – Journal and event apps, health apps for wearables, smart appliances, etc.
Intelligent more personal Apps and devices – Build smarter apps that naturally help users get more done: • Digital assistants will use the API to bring up the list of groceries if passing by the
market• Next gen appliances will show a list of recipes in my cookbook I can make with the
ingredients I have• Restaurant apps know about my food preferences and use them to suggest a list of
restaurants
OneNote as a source for user memories– Get images, documents, recipes, news, articles, business cards, location info, etc. captured by other 3rd party apps and build beautiful vertical experiences. Take advantage of full text search with spell correction to find relevant content
Demo
D-ScribeA digital scribe for your memories.
“Memory is the scribe of the soul.”-Aristotle
What did we learn?Implicit capture apps are the futureSmart and un-obtrusive. They add value without requiring explicit user action.Users don’t want to enter data. They want to use it - annotate, learn, and act on it. Mimic how humans effortlessly remember and evoke memoriesOneNote is the best place to store user memories
Next-gen apps will add more value while requiring less human input
New natural interfaces and devices such as wearables and smart appliances will require less and less human interaction. They will be configured to capture data in response to specific stimuli.Draw insights from captured data with the purpose of helping users: Do more and more efficiently Stay healthier and reach their activity goals Suggest places to eat, movies to watch, recipes to try, etc. based on their interests
Takeaways OneNote = Your notes available anywhere OneNote + API = Your memories available
anywhere Increase your app usage by saving to
OneNote Help us make OneNote the place for users
to remember anything Build more personal apps with the
OneNote API
Apiary console: http://dev.onenote.com/dev/docsApigee console: https://apigee.com/onenote/embed/console/onenote Beta features and news: http://blogs.msdn.com/b/onenotedev/API documentation: http://msdn.microsoft.com/en-us/library/office/dn575425.aspxCode samples: https://github.com/OneNoteDev Feature requests and feedback: https://onenote.uservoice.com/forums/245490-onenote-developersIssues and technical questions: http://stackoverflow.com/questions/tagged/onenoteSocial: https://twitter.com/onenotedevAPI roadmap: http://blogs.msdn.com/b/onenotedev/archive/2014/03/25/onenote-api-near-term-backlog.aspx
Email: [email protected]
Resources
Thank youSession feedback: http://aka.ms/omar