Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Hi there,
In this Beta API update we are allowing developers to change the indentation level for a page (aka page level) programmatically.
For those of you who are unfamiliar with this feature, the following image shows how pages can be indented in three levels:
Here is a quick recipe for how to do this, followed by an example:
Here's an example of what such a request might look like if we wanted to change the indentation level of a specific page to 1:
PATCH https://www.onenote.com/api/beta/me/notes/pages/1-567446387463478
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1...
{"level": "1"}
Gotchas:
You can use the following APIs to get the value of the current page level:
GET https://www.onenote.com/api/v1.0/me/notes/pages/{id}?pagelevel=true
Or
GET https://www.onenote.com/api/v1.0/me/notes/sections/{id}/pages?pagelevel=true
Please note that you will have to append the pagelevel=true parameter to the request URL.
Let us know what you think on UserVoice, contact us on twitter @onenotedev, or ask questions tagged onenote on Stack Overflow.
Enjoy,
Yanir
Anonymous
February 05, 2016
is it possible to batch rename pages to either include some constant variable "WSJ" or modified date formated like "YYYY-MM-DD HHMMSS"?
Anonymous
March 22, 2016
sorry we don't have batching support in the APIs but individual pages can be renamed easily
Anonymous
May 24, 2016
Hi,We tried the above method to create subpage, but unfortunately we got an error saying "Bad-Request". The problem what we are facing is we don't know where exactly we need to add/append the JSON object i.e. "{"level": "1"}" to the request body.In patch command what should be the value of "Target"? Please help us out to break this.
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in