0
votes

I have a OneNote notebook that is shared in a OneDrive library. When trying to get the sections via the REST API, I get the 10008 error message explaining that I have more than 5000 items and the query cannot be completed. I know that this notebook has far less than 5000 sections, but the OneDrive library has more than 5000 items.

My query is as follows:

https://www.onenote.com/api/v1.0/users/{user id}/notes/notebooks/{notebook id}/sections

I would have expected this kind of error if I was expecting to return 5000+ items, but in this case, I'm expecting somewhere in the neighborhood of 10-20 sections.

I have two questions I'd like answered by the OneNote product group:

  1. Is there a way around this without moving the notebook?
  2. Can I get an explanation as to why this is necessary?
1

1 Answers

0
votes
  1. Is there a way around this without moving the notebook?

Splitting notebooks across multiple list should solve this problem. You would like to make sure that any list doesn’t contain more than 5000 notebooks or sections

  1. Can I get an explanation as to why this is necessary?

Given notebooks contains only 10-20 sections, however the SharePoint indexing mechanism considers all the sections available in List while filtering sections for given notebook and hence API will fail with this error message when your list contains more than 5000 notebooks or sections