Endpoint Get file info
Name
get_file_info
Description
Gets information of a file [API reference]
Related Tables
FileInfo
, Files
, FilesList
, Folders
Parameters
Parameter | Required | Options | ||||||
---|---|---|---|---|---|---|---|---|
Name:
Label: Id Id of a file you want to see information for |
YES | |||||||
Name:
Label: Drive Type Default search context is User's drive. Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency. By default, corpora is set to 'user'. However, this can change depending on the filter set through the 'Query' parameter. |
YES |
|
||||||
Name:
Label: Shared DriveId By default file lists from MyDrive but if you like to search other Shared drive (formally known as Team drive) then set this parameter. |
||||||||
Name:
Label: Supports all drives (e.g. My and Shared) Whether the requesting application supports both My Drives and shared drives. |
|
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
---|---|---|---|---|
Id |
DT_WSTR
|
nvarchar(440)
|
440 | |
Kind |
DT_WSTR
|
nvarchar(200)
|
200 | |
Name |
DT_WSTR
|
nvarchar(780)
|
780 | |
MimeType |
DT_WSTR
|
nvarchar(650)
|
650 | |
CreatedTime |
DT_DBTIMESTAMP
|
datetime
|
||
ModifiedTime |
DT_DBTIMESTAMP
|
datetime
|
||
Size |
DT_WSTR
|
nvarchar(200)
|
200 | |
Version |
DT_WSTR
|
nvarchar(200)
|
200 | |
Shared |
DT_BOOL
|
bit
|
||
Starred |
DT_BOOL
|
bit
|
||
Trashed |
DT_BOOL
|
bit
|
||
FileExtension |
DT_WSTR
|
nvarchar(200)
|
200 | |
DriveId |
DT_WSTR
|
nvarchar(500)
|
500 | |
CopyRequiresWriterPermission |
DT_BOOL
|
bit
|
||
Md5Checksum |
DT_WSTR
|
nvarchar(500)
|
500 | |
WritersCanShare |
DT_BOOL
|
bit
|
||
ViewedByMe |
DT_BOOL
|
bit
|
||
Parents |
DT_WSTR
|
nvarchar(500)
|
500 | |
ThumbnailLink |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
IconLink |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
LastModifyingUserDisplayName |
DT_WSTR
|
nvarchar(500)
|
500 | |
LastModifyingUserKind |
DT_WSTR
|
nvarchar(100)
|
100 | |
LastModifyingUserMe |
DT_BOOL
|
bit
|
||
LastModifyingUserPermissionId |
DT_WSTR
|
nvarchar(500)
|
500 | |
LastModifyingUserEmailAddress |
DT_WSTR
|
nvarchar(500)
|
500 | |
LastModifyingUserPhotoLink |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
Owners |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
HeadRevisionId |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
WebViewLink |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
WebContentLink |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
ViewersCanCopyContent |
DT_BOOL
|
bit
|
||
Permissions |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
HasThumbnail |
DT_BOOL
|
bit
|
||
Spaces |
DT_WSTR
|
nvarchar(500)
|
500 | |
ExplicitlyTrashed |
DT_BOOL
|
bit
|
||
ModifiedByMeTime |
DT_DBTIMESTAMP
|
datetime
|
||
ViewedByMeTime |
DT_DBTIMESTAMP
|
datetime
|
||
QuotaBytesUsed |
DT_WSTR
|
nvarchar(50)
|
50 | |
OriginalFilename |
DT_WSTR
|
nvarchar(500)
|
500 | |
OwnedByMe |
DT_BOOL
|
bit
|
||
FullFileExtension |
DT_WSTR
|
nvarchar(50)
|
50 | |
IsAppAuthorized |
DT_BOOL
|
bit
|
||
CanChangeViewersCanCopyContent |
DT_BOOL
|
bit
|
||
CanEdit |
DT_BOOL
|
bit
|
||
CanCopy |
DT_BOOL
|
bit
|
||
CanComment |
DT_BOOL
|
bit
|
||
CanAddChildren |
DT_BOOL
|
bit
|
||
CanDelete |
DT_BOOL
|
bit
|
||
CanDownload |
DT_BOOL
|
bit
|
||
CanListChildren |
DT_BOOL
|
bit
|
||
CanRemoveChildren |
DT_BOOL
|
bit
|
||
CanRename |
DT_BOOL
|
bit
|
||
CanTrash |
DT_BOOL
|
bit
|
||
CanReadRevisions |
DT_BOOL
|
bit
|
||
CanChangeCopyRequiresWriterPermission |
DT_BOOL
|
bit
|
||
CanMoveItemIntoTeamDrive |
DT_BOOL
|
bit
|
||
CanUntrash |
DT_BOOL
|
bit
|
||
CanModifyContent |
DT_BOOL
|
bit
|
||
CanMoveItemOutOfDrive |
DT_BOOL
|
bit
|
||
CanAddMyDriveParent |
DT_BOOL
|
bit
|
||
CanRemoveMyDriveParent |
DT_BOOL
|
bit
|
||
CanMoveItemWithinDrive |
DT_BOOL
|
bit
|
||
CanShare |
DT_BOOL
|
bit
|
||
CanMoveChildrenWithinDrive |
DT_BOOL
|
bit
|
||
CanModifyContentRestriction |
DT_BOOL
|
bit
|
||
CanChangeSecurityUpdateEnabled |
DT_BOOL
|
bit
|
||
CanAcceptOwnership |
DT_BOOL
|
bit
|
||
CanReadLabels |
DT_BOOL
|
bit
|
||
CanModifyLabels |
DT_BOOL
|
bit
|
||
CanModifyEditorContentRestriction |
DT_BOOL
|
bit
|
||
CanModifyOwnerContentRestriction |
DT_BOOL
|
bit
|
||
CanRemoveContentRestriction |
DT_BOOL
|
bit
|
||
CanMoveChildrenOutOfDrive |
DT_BOOL
|
bit
|
||
CanReadDrive |
DT_BOOL
|
bit
|
||
CanReadTeamDrive |
DT_BOOL
|
bit
|
||
CanMoveTeamDriveItem |
DT_BOOL
|
bit
|
||
CanMoveItemWithinTeamDrive |
DT_BOOL
|
bit
|
||
CanMoveItemOutOfTeamDrive |
DT_BOOL
|
bit
|
||
CanDeleteChildren |
DT_BOOL
|
bit
|
||
CanMoveChildrenOutOfTeamDrive |
DT_BOOL
|
bit
|
||
CanMoveChildrenWithinTeamDrive |
DT_BOOL
|
bit
|
||
CanTrashChildren |
DT_BOOL
|
bit
|
||
CanAddFolderFromAnotherDrive |
DT_BOOL
|
bit
|
||
ThumbnailVersion |
DT_WSTR
|
nvarchar(50)
|
50 | |
ModifiedByMe |
DT_BOOL
|
bit
|
||
PermissionIds |
DT_WSTR
|
nvarchar(500)
|
500 | |
ImageMediaMetadataWidth |
DT_I4
|
int
|
||
ImageMediaMetadataHeight |
DT_I4
|
int
|
||
ImageMediaMetadataRotation |
DT_I4
|
int
|
||
LinkShareMetadataSecurityUpdateEligible |
DT_BOOL
|
bit
|
||
LinkShareMetadataSecurityUpdateEnabled |
DT_BOOL
|
bit
|
||
Sha1Checksum |
DT_WSTR
|
nvarchar(500)
|
500 | |
Sha256Checksum |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
HasAugmentedPermissions |
DT_BOOL
|
bit
|
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. |
Examples
SSIS
Use Google Drive Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
This Endpoint belongs to the FileInfo table, therefore it is better to use it, instead of accessing the endpoint directly:
Required Parameters | |
---|---|
Id | Fill-in the parameter... |

API Destination
This Endpoint belongs to the FileInfo table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to get file info:
Required Parameters | |
---|---|
Id | Fill-in the parameter... |

ODBC application
Use these SQL queries in your ODBC application data source:
Get file information
Gets file information
SELECT * FROM FileInfo
WITH (Id='1EVzXFVBQIh3LcJvfcLhI1UWhW3qUxFkM')
--You can get file Id by selecting from 'list_files' endpoint
List / search files from my drive
List or search files from my drive (use search query expression). Uncomment Query part to invoke filter
SELECT * FROM Files
WITH(
--Query='name contains "ZappySys*.*"', --includes files where name contains "zappysys" word
)
List / search files from a single shared drive
List or search files from a specific shared drive by driveId and search query expression. Uncomment Query part to invoke filter
SELECT * FROM Files
WITH(
--Query='name contains "ZappySys*.*"', --includes files where name contains "zappysys" word
DriveId='0AFWIggplk2z6Uk9PVA',
DriveType='drive',
SupportsAllDrives='true',
IncludeItemsFromAllDrives='true'
)
List / search files from all shared drives
List or search files from all shared drives by driveId and search query expression. Uncomment Query part to invoke filter
SELECT * FROM Files
WITH(
--Query='name contains "ZappySys*.*"', --includes files where name contains "zappysys" word
DriveType='allDrives',
SupportsAllDrives='true',
IncludeItemsFromAllDrives='true'
)
Get file list
Downloads a file
SELECT * FROM Files
Get files list
Gets files list
SELECT * FROM FilesList
get_file_info
endpoint belongs to
FileInfo
, Files
, FilesList
, Folders
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Get file information
Gets file information
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM FileInfo
WITH (Id=''1EVzXFVBQIh3LcJvfcLhI1UWhW3qUxFkM'')
--You can get file Id by selecting from ''list_files'' endpoint';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];
List / search files from my drive
List or search files from my drive (use search query expression). Uncomment Query part to invoke filter
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Files
WITH(
--Query=''name contains "ZappySys*.*"'', --includes files where name contains "zappysys" word
)';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];
List / search files from a single shared drive
List or search files from a specific shared drive by driveId and search query expression. Uncomment Query part to invoke filter
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Files
WITH(
--Query=''name contains "ZappySys*.*"'', --includes files where name contains "zappysys" word
DriveId=''0AFWIggplk2z6Uk9PVA'',
DriveType=''drive'',
SupportsAllDrives=''true'',
IncludeItemsFromAllDrives=''true''
)';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];
List / search files from all shared drives
List or search files from all shared drives by driveId and search query expression. Uncomment Query part to invoke filter
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Files
WITH(
--Query=''name contains "ZappySys*.*"'', --includes files where name contains "zappysys" word
DriveType=''allDrives'',
SupportsAllDrives=''true'',
IncludeItemsFromAllDrives=''true''
)';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];
Get file list
Downloads a file
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Files';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];
Get files list
Gets files list
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM FilesList';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];