Access the Google Drive API with managed OAuth authentication. List, search, create, and manage files and folders.
Reference
List Files
GET /google-drive/drive/v3/files?pageSize=10With query:
GET /google-drive/drive/v3/files?q=name%20contains%20'report'&pageSize=10Only folders:
GET /google-drive/drive/v3/files?q=mimeType='application/vnd.google-apps.folder'Files in specific folder:
GET /google-drive/drive/v3/files?q='FOLDER_ID'+in+parentsWith fields:
GET /google-drive/drive/v3/files?fields=files(id,name,mimeType,createdTime,modifiedTime,size)maton google-drive file list -Q "name contains 'budget'"Get File Metadata
GET /google-drive/drive/v3/files/{fileId}?fields=id,name,mimeType,size,createdTimematon google-drive file view FILE_ID --fields 'id,name,mimeType,size,createdTime'Download File Content
GET /google-drive/drive/v3/files/{fileId}?alt=mediamaton google-drive file download FILE_ID --output ./report.pdfExport Google Docs
GET /google-drive/drive/v3/files/{fileId}/export?mimeType=application/pdfmaton google-drive file export FILE_ID --mime-type application/pdf --output ./doc.pdfCreate File (metadata only)
POST /google-drive/drive/v3/files
Content-Type: application/json
{
"name": "New Document",
"mimeType": "application/vnd.google-apps.document"
}maton google-drive file create --name 'New Document' --mime-type application/vnd.google-apps.documentCreate Folder
POST /google-drive/drive/v3/files
Content-Type: application/json
{
"name": "New Folder",
"mimeType": "application/vnd.google-apps.folder"
}maton google-drive file create --name 'New Folder' --mime-type application/vnd.google-apps.folderUpdate File Metadata
PATCH /google-drive/drive/v3/files/{fileId}
Content-Type: application/json
{
"name": "Renamed File"
}maton google-drive file update FILE_ID --name 'Renamed File'Move File to Folder
PATCH /google-drive/drive/v3/files/{fileId}?addParents=NEW_FOLDER_ID&removeParents=OLD_FOLDER_IDmaton google-drive file update FILE_ID --add-parents NEW_FOLDER_ID --remove-parents OLD_FOLDER_IDDelete File
DELETE /google-drive/drive/v3/files/{fileId}maton google-drive file delete FILE_IDCopy File
POST /google-drive/drive/v3/files/{fileId}/copy
Content-Type: application/json
{
"name": "Copy of File"
}maton google-drive file copy FILE_ID --name 'Copy of File'