فراداده یا محتوای یک فایل را با شناسه دریافت می کند.
اگر پارامتر URL alt=media را ارائه دهید، پاسخ شامل محتوای فایل در بدنه پاسخ می شود. دانلود محتوا با alt=media فقط در صورتی کار می کند که فایل در Drive ذخیره شده باشد. برای دانلود Google Docs، Sheets و Slides به جای آن files.export استفاده کنید. برای اطلاعات بیشتر، دانلود و صادر کردن فایلها را ببینید.
درخواست HTTP
GET https://www.googleapis.com/drive/v3/files/{fileId}
این که آیا کاربر خطر دانلود بدافزار شناخته شده یا سایر فایل های توهین آمیز را تأیید می کند. این تنها زمانی قابل اعمال است که پارامتر alt روی media تنظیم شده باشد و کاربر مالک فایل یا سازمان دهنده درایو مشترکی باشد که فایل در آن قرار دارد.
supportsAllDrives
boolean
اینکه آیا برنامه درخواست کننده هم از My Drives و هم درایوهای مشترک پشتیبانی می کند.
supportsTeamDrives (deprecated)
boolean
منسوخ شده: به جای آن از supportsAllDrives استفاده کنید.
includePermissionsForView
string
مشخص می کند که کدام مجوزهای اضافی در پاسخ گنجانده شود. فقط "منتشر شده" پشتیبانی می شود.
includeLabels
string
فهرستی از شناسههای برچسبهایی که با کاما از هم جدا شدهاند تا در قسمت labelInfo پاسخ قرار داده شوند.
درخواست بدن
بدنه درخواست باید خالی باشد.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ حاوی نمونه ای از File است.
تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی."],[[["Retrieves a file's metadata or content using its ID, with the option to download the content using `alt=media` if stored in Google Drive."],["Accepts various query parameters such as `acknowledgeAbuse`, `supportsAllDrives`, and `includePermissionsForView` to customize the response."],["Requires authorization with one of the specified OAuth scopes, such as `https://www.googleapis.com/auth/drive` or `https://www.googleapis.com/auth/drive.readonly`."],["Returns a [File](/drive/api/reference/rest/v3/files#File) object in the response body upon successful execution."],["Uses `GET` request with the endpoint `https://www.googleapis.com/drive/v3/files/{fileId}`, where `{fileId}` is replaced with the actual file ID."]]],["This describes retrieving file metadata or content from Google Drive using a `GET` request to `https://www.googleapis.com/drive/v3/files/{fileId}`. The `fileId` is required as a path parameter. Content can be downloaded by setting `alt=media` as a query parameter. Additional query parameters like `acknowledgeAbuse`, `supportsAllDrives`, and `includeLabels` allow for more specific requests. The request body must be empty. The response body, if successful, is a `File` instance. Several authorization scopes are required.\n"]]