onenote resource type

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

The entry point for OneNote resources.

All calls to the OneNote service through the Microsoft Graph API use this service root URL:

https://graph.microsoft.com/{version}/{location}/onenote/ 

The location can be user notebooks on Office 365 or consumer OneDrive, group notebooks, or SharePoint site-hosted team notebooks on Office 365.

User notebooks To access personal notebooks on consumer OneDrive or OneDrive for Business, use one of the following URLs:

https://graph.microsoft.com/{version}/me/onenote/{notebooks | sections | sectionGroups | pages} 
https://graph.microsoft.com/{version}/users/{userPrincipalName}/onenote/{notebooks | sections | sectionGroups | pages} 
https://graph.microsoft.com/{version}/users/{id}/onenote/{notebooks | sections | sectionGroups | pages} 

Group notebooks To access notebooks that are owned by a group, use the following service root URL:

https://graph.microsoft.com/{version}/groups/{id}/onenote/{notebooks | sections | sectionGroups | pages} 

SharePoint site notebooks To access notebooks that are owned by a SharePoint team site, use the following service root URL:

https://graph.microsoft.com/{version}/sites/{id}/onenote/{notebooks | sections | sectionGroups | pages} 

Authorization

For information about the permissions required to work with OneNote APIs, see Notes permissions.

Relationships

Relationship Type Description
notebooks notebook collection The collection of OneNote notebooks that are owned by the user or group. Read-only. Nullable.
operations onenoteOperation collection The status of OneNote operations. Getting an operations collection is not supported, but you can get the status of long-running operations if the Operation-Location header is returned in the response. Read-only. Nullable.
pages onenotePage collection The pages in all OneNote notebooks that are owned by the user or group. Read-only. Nullable.
resources onenoteResource collection The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable.
sectionGroups sectionGroup collection The section groups in all OneNote notebooks that are owned by the user or group. Read-only. Nullable.
sections onenoteSection collection The sections in all OneNote notebooks that are owned by the user or group. Read-only. Nullable.

Methods

Method Return Type Description
Create notebook notebook Create a notebook by posting to the notebooks collection.
List notebooks notebook collection Get a collection of notebooks.
Create page onenotePage Create a page by posting to the pages collection.
List pages onenotePage collection Get a collection of pages.
List section groups sectionGroup collection Get a collection of section groups.
List sections onenoteSection collection Get a collection of sections.
{
  "notebooks": [{ "@odata.type": "microsoft.graph.notebook" }],
  "operations": [{ "@odata.type": "microsoft.graph.onenoteOperation" }],
  "pages": [{ "@odata.type": "microsoft.graph.onenotePage" }],
  "resources": [ { "@odata.type": "microsoft.graph.onenoteResource" } ],
  "sectionGroups": [ { "@odata.type": "microsoft.graph.sectionGroup" } ],
  "sections": [ { "@odata.type": "microsoft.graph.onenoteSection" } ]
}