← Tools Reference

OneDrive

OneDrive integration (Storage, Productivity). Imported from open-connector.

OAuth9 toolshttps://graph.microsoft.com/v1.0
GET
one_drive_get_drive
Get metadata for the current drive or a specific drive.

/drives/{driveId}

2 parameters
ParamTypeRequiredDescription
driveIdstringrequiredOptional drive ID. Omit it to use the authenticated user's default OneDrive.
selectarrayoptionalOptional Microsoft Graph fields to include in the response.
GET
one_drive_get_root
Get metadata for the root folder of the current drive or a specific drive.

/drives/{driveId}

3 parameters
ParamTypeRequiredDescription
driveIdstringrequiredOptional drive ID. Omit it to use the authenticated user's default OneDrive.
selectarrayoptionalOptional Microsoft Graph fields to include in the response.
expandarrayoptionalOptional Microsoft Graph relationships to expand in the response.
GET
one_drive_get_item
Get metadata for a drive item by item ID or path.

/{itemId}/{driveId}

5 parameters
ParamTypeRequiredDescription
driveIdstringrequiredOptional drive ID. Omit it to use the authenticated user's default OneDrive.
itemIdstringrequiredOneDrive drive item ID.
itemPathstringoptionalPath from the drive root, starting with /.
selectarrayoptionalOptional Microsoft Graph fields to include in the response.
expandarrayoptionalOptional Microsoft Graph relationships to expand in the response.
GET
one_drive_list_folder_children
List the direct children of a folder in OneDrive.

/{folderItemId}/{driveId}

8 parameters
ParamTypeRequiredDescription
driveIdstringrequiredOptional drive ID. Omit it to use the authenticated user's default OneDrive.
folderItemIdstringrequiredOneDrive drive item ID.
folderPathstringoptionalPath from the drive root, starting with /.
topintegeroptionalMaximum number of items to return.
selectarrayoptionalOptional Microsoft Graph fields to include in the response.
expandarrayoptionalOptional Microsoft Graph relationships to expand in the response.
orderBystringoptionalOptional Microsoft Graph order-by expression.
nextLinkstringoptionalOpaque Microsoft Graph nextLink returned by a previous OneDrive response.
GET
one_drive_download_file
Download one file from OneDrive by item ID and return its content encoded as base64.

/{itemId}/{driveId}

5 parameters
ParamTypeRequiredDescription
driveIdstringrequiredOptional drive ID. Omit it to use the authenticated user's default OneDrive.
itemIdstringrequiredOneDrive drive item ID.
formatstringoptionalOptional format to convert the file into before download.
fileNamestringoptionalOptional file name to use for the downloaded file.
ifNoneMatchstringoptionalOptional eTag or cTag used for conditional download requests.
GET
one_drive_download_file_by_path
Download one file from OneDrive by path and return its content encoded as base64.

/content

4 parameters
ParamTypeRequiredDescription
driveIdstringoptionalOptional drive ID. Omit it to use the authenticated user's default OneDrive.
itemPathstringrequiredPath to a drive item relative to the drive root. A leading slash is optional.
fileNamestringoptionalOptional file name to use for the downloaded file.
ifNoneMatchstringoptionalOptional eTag or cTag used for conditional download requests.
GET
one_drive_download_item_as_format
Download one drive item after converting it to a supported Microsoft Graph format.

/{pathAndFilename}/{driveId}/pathAndFilename

5 parameters
ParamTypeRequiredDescription
driveIdstringrequiredOptional drive ID. Omit it to use the authenticated user's default OneDrive.
formatstringrequiredFormat to convert the drive item into.
itemIdstringoptionalOneDrive drive item ID.
pathAndFilenamestringrequiredPath to a drive item relative to the drive root. A leading slash is optional.
fileNamestringoptionalOptional file name to use for the downloaded file.
POST
one_drive_upload_file
Upload one file to OneDrive, optionally creating destination folders on the way.

/{parentItemId}/{driveId}

13 parameters
ParamTypeRequiredDescription
driveIdstringrequiredOptional drive ID. Omit it to use the authenticated user's default OneDrive.
folderstringoptionalDestination folder path starting with /, or a parent folder item ID.
namestringoptionalFile name used for inline upload content.
mimeTypestringoptionalMIME type used for inline upload content.
fileobjectoptionalFile uploaded through POST /api/files.
contentBase64stringoptionalBase64-encoded file content used for inline uploads.
textstringoptionalPlain-text file content used for inline uploads.
descriptionstringoptionalOptional OneDrive file description.
deferCommitbooleanoptionalUnsupported for now. Uploads are always committed immediately.
ifMatchstringoptionalOptional eTag used for conditional upload session creation.
fileSystemInfoobjectoptionalClient-side file system timestamps.
conflictBehaviorstringoptionalConflict behavior used when a file with the same name already exists.
parentItemIdstringrequiredPath parameter: parentItemId
PUT
one_drive_update_file_content
Replace the content of one existing OneDrive file.

/{itemId}/{driveId}

16 parameters
ParamTypeRequiredDescription
driveIdstringrequiredOptional drive ID. Omit it to use the authenticated user's default OneDrive.
itemIdstringrequiredOneDrive drive item ID.
fileobjectoptionalFile uploaded through POST /api/files.
contentBase64stringoptionalBase64-encoded file content used for inline uploads.
textstringoptionalPlain-text file content used for inline uploads.
namestringoptionalFile name used for inline upload content.
mimeTypestringoptionalMIME type used for inline upload content.
descriptionstringoptionalOptional OneDrive file description.
deferCommitbooleanoptionalUnsupported for now. Uploads are always committed immediately.
ifMatchstringoptionalOptional eTag used for conditional upload session creation.
ifNoneMatchstringoptionalOptional eTag used to prevent updates when the item has not changed.
fileSizeintegeroptionalOptional file size hint used by Microsoft Graph for quota checks.
fileSystemInfoobjectoptionalClient-side file system timestamps.
conflictBehaviorstringoptionalConflict behavior used when the updated content collides during commit.
driveItemSourceobjectoptionalA generic JSON object returned by Microsoft Graph.
mediaSourceobjectoptionalA generic JSON object returned by Microsoft Graph.