Skip to content

Latest commit

 

History

History
96 lines (82 loc) · 2.96 KB

File metadata and controls

96 lines (82 loc) · 2.96 KB
title description ms.localizationpriority author ms.subservice doc_type
Update page
Update the content of a OneNote page.
medium
jewan-microsoft
onenote
apiPageType

Update page

Namespace: microsoft.graph

Update the content of a OneNote page.

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

PATCH /me/onenote/pages/{id}/content
PATCH /users/{id | userPrincipalName}/onenote/pages/{id}/content
PATCH /groups/{id}/onenote/pages/{id}/content
PATCH /sites/{id}/onenote/pages/{id}/content

Request headers

Name Type Description
Authorization string Bearer {token}. Required.
Content-Type string application/json

Request body

In the request body, supply an array of patchContentCommand objects that represent the changes to the page. For more information and examples, see Update OneNote pages.

Response

If successful, this method returns a 204 No Content response code. No JSON data is returned for a PATCH request.

Example

Request

The following example shows a request.

PATCH https://graph.microsoft.com/v1.0/me/onenote/pages/{id}/content
Content-type: application/json

[
   {
    'target':'#para-id',
    'action':'insert',
    'position':'before',
    'content':'<img src="image-url-or-part-name" alt="image-alt-text" />'
  }, 
  {
    'target':'#list-id',
    'action':'append',
    'content':'<li>new-page-content</li>'
  }
]

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


Response

The following example shows the response.

HTTP/1.1 204 No Content