title | description | ms.localizationpriority | author | ms.subservice | doc_type |
---|---|---|---|---|---|
Update page |
Update the content of a OneNote page. |
medium |
jewan-microsoft |
onenote |
apiPageType |
Namespace: microsoft.graph
Update the content of a OneNote page.
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]
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
Name | Type | Description |
---|---|---|
Authorization | string | Bearer {token}. Required. |
Content-Type | string | application/json |
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.
If successful, this method returns a 204 No Content
response code. No JSON data is returned for a PATCH 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]
The following example shows the response.
HTTP/1.1 204 No Content