Verwenden der OneNote-REST-APIUse the OneNote REST API
Mit Microsoft Graph kann Ihre App autorisierten Zugriff auf die OneNote-Notizbücher, Abschnitte und Seiten eines Benutzers in einem persönlichen oder Organisationskonto erhalten.Microsoft Graph lets your app get authorized access to a user's OneNote notebooks, sections, and pages in a personal or organization account. Mit den entsprechenden delegierten Berechtigungen oder Anwendungsberechtigungen kann die App auf die OneNote-Daten des angemeldeten Benutzers oder eines beliebigen Benutzers in einem Mandanten zugreifen.With the appropriate delegated or application permissions, your app can access the OneNote data of the signed-in user or any user in a tenant.
Stamm-URLRoot URL
Die Stamm-URL des OneNote-Diensts verwendet das folgende Format für alle Aufrufe der OneNote-API.The OneNote service root URL uses the following format for all calls to the OneNote API.
https://graph.microsoft.com/{version}/{location}/onenote/
Das Segment version
in der URL ist die Version von Microsoft Graph, die verwendet werden soll:The version
segment in the URL represents the version of Microsoft Graph that you want to use:
- Setzen Sie
v1.0
für stabilen Produktionscode.v1.0
is for stable production code. - Setzen Sie
beta
, wenn Sie ein Feature testen möchten, das sich noch in der Entwicklung befindet.beta
is to try out a feature that's in development. Features und Funktionen im Beta-Endpunkt können geändert werden. Es wird davon abgeraten, sie in Produktionscode zu verwenden.Features and functionality in the beta endpoint might change; we don't recommend that you use it in your production code.
Dabei kann es sich um Benutzer-Notebooks auf Microsoft 365 oder um OneDrive-Notebooks für Verbraucher, Gruppen-Notebooks oder Team-Notebooks mit SharePoint-Hosting auf Microsoft 365 handeln.The location can be user notebooks on Microsoft 365 or consumer OneDrive, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365.
BenutzernotizbücherUser notebooks
Verwenden Sie einen der folgenden URLs, um auf persönliche Notizbücher im OneDrive-Consumerdienst oder in OneDrive for Business zuzugreifen: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}
- Setzen Sie
me
für OneNote-Inhalte, auf die der aktuelle Benutzer zugreifen kann (eigene und freigegebene Inhalte).me
is for OneNote content that the current user can access (owned and shared). - Setzen Sie
users/{id}
für OneNote-Inhalte, die der (in der URL) angegebene Benutzer für den aktuellen Benutzer freigegeben hat.users/{id}
is for OneNote content that the specified user (in the URL) has shared with the current user. Verwenden der Benutzer-API.Use the users API.
Hinweis: Benutzer-IDs können Sie über eine GET-Anforderung an
https://graph.microsoft.com/v1.0/users
abrufen.Note: You can get user IDs by making a GET request onhttps://graph.microsoft.com/v1.0/users
.
GruppennotizbücherGroup notebooks
Verwenden Sie die folgende Dienststamm-URL, um auf Notizbücher zuzugreifen, die im Besitz einer Gruppe sind: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-Website-NotizbücherSharePoint site notebooks
Verwenden Sie die folgende Dienststamm-URL, um auf Notizbücher zuzugreifen, die einer SharePoint-Teamwebsite gehören: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}
NeuerungenWhat's new
Informieren Sie sich über die aktuellsten neuen Features und Updates für diesen API-Satz.Find out about the latest new features and updates for this API set.