How to Stop OneNote API From Returning ID for Deleted Pages

血红的双手。 提交于 2021-01-29 22:09:51

问题


I place a call using the OneNote REST API to return a list of all the pages in a section. This works successfully. However, some of the pages it returns should no longer exist! Yet I can see their information, IDs, etc., even though they have previously been deleted. But if I try to delete them again using REST, I get the error:

ERROR (deleteFromURL):  <Response [404]>
{
    "error":{
      "code":"20102","message":"The specified resource ID does not exist.","@api.url":"http://aka.ms/onenote-errors#C20102"
    }
}

How come OneNote keeps returning pages that no longer exist (even after many days), and how do I prevent it from doing so?


回答1:


EDIT: This option is no longer available.


I assume these pages do appear as deleted in your notebook if you open OneNote. Can you try adding this header to your GET ~/pages request?

FavorDataRecency: true

This will bypass our index and go directly to your pages. It will take longer but should be consistent - do you see your pages when you do that?

Additionally, to better investigate this on our end, can you provide us with - The value of the X-CorrelationId header of your API request to GET pages (the one without the FavorDataRecency header) - One of the id's of your deleted pages



来源:https://stackoverflow.com/questions/38621322/how-to-stop-onenote-api-from-returning-id-for-deleted-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!