Capability Sources

Read a OneDrive or SharePoint text or binary file as the calling member

Changed on

Returns metadata and content using strict-UTF-8 content sniffing: text is returned regardless of MIME type, while binary files are returned as standard base64 up to 10 MiB. Folders and oversized files return metadata with an explicit contentUnavailableReason. Pass driveId for files outside the member's own OneDrive.

get/v1/capabilities/microsoft-365/drive-file/{itemId}

Request

  • Base URL
    https://api.openworklabs.com
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Path parameters

itemId, string required

Microsoft Graph drive item id.

Query parameters

driveId, string

The file's driveId from a search, folder or link result. Omit for the member's own OneDrive.

Response

OneDrive file returned.

Microsoft365DriveFileResponse required
ok, true required
file, object required

Changes

    • breaking

      the response property file/content became nullable for the status

    • breaking

      the response property file/contentBase64 became nullable for the status

    • breaking

      the response property file/contentType became nullable for the status

    5 more changes in this revision