0

我正在使用 OneNote/content端点来检索页面内容,如下所述:https ://docs.microsoft.com/en-us/graph/api/page-get?view=graph-rest-1.0

但是,调用返回GET/me/onenote/pages/{id}/content[?includeIDs=true]我:

{
    "error": {
        "code": "BadRequest",
        "message": "Resource not found for the segment 'content['.",
        "innerError": {
            "request-id": "6b7e5549-32a5-4b6f-80ed-ecacp9v41699",
            "date": "2020-03-31T00:05:27"
        }
    }
}

调用返回GET/me/onenote/pages/{id}/content

{
  "_readableState": {
    "objectMode": false,
    "highWaterMark": 16384,
    "buffer": {
      "head": null,
      "tail": null,
      "length": 0
    },
    "length": 0,
    "pipes": [],
    "flowing": null,
    "ended": false,
    "endEmitted": false,
    "reading": false,
    "sync": false,
    "needReadable": false,
    "emittedReadable": false,
    "readableListening": false,
    "resumeScheduled": false,
    "errorEmitted": false,
    "emitClose": true,
    "autoDestroy": false,
    "destroyed": false,
    "defaultEncoding": "utf8",
    "awaitDrainWriters": null,
    "multiAwaitDrain": false,
    "readingMore": false,
    "decoder": null,
    "encoding": null
  },
  "readable": true,
  "_events": {},
  "_eventsCount": 5,
  "_writableState": {
    "objectMode": false,
    "highWaterMark": 16384,
    "finalCalled": false,
    "needDrain": false,
    "ending": false,
    "ended": false,
    "finished": false,
    "destroyed": false,
    "decodeStrings": true,
    "defaultEncoding": "utf8",
    "length": 0,
    "writing": false,
    "corked": 0,
    "sync": true,
    "bufferProcessing": false,
    "writecb": null,
    "writelen": 0,
    "afterWriteTickInfo": null,
    "bufferedRequest": null,
    "lastBufferedRequest": null,
    "pendingcb": 0,
    "prefinished": false,
    "errorEmitted": false,
    "emitClose": true,
    "autoDestroy": false,
    "errored": false,
    "bufferedRequestCount": 0,
    "corkedRequestsFree": {
      "next": null,
      "entry": null
    }
  },
  "writable": true,
  "allowHalfOpen": true,
  "_transformState": {
    "needTransform": false,
    "transforming": false,
    "writecb": null,
    "writechunk": null,
    "writeencoding": null
  }
}

两者都不返回实际的页面内容。任何想法?

4

1 回答 1

0

“includeIDs”是一个可选的查询参数。删除它周围的方括号以消除错误请求错误。所以请求应该是 GET on /me/onenote/pages/{id}/content?includeIDs=true

于 2020-03-31T16:25:53.530 回答