Capability Sources

Search OneDrive and SharePoint files as the calling member

Changed on

Searches file names and content across every OneDrive and SharePoint library the member can open (including files shared with them and Teams files) when the connection has the all-files permission; otherwise only the member's own OneDrive, as scope reports. Results carry driveId and id for reading, pulling or saving. Read-only. Pass nextPageToken as pageToken for the next page; hasMore with a null token means the list is partial.

get/v1/capabilities/microsoft-365/drive-files

Request

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

Query parameters

query, string required

Text to search in file names and content.

maxResults, integer

Maximum files to return, capped at 25.

pageToken, string

nextPageToken from the previous page of the same list

Response

Files returned.

Microsoft365DriveFilesResponse required
ok, true required
files, Microsoft365DriveItem[] required
scope, 'all' | 'myDrive' required

all: every OneDrive and SharePoint file the member can open; myDrive: only their own OneDrive, because the connection lacks the all-files permission.

nextPageToken, string nullable required
hasMore, boolean required

Changes

    • breaking

      for the query request parameter pageToken, the minLength was increased from 0 to 1

    • warning

      for the query request parameter pageToken, the maxLength was set to 4096

    • info

      removed the pattern ^\d{1,6}$ from the query request parameter pageToken

    2 more changes in this revision