notebook: getNotebookFromWebUrl

Important

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

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

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

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Notes.Create, Notes.Read, Notes.ReadWrite, Notes.Read.All, Notes.ReadWrite.All
Application Notes.Read.All, Notes.ReadWrite.All

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

Here is an example of the request.

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

{"webUrl":"webUrl value"}
Response

Here is an example of the response.

Note: The response object shown here might be shortened for readability. All the properties will be returned from an actual call.

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