0

I'm trying to backup/restore the OneNote contents on a business site.

Currently the API returns the HTML translated content of a Page, but some extensions or Ink data is missing.

Well, I did see Beta status API for Ink data. But why don't just get the whole data as it is, and restore it as it was? I also know OneNote data is synced on OneDrive storage, but downloading as it is and restore it with Graph API doesn't work.

I need to parse the HTML and download the resources again and if there's some missing content then I have to wait for another beta API. And when restore I have to construct a multi-part request.

Can you please provide additional API for downloading/uploading the RAW content?

Thanks in advance.

Locke
  • 315
  • 1
  • 3
  • 14

1 Answers1

0

This isn't supported by the OneNote API. In theory, you could use the OneDrive API to download the notebook as a folder or section as a file, which would have all the information.

Jorge Aguirre
  • 2,787
  • 3
  • 20
  • 27
  • And if you download the data with OneDrive API, you will get *.one, or *.onetoc2 file, which is completely a binary. Are you suggesting to analyze that binary data? – Locke Jan 10 '18 at 20:50
  • If you move one of those *.one file to OneDrive storage and want to see it one the OneNote site by just clicking on it, you will see the OneNote site will say there's something wrong. So just uploading *.one to the storage does not work. That's why I'm saying OneDrive API does not support it. If you know any link that I can analyze the *.one file structure, please let me know. – Locke Jan 10 '18 at 21:05
  • 1
    How are you downloading and uploading the sections or notebooks? I've done what Jorge proposes and this does work. However when you re-upload the sections or notebooks they get a new unique id and will not be accessible by their old id. One approach is to create a new notebook via the onenote-api (with the appropriate name) and then using the onedrive-api to fill it with the offline .one files. It can then be accessed by its name. Although the .one and .onetoc2 file structure is documented it is pretty heavy reading. – codeye Jan 13 '18 at 11:19