0

sample page update request in python -

headers: {'content-type': 'multipart/form-data; boundary=NoteBoundary','Authorization': 'Bearer '+token}

data:
--NoteBoundary
Content-Disposition: form-data; name="Commands"
Content-Type: application/json

[{'action': 'replace', 'content': 'last call', 'target': 'title'}, {'action': 'replace', 'content': '<html><head><title>last call</title><meta name="created" content="2017-04-04T07:12:36"</meta></head><body style="font-size:13px"><span style="font-size:12px;color: #3d7fba;margin-left: 3px;position: relative;;cursor: pointer;"></span><div><p>w</p>\n\n<p>96y09</p></div></body></html>', 'target': 'body'}]
--NoteBoundary--

request_url: 'https://www.onenote.com/api/v1.0/me/notes/pages/'+onenote_id

requests.patch(request_url, data = data, headers = headers)

When I update onenote page multiple times, it creates 1 duplicate copy of that note, further update request does not update duplicate note but continue updating the older note

Majorly on second update call it creates 1 duplicate copy

keshav
  • 734
  • 6
  • 19

1 Answers1

0

Are you sure the "duplicate page" you are seeing isn't a conflict page?

https://efficiency365.com/2015/07/02/how-to-handle-onenote-sync-conflicts/

Jorge Aguirre
  • 2,787
  • 3
  • 20
  • 27
  • Hey thnx for the quick reply, but this is really not the case, I first created that note on onenote section then sent update call to that note twice with a gap of atleast 1 min. Then when I see that note in onenote, it duplicates that note – keshav Apr 05 '17 at 08:27