Microsoft Graph API - Upload file action

The Upload file action enables you to upload a file by providing the file contents. If a file with the same name already exists in the folder, this action overwrites the file contents.

Input

Input fieldDescription
Drive IDThe unique identifier of the OneDrive or SharePoint drive.
Folder IDThe unique identifier of the destination folder in the drive.
File nameThe name of the file to be uploaded.
File contentThe actual data or content of the file.
Mime typeThe format of the file.

Output

Output fieldDescription
IDThe unique identifier of the item within the Drive.
Created byIdentity of the user, device, and application that created the item.
Created date timeTimestamp when the file was created.
DescriptionUser-provided description of the file.
E tageTag for the entire item (metadata + content).
Last modified byIdentity of the user, device, and application that last modified the item.
Last modified date timeDate and time the item was last modified.
NameThe name of the item (filename and extension).
Parent referenceParent information, if the item has a parent.
Web URLURL that displays the resource in the browser.
Created by userIdentity of the user who created the item.
Last modified by userIdentity of the user who last modified the item.
AudioAudio metadata, if the item is an audio file.
BundleBundle metadata, if the item is a bundle.
ContentThe content stream, if the item represents a file.
C tagAn eTag for the content of the item. This eTag isn't changed if only the metadata is changed. Note This property isn't returned if the item is a folder.
DeletedInformation about the deleted state of the item.
FileFile metadata, if the item is a file.
File system infoFile system information on client.
FolderFolder metadata, if the item is a folder.
ImageImage metadata, if the item is an image.
LocationLocation metadata, if the item has location data.
MalwareMalware metadata, if the item was detected to contain malware.
PackageIf present, indicates that this item is a package instead of a folder or file. Packages are treated like files in some contexts and folders in others.
Pending operationsIf present, indicates that one or more operations that might affect the state of the driveItem are pending completion.
PhotoPhoto metadata, if the item is a photo.
PublicationProvides information about the published or checked-out state of an item, in locations that support such actions. This property isn't returned by default.
Remote itemRemote item data, if the item is shared from a drive other than the one being accessed.
RootIf this property is non-null, it indicates that the driveItem is the top-most driveItem in the drive.
Search resultSearch metadata, if the item is from a search result.
SharedIndicates that the item was shared with others and provides information about the shared state of the item.
Sharepoint IDsReturns identifiers useful for SharePoint REST compatibility.
Special folderIf the current item is also available as a special folder, this facet is returned.
SizeSize of the item in bytes.
VideoVideo metadata, if the item is a video.
Web dav URLWebDAV compatible URL for the item.
WorkbookFor files that are Excel spreadsheets, access to the workbook API to work with the spreadsheet's contents.
AnalyticsAnalytics about the view activities that took place on this item.
ChildrenCollection containing Item objects for the immediate children of Item. Only items representing folders have children.
List itemFor drives in SharePoint, the associated document library list item.
PermissionsThe set of permissions for the item.
Retention labelInformation about retention label and settings enforced on the driveItem.
SubscriptionsThe set of subscriptions on the item. Only supported on the root of a drive.
ThumbnailsCollection of thumbnailSet objects associated with the item. For more information, see getting thumbnails.
VersionsThe list of previous versions of the item. For more info, see getting previous versions.

Please refer to the Properties for detailed schema.

Last updated: