Skip to content

Latest commit

 

History

History
147 lines (117 loc) · 5.12 KB

notebook-getnotebookfromweburl.md

File metadata and controls

147 lines (117 loc) · 5.12 KB
title description author ms.localizationpriority ms.subservice doc_type
notebook: getNotebookFromWebUrl
Retrieve the properties and relationships of a notebook object using its URL path.
jewan-microsoft
medium
onenote
apiPageType

notebook: getNotebookFromWebUrl

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

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.
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/beta/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]

[!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",
}