page: copyToSection

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

Copies a page to a specific section.

For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result.

Prerequisites

One of the following scopes is required to execute this API:
Notes.Create, Notes.ReadWrite, or Notes.ReadWrite.All

HTTP request

POST /me/onenote/pages/{id}/copyToSection
POST /users/{id | userPrincipalName}/onenote/pages/{id}/copyToSection
POST /groups/{id}/onenote/pages/{id}/copyToSection
POST /sites/{id}/onenote/pages/{id}/copyToSection

Request headers

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

Request body

In the request body, provide a JSON object that contains the parameters that your operation needs.

Parameter Type Description
siteCollectionId String The id of the SharePoint site to copy to. Use only when copying to an Office 365 team site.
siteId String The id of the SharePoint web to copy to. Use only when copying to an Office 365 team site.
groupId String The id of the group to copy to. Use only when copying to an Office 365 group.
id String Required. The id of the destination section.

Response

If successful, this method returns a 202 Accepted response code and an Operation-Location header. Poll the Operation-Location endpoint to get the status of the copy operation.

Example

Here is an example of how to call this API.

Request

Here is an example of the request.

POST https://graph.microsoft.com/beta/me/onenote/pages/{id}/copyToSection
Content-type: application/json
Content-length: 52

{
  "id": "id-value",
  "groupId": "groupId-value"
}
Response

Here is an example of the response.

HTTP/1.1 202 Accepted