POST/users/{userId}/drive/sharedfolders/{sharedFolderId}/files/{fileId}/rename
Renames a file in a shared folder.
OAuth 2.0 authentication.
For more information, see Authentication and Authorization.
file
| Parameter | Type | Description |
|---|---|---|
| userId | string | User ID
required example : me |
| sharedFolderId | string | Shared folder ID required example : MTIzNDVfRF8xMjM0NQ |
| fileId | string | File ID required example : NzExNTMwMDF8MTQ2NzA1NjAxMDAwMHxGfDA |
| Header | type | Description |
|---|---|---|
| Authorization | string | Bearer {token} required |
| Content-Type | string | application/json required example : application/json |
| Property | Type | Description |
|---|---|---|
| fileName | string | New file name required minLength : 1 maxLength : 200 |
example
1{2 "fileName": "works.txt"3}OK
| Property | Type | Description |
|---|---|---|
| accessedTime | string | Access date readOnly : true |
| createdTime | string | Creation date readOnly : true |
| fileId | string | File ID readOnly : true |
| parentFileId | string | File ID of the parent folder readOnly : true |
| fileName | string | File name readOnly : true |
| fileSize | integer | File size format : int64 readOnly : true |
| filePath | string | File path readOnly : true |
| fileType | string | File type
Allowed values : AUDIO, DOC, ETC, EXE, FOLDER, IMAGE, VIDEO, ZIP |
| hasPermission | boolean | Indicates whether an access permission is set for the file. readOnly : true |
| permissionRootFileId | string | Permission root folder ID readOnly : true nullable : true |
| shared | boolean | Indicates whether the file is shared. readOnly : true nullable : false |
| shareRootFileId | string | Root folder ID of the shared folder readOnly : true nullable : true |
| resourceLocation | integer | Resource location code format : int32 readOnly : true |
| statuses | array (ENUM_FileStatus) | File status |
| modifiedTime | string | Update date readOnly : true |
| Property | Type | Description |
|---|---|---|
| ENUM_FileStatus | string | File status
Allowed values : LOCKED, MALWARE, PROTECTED, IN_PROGRESS |
example
1{2 "fileId": "QDIxMDAwMDAwMDAwMTcwfDExODE1MDg3MzQ0NzJ8RHww",3 "parentFileId": "QDIxMDAwMDAwMDAwMTcwfDExNzgyODY2MjgxMDR8RHww",4 "resourceLocation": 24101,5 "fileSize": 10,6 "fileName": "works.txt",7 "filePath": "/worksFolder/mobile/",8 "fileType": "DOC",9 "createdTime": "2020-11-13T18:20:05.05+09:00",10 "modifiedTime": "2021-04-05T21:14:05.05+09:00",11 "accessedTime": "2021-04-05T21:14:05.05+09:00",12 "statuses": [],13 "hasPermission": false,14 "permissionRootFileId": null,15 "shared": false,16 "shareRootFileId": null17}