Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
Creates a copy of a file.
POST
https://drive.cloud.hicloud.com/drive/v1/files/{fileId}/copy
*Some parameters are mandatory.
| Parameter Name | Type | Description | |
| fileId | string | path | File ID. (Mandatory) |
| fields | string | query | Fields in the request, which are in the partial response format. |
| form | string | query | Media format. |
| prettyPrint | boolean | query | Indicates whether to return a response in a human-readable format. |
| quotaId | string | query | User identifier, consisting of 40 characters at maximum. It is used to restrict the number of API calls of an individual user. |
| callback | string | query | Callback function used in JSONP requests. |
| x-hw-trace-id | string | header | ID used for service tracing. |
| x-hw-app-id | string | header | App ID. |
| version | string | header | SDK version number. |
| x-hw-terminal | string | header | Device model. |
| x-hw-os | string | header | Device operating system. |
| unionID | string | header | Open user ID. |
| User-Agent | string | header | App version number or ID. |
In the request body, provide data with the following structure:
| Parameter Name | Type | Description |
| appSettings[] | string | Custom properties of the requesting app. |
| writerHasCopyPermission | boolean | Indicates whether the current user (assuming the writer role) has permission to copy this file. |
| description | string | Short description of the file. |
| mimeType | string | MIME type of the file. |
| editedTime | string | Last time the file was modified. |
| fileName | string | Name of the file. |
| originalFilename | string | The original name of the file. |
| parentFolder[] | string | Parent folder. |
| properties[] | string | Custom file properties that are universally visible. |
| favorite | boolean | Indicates whether the file has been favorited. |
| writersHasSharePermission | boolean | Indicates whether the current user (assuming the writer role) has permission to share this file. |
If successful, this method returns a response body with the following structure:
- {
- "category": "drive#file",
- "id": "string",
- "fileName": "string",
- "mimeType": "string",
- "description": "string",
- "favorite": true,
- "recycled": true,
- "directlyRecycled": true,
- "recyclingUser": {
- "category": "drive#user",
- "displayName": "string",
- "profilePhotoLink": "string",
- "me": true,
- "permissionId": "string",
- "userAccount": "string"
- },
- "recycledTime": "2019-12-10T13:06:04.519Z",
- "parentFolder": ["string"],
- "properties": {
- "additionalProp1": "string",
- "additionalProp2": "string",
- "additionalProp3": "string"
- },
- "appSettings": {
- "additionalProp1": "string",
- "additionalProp2": "string",
- "additionalProp3": "string"
- },
- "containers": ["drive"],
- "version": 0,
- "contentDownloadLink": "string",
- "iconDownloadLink": "string",
- "existThumbnail": true,
- "thumbnailDownloadLink": "string",
- "smallThumbnailDownloadLink": "string",
- "thumbnailVersion": 0,
- "onLineViewLink": "string",
- "createdTime": "2019-12-10T13:06:04.519Z",
- "editedTime": "2019-12-10T13:06:04.519Z",
- "editedByMeTime": "2019-12-10T13:06:04.519Z",
- "editedByMe": true,
- "sharedWithMeTime": "2019-12-10T13:06:04.519Z",
- "sharer": {
- "category": "drive#user",
- "displayName": "string",
- "profilePhotoLink": "string",
- "me": true,
- "permissionId": "string",
- "userAccount": "string"
- },
- "owners": [
- {
- "category": "drive#user",
- "displayName": "string",
- "profilePhotoLink": "string",
- "me": true,
- "permissionId": "string",
- "userAccount": "string"
- }
- ],
- "lastEditor": {
- "category": "drive#user",
- "displayName": "string",
- "profilePhotoLink": "string",
- "me": true,
- "permissionId": "string",
- "userAccount": "string"
- },
- "hasShared": false,
- "ownedByMe": true,
- "capabilities": {
- "addChildNodePermission": true,
- "writerHasChangeCopyPermission": false,
- "commentPermission": true,
- "copyPermission": true,
- "deletePermission": true,
- "deleteChildNodePermission": true,
- "downloadPermission": true,
- "editPermission": true,
- "listChildNodePermission": true,
- "editContentPermission": true,
- "readHistoryVersionPermission": true,
- "removeChildNodePermission": true,
- "renameFilePermission": true,
- "shareFilePermission": false,
- "recyclePermission": true,
- "recycleChildNodePermission": true,
- "unrecyclePermission": true
- },
- "viewersHasCopyContentPermission": false,
- "writerHasCopyPermission": false,
- "writersHasSharePermission": false,
- "permissions": [
- {
- "category": "drive#permission",
- "id": "string",
- "type": "user",
- "role": "owner",
- "userAccount": "string",
- "displayName": "string",
- "expirationTime": "2020-02-24T00:50:54.483Z",
- "deleted": true,
- "canDiscoverFile": true
- }
- ],
- "permissionIds": ["string"],
- "originalFilename": "string",
- "fullFileSuffix": "string",
- "fileSuffix": "string",
- "size": 0,
- "occupiedSpace": 0,
- "pictureMetadata": {
- "width": 0,
- "height": 0,
- "rotation": 0,
- "location": {
- "latitude": 0,
- "longitude": 0,
- "altitude": 0
- },
- "exifTime": "string",
- "cameraMaker": "string",
- "cameraModel": "string",
- "exposureTime": 0,
- "aperture": 0,
- "flashUsed": true,
- "focalLength": 0,
- "isoSpeed": 0,
- "meteringMode": "string",
- "sensor": "string",
- "exposureMode": "string",
- "colorSpace": "string",
- "whiteBalance": "string",
- "exposureBias": 0,
- "maxApertureValue": 0,
- "subjectDistance": 0,
- "lens": "string"
- },
- "videoMetadata": {
- "width": 0,
- "height": 0,
- "durationTime": 0
- },
- "sha256": "string",
- "lastHistoryVersionId": "string",
- "contentVersion": "string"
- }
| id | string | ID of the file. |
| category | string | Resource type. The value is always drive#file. |
| id | string | ID of the file. |
| fileName | string | Name of the file. |
| mimeType | string | MIME type of the file. |
| description | string | Short description of the file. |
| favorite | boolean | Indicates whether the file has been favorited. |
| recycled | boolean | Indicates whether the file has been moved to the recycle bin. |
| directlyRecycled | boolean | Indicates whether the file has been explicitly trashed. |
| recyclingUser.category | string | User type. The value is always drive#user. |
| recyclingUser.displayName | string | Display name for this user. |
| recyclingUser.profilePhotoLink | string | Link to the user's profile picture, which is not returned by default. |
| recyclingUser.me | boolean | Indicates whether this user is the requesting user. |
| recyclingUser.permissionId | string | Permission ID. |
| recyclingUser.userAccount | string | Account of the user, which is not returned by default. |
| recycledTime | string | Time when the item was moved to the recycle bin. |
| parentFolder[] | string | Parent folder. |
| properties[] | string | Custom file properties that are universally visible. |
| appSettings[] | string | Custom properties of the requesting app. |
| containers[] | string | Spaces that contain the file. Values: drive and applicationData |
| version | integer | Version number of the file. |
| contentDownloadLink | string | Link for downloading the file in a browser. |
| iconDownloadLink | string | Link to the file's icon. |
| existThumbnail | boolean | Indicates whether the file has a thumbnail. |
| thumbnailDownloadLink | string | Link to the file's large thumbnail. |
| smallThumbnailDownloadLink | string | Link to the file's small thumbnail. |
| thumbnailVersion | integer | Version number for the thumbnail. |
| onLineViewLink | string | Link to view the file online. |
| createdTime | string | Time when the file was created. |
| editedTime | string | Last time the file was modified. |
| editedByMeTime | string | Last time the file was modified by the user. |
| editedByMe | boolean | Indicates whether the file was modified by the user. |
| sharedWithMeTime | string | Time at which the file was shared with the user. |
| sharer.category | string | User type. The value is always drive#user. |
| sharer.displayName | string | Display name for this user. |
| sharer.profilePhotoLink | string | Link to the user's profile picture, which is not returned by default. |
| sharer.me | boolean | Indicates whether this user is the requesting user. |
| sharer.permissionId | string | Permission ID. |
| sharer.userAccount | string | Account of the user, which is not returned by default. |
| owners.category | string | User type. The value is always drive#user. |
| owners.displayName | string | Display name for this user. |
| owners.profilePhotoLink | string | Link to the user's profile picture, which is not returned by default. |
| owners.me | boolean | Indicates whether this user is the requesting user. |
| owners.permissionId | string | Permission ID. |
| owners.userAccount | string | Account of the user, which is not returned by default. |
| lastEditor.category | string | User type. The value is always drive#user. |
| lastEditor.displayName | string | Display name for this user. |
| lastEditor.profilePhotoLink | string | Link to the user's profile picture, which is not returned by default. |
| lastEditor.me | boolean | Indicates whether this user is the requesting user. |
| lastEditor.permissionId | string | Permission ID. |
| lastEditor.userAccount | string | Account of the user, which is not returned by default. |
| hasShared | boolean | Indicates whether the file has been shared. |
| ownedByMe | boolean | Indicates whether the user owns the file. |
| capabilities.addChildNodePermission | boolean | Indicates whether the current user has permission to create subfolders to a particular folder. |
| capabilities.writerHasChangeCopyPermission | boolean | Indicates whether the current user (assuming the writer role) has permission to change the content of this file. |
| capabilities.commentPermission | boolean | Indicates whether the current user has permission to comment on this file. |
| capabilities.copyPermission | boolean | Indicates whether the current user has permission to copy this file. |
| capabilities.deletePermission | boolean | Indicates whether the current user has permission to delete this file. |
| capabilities.deleteChildNodePermission | boolean | Indicates whether the current user has permission to delete subfolders from this folder. |
| capabilities.downloadPermission | boolean | Indicates whether the current user has permission to download this file. |
| capabilities.editPermission | boolean | Indicates whether the current has permission to edit this file. |
| capabilities.listChildNodePermission | boolean | Indicates whether the current user has permission to list subfolders in this folder. |
| capabilities.editContentPermission | boolean | Indicates whether the current user has permission to modify the content of this file. |
| capabilities.readHistoryVersionPermission | boolean | Indicates whether the current user has permission to read revisions of this file. |
| capabilities.removeChildNodePermission | boolean | Indicates whether the current user has permission to remove subfolders from this folder. |
| capabilities.renameFilePermission | boolean | Indicates whether the current user has permission to rename this file. |
| capabilities.shareFilePermission | boolean | Indicates whether the current user has permission to share this file. |
| capabilities.recyclePermission | boolean | Indicates whether the current user has permission to move this file to the recycle bin. |
| capabilities.recycleChildNodePermission | boolean | Indicates whether the current user has permission to move the subfolders in this folder to the recycle bin. |
| capabilities.unrecyclePermission | boolean | Indicates whether the current user has permission to restore this file from the recycle bin. |
| viewersHasCopyContentPermission | boolean | Indicates whether the current user has permission to copy the content of this file. |
| writerHasCopyPermission | boolean | Indicates whether the current user (assuming the writer role) has permission to copy this file. |
| writersHasSharePermission | boolean | Indicates whether the current user (assuming the writer role) has permission to share this file. |
| permissions[] | string | List of permissions for the file. |
| permissions.category | string | Permission type. The value is always drive#permission. |
| permissions.id | string | Permission ID. |
| permissions.type | string | Grantee type. Values: user and anyone. |
| permissions.role | string | Role granted by the permission. Values: owner, writer, commenter, and reader. |
| permissions.userAccount | string | User account. |
| permissions.displayName | string | Display name for the permission. |
| permissions.expirationTime | string | Time when the permission will expire. |
| permissions.deleted | boolean | Indicates whether the permission is deleted. |
| permissions.canDiscoverFile | boolean | Indicates whether the permission allows the file to be searched. It is applicable only to permissions of the anyone type. |
| originalFilename | string | Original name of the file. |
| fullFileSuffix | string | Full file extension extracted from the name field. It is the substring that comes immediately after the dot character in the filename. |
| fileSuffix | string | Final component offullFileSuffix. |
| size | integer | Size of file content. |
| occupiedSpace | integer | Actual storage used by the file. |
| pictureMetadata.width | integer | Image width. |
| pictureMetadata.height | integer | Image height. |
| pictureMetadata.rotation | integer | Image rotation angle. |
| pictureMetadata.location.latitude | number | Latitude stored in the image. |
| pictureMetadata.location.longitude | number | Longitude stored in the image. |
| pictureMetadata.location.altitude | number | Altitude stored in the image. |
| pictureMetadata.exifTime | string | Date and time the image was created (EXIF DateTime). |
| pictureMetadata.cameraMaker | string | Maker of the camera that was used to create the image. |
| pictureMetadata.cameraModel | string | Model of the camera that was used to create the image. |
| pictureMetadata.exposureTime | number | Length of the exposure, in seconds. |
| pictureMetadata.aperture | number | Aperture (f-number) used when creating the image. |
| pictureMetadata.flashUsed | boolean | Indicates whether a flash was used to create the image. |
| pictureMetadata.focalLength | number | Focal length used when creating the image, in millimeters. |
| pictureMetadata.isoSpeed | integer | ISO speed used when creating the image. |
| pictureMetadata.meteringMode | string | Metering mode used when creating the image. |
| pictureMetadata.sensor | string | Type of sensor used when creating the image. |
| pictureMetadata.exposureMode | string | Exposure mode used when creating the image. |
| pictureMetadata.colorSpace | string | Color space of the image. |
| pictureMetadata.whiteBalance | string | White balance mode used when creating the image. |
| pictureMetadata.exposureBias | number | Exposure bias of the image (APEX value). |
| pictureMetadata.maxApertureValue | number | Maximum aperture used when creating the image (APEX value). |
| pictureMetadata.subjectDistance | integer | Distance to the subject of the image, in meters. |
| pictureMetadata.lens | string | Lens used for creating the image. |
| videoMetadata.width | integer | Width of the video. |
| videoMetadata.height | integer | Height of the video. |
| videoMetadata.durationTime | integer | Duration of the video in milliseconds. |
| sha256 | string | SHA-256 value for the file. |
| lastHistoryVersionId | string | ID of the latest version. |
| contentVersion | string | Content version number. |