OneDrive API:创建和接收项目(嵌入式)链接

OneDrive API: creating and receiving item (embedded) links

1) 如何通过 OneDrive API 创建 嵌入式 link (https://api.onedrive.com/)?我知道可以通过以下 POST 调用创建视图或编辑 link:

POST https://api.onedrive.com/v1.0/drive/items/{item-id}/action.createLink
Body: {  "type": "view|edit" }

但是请求 'embed' 是不可能的,尽管 documentation 表明它是有效类型之一。我知道可以通过 Live SDK:

https://apis.live.net/v5.0/{file-ID}/embed?access_token=ACCESS_TOKEN

但是如何为 OneDrive API 执行此操作?

2) 是否可以通过 OneDrive API 以另一种方式接收已经 现有的 links =14=]打电话?例如通过扩展元数据?

https://api.onedrive.com/v1.0/drive/items/{item-id}?expand=***links/permissions***

我发现 Github OneDrive forum 上有人问了同样的问题。您可以在下面看到他们的答案:

  1. Currently the OneDrive API only supports view and read links. You can vote to include embed support via their User Voice page.

  2. In the future, you'll be able to enumerate existing links on an item (at least those links created by your app) to discover existing URLs without the need to call createLink. There is not yet a timeframe for when we'll roll that out, but it should be soon.