Checkin/chekout文件时Sharepoint`不支持的段类型`

vt.*_*vt. 7 rest sharepoint onedrive microsoft-graph

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

我面临两个问题:

第一个问题 - 文件信息API返回publication属性published,即使手动检出文件也是如此

请求:

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"
    }
}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

第二期 - 结账/签到端点的奇怪响应:

我正在使用此处定义的端点 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"
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

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

Mar*_*eur 1

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

尝试将 URI 的根从更改https://graph.microsoft.com/v1.0/https://graph.microsoft.com/beta/

https://graph.microsoft.com/v1.0/sites/{siteId}/drive/items/{itemId}/checkout
Run Code Online (Sandbox Code Playgroud)