遗憾的是,OneNote API 目前不支持识别页面内容中指向其他 OneNote 页面的链接。 OneNote 中的链接可以是任何内容的链接:网站、其他 OneNote 页面/部分/笔记本、网络共享...
该 API 确实支持通过使用获取页面链接
GET ~/pages
GET ~/sections/id/pages
页面元数据模型包含带有 clientUrl 和 webUrl 的链接对象。
问题更新后编辑:
你是对的 - 链接中的 id 与 OneNote API 的 id 不对应。不过,您可以将链接中的 id 与 API 中公开的 OneNoteClientUrl 中的 id 进行比较。这是一个响应的示例
GET ~/sections/id/pages
GET ~/pages
{
"title": "由 WAC 创建",
"createdByAppId": "",
“链接”:{“oneNoteClientUrl”:{
“href”:“onenote:”
},
“oneNoteWebUrl”:{
“参考”:“”
}},
“内容网址”:“https://www.onenote.com/api/v1.0/me/notes/pages/0-a50842a9873945379f3d891a7420aa39!14-29056CF89BB2D216!162/content https://www.onenote.com/api/v1.0/me/notes/pages/0-a50842a9873945379f3d891a7420aa39!14-29056CF89BB2D216!162/content“,
“缩略图网址”:“https://www.onenote.com/api/v1.0/me/notes/pages/0-a50842a9873945379f3d891a7420aa39!14-29056CF89BB2D216!162/thumbnail https://www.onenote.com/api/v1.0/me/notes/pages/0-a50842a9873945379f3d891a7420aa39!14-29056CF89BB2D216!162/thumbnail“,
"最后修改时间": "2016-03-28T21:36:22Z",
“id”:“0-a50842a9873945379f3d891a7420aa39!14-29056CF89BB2D216!162”,
“自己”: ”https://www.onenote.com/api/v1.0/me/notes/pages/0-a50842a9873945379f3d891a7420aa39!14-29056CF89BB2D216!162 https://www.onenote.com/api/v1.0/me/notes/pages/0-a50842a9873945379f3d891a7420aa39!14-29056CF89BB2D216!162“,
"创建时间": "2016-03-24T20:38:16Z",
”[电子邮件受保护] /cdn-cgi/l/email-protection": "https://www.onenote.com/api/v1.0/ https://www.onenote.com/api/v1.0/$metadata#me/notes/pages('0-a50842a9873945379f3d891a7420aa39%2114-29056CF89BB2D216%21162')/parentSection(id,name,self)/$entity",
“父节”:{
"id": "0-29056CF89BB2D216!162",
"name": "哈里的部分",
“自己”: ”https://www.onenote.com/api/v1.0/me/notes/sections/0-29056CF89BB2D216!162 https://www.onenote.com/api/v1.0/me/notes/sections/0-29056CF89BB2D216!162”
}
}
您还可以使用以下方法过滤服务器端(如果您想避免分页和正则表达式;))链接中的 id:
GET ~/pages?$filter=contains(links/oneNoteClientUrl/href,'a60de930-0b03-4527-bf54-09f3b61d8838')