يحصل على البيانات الوصفية للملف أو محتواه حسب رقم التعريف.
إذا قدّمت مَعلمة عنوان URL alt=media، ستتضمّن الاستجابة محتوى الملف في نص الاستجابة. لا يمكن تنزيل المحتوى باستخدام "alt=media" إلا إذا كان الملف مخزَّنًا في Drive. لتنزيل "مستندات Google" و"جداول بيانات Google" و"العروض التقديمية من Google"، استخدِم files.export بدلاً من ذلك. لمزيد من المعلومات، يمكنك الاطّلاع على تنزيل تصدير الملفات.
طلب HTTP
GET https://www.googleapis.com/drive/v3/files/{fileId}
ما إذا كان المستخدم يقرّ بمخاطر تنزيل برامج ضارة معروفة أو ملفات مسيئة أخرى لا ينطبق ذلك إلا في حال ضبط مَعلمة alt على media، وعندما يكون المستخدم هو مالك الملف أو منظِّمًا لمساحة التخزين السحابي المشتركة التي يتوفّر فيها الملف.
supportsAllDrives
boolean
ما إذا كان التطبيق الذي قدّم الطلب يتيح استخدام كل من "ملفاتي" ومساحات التخزين السحابي المشتركة.
supportsTeamDrives (deprecated)
boolean
متوقّفة نهائيًا: استخدِم supportsAllDrives بدلاً منها.
includePermissionsForView
string
لتحديد أذونات الملف الشخصي الإضافية التي يجب تضمينها في الرد. فقط "المنشورة"
includeLabels
string
قائمة بمعرّفات التصنيفات المفصولة بفواصل التي يجب تضمينها في الجزء labelInfo من الردّ.
نص الطلب
يجب أن يكون نص الطلب فارغًا.
نص الاستجابة
إذا كانت الاستجابة ناجحة، يحتوي نص الاستجابة على مثال File.
تاريخ التعديل الأخير: 2024-09-04 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-09-04 (حسب التوقيت العالمي المتفَّق عليه)"],[[["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"]]