Velojet
Velojet

Reputation: 948

Can the OneNote API tell if a page is a sub-page? And if a page has sub-pages?

Is there any way the OneNote API can report whether a page is a sub-page of another page, and if so, what that parent page is? And vice versa, if a page can report what sub-pages it has?

Upvotes: 1

Views: 229

Answers (3)

DipakBoyed
DipakBoyed

Reputation: 432

We added an optional query param ?pagelevel=true to our GET/PATCH Pages APIs which now let's you fetch and edit the page's level.

GET https://www.onenote.com/api/v1.0/me/notes/pages/{id}?pagelevel=true
will include in the json a pagelevel property.
where 0 means no indentation at all and 2 is the maximum indentation level.

Upvotes: 1

DaKeller-MSFT
DaKeller-MSFT

Reputation: 81

The OneNote API (speaking of the one at http://dev.onenote.com/) does not support this at this time. I will have this added to our backlog for consideration.

Upvotes: 2

user3362735
user3362735

Reputation:

https://msdn.microsoft.com/en-us/library/office/aa286798%28v=office.12%29.aspx#Office2007OneNoteWhatsNew2_NotebookHierarchyElements

The "isSubPage" attribute should help you find out whether or not the page is a sub page.

Upvotes: 2

Related Questions