来自 Microsoft Graph 和 Excel API 的陈旧数据
Stale data from Microsoft Graph and Excel API
我们正在使用 Microsoft Graph .NET 客户端库向 Excel API 发送请求,以便在 Office365 中读取或写入 Excel 文件。我们注意到我们从 API 返回的数据有时是陈旧的。
例如,如果我们向 Excel 文件添加一行,然后立即从同一个文件中读取所有行,即使添加请求成功,该行仍然会从数据中丢失我们读回来。如果我们等待几秒钟,该行就会显示出来。此问题不会始终如一地重现,延迟时间从不到一秒到有时几十秒不等。更新或删除操作也会出现同样的问题
据此,我们推测在 API 背后,数据需要大量时间才能在所有 Microsoft 服务器上传播,如果我们的请求并不总是路由到同一台服务器,我们将偶尔会打到没有最新数据的服务器
正在使用 Microsoft Graph API 或 Excel API 的人可以验证这个猜测吗?我们理解,随着 Microsoft 从交付打包软件过渡到构建云服务,将会出现问题和挑战,因此我们不期望立即得到解决方案。但是,由于我们的业务在很大程度上依赖于此 API,如果有已知问题,请告诉我们,这样至少我们可以尝试在我们这边找到解决方法。
如有任何回应,我们将不胜感激。提前谢谢你。
请检查
https://dev.office.com/blogs/power-your-apps-with-the-new-excel-rest-api
从上面复制URL:
Note: Any request that modifies the workbook should be performed in a
persisted session. Find more details on how to create a persisted
session in our documentation.
Create a persisted session
POST .../workbook/CreateSession
content-type: Application/Json
authorization: Bearer {access-token}
{ "persistChanges": true }
Response
HTTP code: 201, Created
content-type: application/json;odata.metadata
{ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.sessionInfo", "id": "{session-id}", "persistChanges": true}
Usage The session ID returned from the CreateSession call is then
passed as a header on subsequent API requests using the
workbook-session-id HTTP header.
GET .../workbook/Worksheets
authorization: Bearer {access-token}
workbook-session-id: {session-id}
我们正在使用 Microsoft Graph .NET 客户端库向 Excel API 发送请求,以便在 Office365 中读取或写入 Excel 文件。我们注意到我们从 API 返回的数据有时是陈旧的。
例如,如果我们向 Excel 文件添加一行,然后立即从同一个文件中读取所有行,即使添加请求成功,该行仍然会从数据中丢失我们读回来。如果我们等待几秒钟,该行就会显示出来。此问题不会始终如一地重现,延迟时间从不到一秒到有时几十秒不等。更新或删除操作也会出现同样的问题
据此,我们推测在 API 背后,数据需要大量时间才能在所有 Microsoft 服务器上传播,如果我们的请求并不总是路由到同一台服务器,我们将偶尔会打到没有最新数据的服务器
正在使用 Microsoft Graph API 或 Excel API 的人可以验证这个猜测吗?我们理解,随着 Microsoft 从交付打包软件过渡到构建云服务,将会出现问题和挑战,因此我们不期望立即得到解决方案。但是,由于我们的业务在很大程度上依赖于此 API,如果有已知问题,请告诉我们,这样至少我们可以尝试在我们这边找到解决方法。
如有任何回应,我们将不胜感激。提前谢谢你。
请检查 https://dev.office.com/blogs/power-your-apps-with-the-new-excel-rest-api
从上面复制URL:
Note: Any request that modifies the workbook should be performed in a persisted session. Find more details on how to create a persisted session in our documentation.
Create a persisted session
POST .../workbook/CreateSession content-type: Application/Json authorization: Bearer {access-token} { "persistChanges": true }
Response HTTP code: 201, Created content-type: application/json;odata.metadata { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.sessionInfo", "id": "{session-id}", "persistChanges": true}
Usage The session ID returned from the CreateSession call is then passed as a header on subsequent API requests using the workbook-session-id HTTP header.
GET .../workbook/Worksheets authorization: Bearer {access-token} workbook-session-id: {session-id}