Onedriveconnector v1.0

Version 1.0

Connector Overview: This page documents all 19 actions for the Onedriveconnector v1.0.

General (5)

POST Copy a DriveItem

/drives/{driveId}/items/{itemId}/copy

Creates a copy of a DriveItem (file or folder), optionally in a new location or with a new name.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Driveid

The unique identifier of the drive that contains the item to be copied.

Itemid

The unique identifier of the DriveItem to be copied.

Response Type

The response format expected from the API (e.g. application/json).

Options (1)

Option Name

Description

Name

New name for the copied file/folder. If omitted, the original name is retained.

POST Copy a DriveItem in Personal OneDrive

/me/drive/items/{item-id}/copy

Creates an asynchronous copy of a DriveItem within your personal OneDrive. Use this action to duplicate a file or folder in your own drive.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Item-id

The unique identifier of the DriveItem in your personal OneDrive to be copied.

Response Type

The response format expected from the API (e.g. application/json).

Options (1)

Option Name

Description

Name

New name for the copied file/folder. If omitted, the original name is retained.

POST Copy a DriveItem in SharePoint Site Drive

/sites/{siteId}/drive/items/{itemId}/copy

Creates an asynchronous copy of a DriveItem in a SharePoint site drive. Use this action to duplicate a file or folder stored in a SharePoint site's document library.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Siteid

The unique identifier of the SharePoint site that contains the drive.

Itemid

The unique identifier of the DriveItem to be copied.

Response Type

The response format expected from the API (e.g. application/json).

Options (1)

Option Name

Description

Name

New name for the copied file/folder. If omitted, the original name is retained.

POST Copy a DriveItem in a Group Drive

/groups/{groupId}/drive/items/{itemId}/copy

Creates an asynchronous copy of a DriveItem in a group drive. Use this action to duplicate a file or folder stored in a Microsoft 365 group's document library.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Groupid

The unique identifier of the Microsoft 365 group that contains the drive.

Itemid

The unique identifier of the DriveItem to be copied.

Response Type

The response format expected from the API (e.g. application/json).

Options (1)

Option Name

Description

Name

New name for the copied file/folder. If omitted, the original name is retained.

POST Copy a DriveItem in a User's OneDrive

/users/{userId}/drive/items/{itemId}/copy

Creates an asynchronous copy of a DriveItem in a specified user's OneDrive. Use this action to duplicate a file or folder in another user's drive.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Userid

The unique identifier of the user whose OneDrive contains the item to be copied.

Itemid

The unique identifier of the DriveItem to be copied.

Response Type

The response format expected from the API (e.g. application/json).

Options (1)

Option Name

Description

Name

New name for the copied file/folder. If omitted, the original name is retained.

Download

GET Download Asset

x-oneteg-downloader-path-without-authorization

Downloads a file asset from a specified URL without requiring explicit authorization headers. Use this action to retrieve a file from a direct download link.

Parameters

Parameter Name

Description

HTTP Method

The HTTP method to use for the download request, typically GET.

Download Url

The direct download URL of the asset to be downloaded.

Asset Name

The desired file name for the downloaded asset.

Try Count

The number of times to retry the download in case of failure.

Read Timeout (seconds)

The maximum time in seconds to wait for data to be read from the response.

Connection Timeout (seconds)

The maximum time in seconds to wait for a connection to be established.

Load File Content As Output

This toggle enables you to load file content as the step output. Supported formats include JSON, XML, YML/YAML, CSV, TXT, and other text-based file types. Note that images, PDF files, and other binary formats cannot be loaded. Additionally, there is a file size limit for this feature; please check the logs for details.

Follow Redirects

Enable or disable following URL redirects. If it is enabled, it will follow the URL redirects.

headers

Additional HTTP header name/value pairs to include in the request.

Drive (12)

POST 1. Create session

/me/drive/root:/{item-path}:/createUploadSession

Creates an upload session for uploading a large file to a specific path in your OneDrive. Use this action as the first step in a resumable upload process.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Item-path

The path to the destination file relative to the root of your OneDrive, including the file name and extension.

Response Type

The response format expected from the API (e.g. application/json).

Options (3)

Option Name

Description

@microsoft.graph.conflictbehavior

How to handle a naming conflict when the upload completes; for example, replace, rename, or fail.

Description

A description for the file being uploaded.

Name

The name of the file to be created in the upload session.

PUT 2. Upload file

/me/drive/uploadSession

Uploads a file chunk to an active upload session created by the Create session action. Use this action to send file data in fragments for large uploads.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Guid

A unique identifier for the upload session fragment.

Overwrite

Whether to overwrite an existing file with the same name when the upload completes.

Rename

Whether to automatically rename the file if a naming conflict occurs.

Dc

The data center number used for routing the upload.

Tempauth

A temporary authentication token for the upload session.

Content-length

The total length in bytes of the file chunk being uploaded in this request.

Content-range

The byte range of the chunk being uploaded, for example bytes 0-1023/2048.

Response Type

The response format expected from the API (e.g. application/json).

Options (3)

Option Name

Description

@microsoft.graph.conflictbehavior

How to handle a naming conflict when the upload completes; for example, replace, rename, or fail.

Description

A description for the file being uploaded.

Name

The name of the file being uploaded.

POST Create a folder

/me/drive/root/children

Creates a new folder as a child of the root of your OneDrive. Use this action to organize files into a new directory.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Response Type

The response format expected from the API (e.g. application/json).

Options (2)

Option Name

Description

Name

The name of the new folder to be created.

Folder

An empty JSON object indicating that the item is a folder.

POST Get Access Token Through OAuth Copy

/me/drive/

Retrieves an OAuth access token for the OneDrive connector by using a copied token from an existing authenticated session. Use this action when you need to obtain a token for subsequent API calls.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Response Type

The response format expected from the API (e.g. application/json).

GET Get a DriveItem resource by Path

/me/drive/root:/{ItemPath}

Retrieves the metadata of a DriveItem located at a specific path in your OneDrive. Use this action to get details about a file or folder by its path.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Itempath

The path to the DriveItem relative to the root of your OneDrive, including the file name and extension.

Response Type

The response format expected from the API (e.g. application/json).

GET Get files shared with me

/me/drive/sharedWithMe

Retrieves a list of files and folders that have been shared with the current user. Use this action to view items shared from other users.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Content-type

The content type of the request, typically application/json.

Response Type

The response format expected from the API (e.g. application/json).

GET Get my recent files

/me/drive/recent

Retrieves a list of the most recently accessed files in your OneDrive. Use this action to quickly find files you have worked on recently.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Content-type

The content type of the request, typically application/json.

Response Type

The response format expected from the API (e.g. application/json).

GET List All Files From Folder

/me/drive/items/{FolderId}/children

Retrieves a list of all files and folders inside a specified folder in your OneDrive. Use this action to browse the contents of a folder by its identifier.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Folderid

The unique identifier of the folder whose children you want to list.

Response Type

The response format expected from the API (e.g. application/json).

GET List All Files From Root Folder

/me/drive/root/children

Retrieves a list of all files and folders in the root of your OneDrive. Use this action to list the top-level contents of your drive.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Content-type

The content type of the request, typically application/json.

Response Type

The response format expected from the API (e.g. application/json).

GET Search my OneDrive

/me/drive/root/search(q='test')

Searches your OneDrive for files and folders matching the specified query. Use this action to find items by name or content.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Select

A comma-separated list of properties to include in the response for each matched item.

Content-type

The content type of the request, typically application/json.

Response Type

The response format expected from the API (e.g. application/json).

PATCH Update Item Properties

/sites/{SiteId}/drive/items/{ItemId}

Update the properties of an existing item, such as its title, in a drive on a SharePoint site.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Siteid

The unique identifier of the SharePoint site that contains the drive.

Itemid

The unique identifier of the item whose properties are to be updated.

Response Type

The response format expected from the API (e.g. application/json).

Options (1)

Option Name

Description

Title

The new title to assign to the item.

PUT Upload simple file

/me/drive/root:/{file_name}:/content

Upload a file to the root of the user's OneDrive, replacing the content if the file already exists.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

File Name

The name of the file to upload, including its extension. The file content is provided in the request body.

Response Type

The response format expected from the API (e.g. application/json).

Options (1)

Option Name

Description

File

The binaries of the file

Misc

GET Get Item by Path

/{ItemPath}

Retrieve a file or folder from OneDrive by specifying its path.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Itempath

OneDrive also supports path-based addressing. This allows you to use a friendly URL syntax to address items relative to the hierarchy of items visible in OneDrive.

Response Type

The response format expected from the API (e.g. application/json).