Skip to content

Latest commit

 

History

History
141 lines (114 loc) · 4.96 KB

File metadata and controls

141 lines (114 loc) · 4.96 KB
title notebook: getNotebookFromWebUrl
description Retrieve the properties and relationships of a notebook object using its URL path.
author jewan-microsoft
ms.localizationpriority medium
ms.subservice onenote
doc_type apiPageType
ms.date 06/21/2024

notebook: getNotebookFromWebUrl

Namespace: microsoft.graph

Retrieve the properties and relationships of a notebook object by using its URL path.

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

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

HTTP request

POST /me/onenote/notebooks/GetNotebookFromWebUrl
POST /users/{id | userPrincipalName}/onenote/notebooks/GetNotebookFromWebUrl
POST /groups/{id}/onenote/notebooks/GetNotebookFromWebUrl
POST /sites/{id}/onenote/notebooks/GetNotebookFromWebUrl

Request headers

Name Type Description
Authorization string Bearer {token}. Required. Learn more about authentication and authorization.
Accept string application/json

Request body

In the request body, supply a JSON representation of the full URL path to the notebook you want to retrieve.

Property Type Description
webUrl String The URL path of the notebook to retrieve. It can also contain a "onenote:" prefix.

Response

If successful, this method returns a 200 OK response code and a notebook object in the response body.

Example

Request

The following example shows a request.

POST https://graph.microsoft.com/v1.0/me/onenote/notebooks/GetNotebookFromWebUrl
Content-type: application/json

{"webUrl":"webUrl value"}

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-Type: application/json; odata.metadata=minimal
Content-Length: 544

{
    "isDefault": true,
    "userRole": "userRole-value",
    "isShared": true,
    "sectionsUrl": "sectionUrl-value",
    "sectionGroupsUrl": "sectionGroupUrl-value",
    "links": {
        "oneNoteClientUrl": {
            "href": "href-value"
        },
        "oneNoteWebUrl": {
            "href": "href-value"
        }
    },
    "id": "id-value",
    "self": "self-value",
}