gpt4 book ai didi

rest - checkin / checkout 文件时共享点 `Unsupported segment type`

转载 作者:行者123 更新时间:2023-12-04 12:51:30 25 4
gpt4 key购买 nike

我想使用 OneDrive REST API 上的 checkout / checkin 功能 :
https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_checkout

我面临两个问题:

第一期 - 文件信息 API 返回 publication属性为 published , 即使文件被手动 checkout

要求:
https://graph.microsoft.com/v1.0/sites/SITE_ID/drive/items/FILE_ID?select=name,id,publication
回复:

{
"id": "01KJOOXJHF77OPSR7HWVCKSTHBQJQZEBJI",
"name": "diamond.mmap",
"publication": {
"level": "published",
"versionId": "2.0"
}
}

enter image description here

第二期 - 结帐/ checkin 端点的奇怪响应:

我正在使用此处定义的端点
https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_checkout

例如 https://graph.microsoft.com/v1.0/sites/SITE_ID/drive/items/FILE_ID/checkout
回应:
{
"error": {
"code": "BadRequest",
"message": "Unsupported segment type. ODataQuery: sites/fe688d8ed4a2/drive/items/01KJOQZEBJI/checkout",
"innerError": {
"request-id": "a7d18555-3e74-4aea-ad92-539481f6c33b",
"date": "2018-02-21T09:17:00"
}
}
}

有没有想过我错过了什么?

最佳答案

/checkin /checkout 端点当前位于 beta .

尝试从 https://graph.microsoft.com/v1.0/ 更改您的 URI 的根目录至 https://graph.microsoft.com/beta/ :

https://graph.microsoft.com/v1.0/sites/{siteId}/drive/items/{itemId}/checkout

关于rest - checkin / checkout 文件时共享点 `Unsupported segment type`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48902182/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com