我想使用OneDrive REST API 上的签出/签入功能:
https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_checkout https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_checkout
我面临两个问题:
第一期- 文件信息API返回publication
财产为published
,甚至手动检出文件
Request:
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"
}
}
第二期- 结账/签入端点的奇怪响应:
我正在使用此处定义的端点https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_checkout https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_checkout
e.g.
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"
}
}
}
有想过我错过了什么吗?