I would like to use the checkout / checkin function in the OneDrive REST API : https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_checkout
I ran into two problems:
1st issue - the file API returns the publication property as published , even the file is manually checked
Request:
https://graph.microsoft.com/v1.0/sites/SITE_ID/drive/items/FILE_ID?select=name,id,publication
Answer:
{ "id": "01KJOOXJHF77OPSR7HWVCKSTHBQJQZEBJI", "name": "diamond.mmap", "publication": { "level": "published", "versionId": "2.0" } }

2nd Issue - weird endpoint answer checkout / checkin:
I am using an endpoint as defined here https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_checkout
eg. https://graph.microsoft.com/v1.0/sites/SITE_ID/drive/items/FILE_ID/checkout
Answered with:
{ "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" } } }
Has anyone thought I am missing?
rest sharepoint onedrive microsoft-graph
vt.
source share